mirror of
https://github.com/unclechu/gRPC-haskell.git
synced 2024-11-23 03:29:42 +01:00
Update nix-shell
env and update tasty-quickcheck
dep (#18)
* Add tasty-quickcheck to library deps * Add shell hook to no-tests target and export it at toplevel * cabal2nix . > default.nix * PR feedback from @parnell (better shell hooks)
This commit is contained in:
parent
865b175845
commit
d95052ebe6
3 changed files with 22 additions and 15 deletions
14
default.nix
14
default.nix
|
@ -1,8 +1,8 @@
|
|||
{ mkDerivation, async, base, bytestring, c2hs, clock, containers
|
||||
, grpc, managed, optparse-generic, pipes, proto3-suite, proto3-wire
|
||||
, QuickCheck, random, safe, sorted-list, stdenv, stm
|
||||
, system-filepath, tasty, tasty-hunit, tasty-quickcheck, text, time
|
||||
, transformers, turtle, unix, vector
|
||||
, QuickCheck, safe, sorted-list, stdenv, stm, system-filepath
|
||||
, tasty, tasty-hunit, tasty-quickcheck, text, time, transformers
|
||||
, turtle, unix, vector
|
||||
}:
|
||||
mkDerivation {
|
||||
pname = "grpc-haskell";
|
||||
|
@ -12,21 +12,21 @@ mkDerivation {
|
|||
isExecutable = true;
|
||||
libraryHaskellDepends = [
|
||||
async base bytestring clock containers managed pipes proto3-suite
|
||||
proto3-wire safe sorted-list stm tasty tasty-hunit transformers
|
||||
vector
|
||||
proto3-wire safe sorted-list stm tasty tasty-hunit tasty-quickcheck
|
||||
transformers vector
|
||||
];
|
||||
librarySystemDepends = [ grpc ];
|
||||
libraryToolDepends = [ c2hs ];
|
||||
executableHaskellDepends = [
|
||||
async base bytestring containers optparse-generic proto3-suite
|
||||
proto3-wire random system-filepath text transformers turtle vector
|
||||
proto3-wire system-filepath text transformers turtle
|
||||
];
|
||||
testHaskellDepends = [
|
||||
async base bytestring clock containers managed pipes proto3-suite
|
||||
QuickCheck safe tasty tasty-hunit tasty-quickcheck text time
|
||||
transformers turtle unix
|
||||
];
|
||||
homepage = "https://github.mv.awakenetworks.net/awakenetworks/gRPC-haskell";
|
||||
homepage = "https://github.com/awakenetworks/gRPC-haskell";
|
||||
description = "Haskell implementation of gRPC layered on shared C library";
|
||||
license = stdenv.lib.licenses.asl20;
|
||||
}
|
||||
|
|
|
@ -37,6 +37,7 @@ library
|
|||
, async ==2.1.*
|
||||
, tasty >= 0.11 && <0.12
|
||||
, tasty-hunit >= 0.9 && <0.10
|
||||
, tasty-quickcheck >= 0.8.4 && < 0.9
|
||||
, safe ==0.3.*
|
||||
, vector
|
||||
, sorted-list >=0.1.6.1 && <=0.3
|
||||
|
@ -248,7 +249,7 @@ test-suite test
|
|||
, async
|
||||
, tasty >= 0.11 && <0.12
|
||||
, tasty-hunit >= 0.9 && <0.10
|
||||
, tasty-quickcheck ==0.8.*
|
||||
, tasty-quickcheck >= 0.8.4 && < 0.9
|
||||
, containers ==0.5.*
|
||||
, managed >= 1.0.0 && < 1.1
|
||||
, pipes >=4.1 && <=4.4
|
||||
|
|
20
release.nix
20
release.nix
|
@ -192,6 +192,11 @@ let
|
|||
pkgs.lib.optionalString pkgs.stdenv.isDarwin ''
|
||||
export DYLD_LIBRARY_PATH=${grpc}/lib''${DYLD_LIBRARY_PATH:+:}$DYLD_LIBRARY_PATH
|
||||
'';
|
||||
|
||||
shellHook = (oldDerivation.shellHook or "") + ''
|
||||
export DYLD_LIBRARY_PATH=${grpc}/lib''${DYLD_LIBRARY_PATH:+:}$DYLD_LIBRARY_PATH
|
||||
'';
|
||||
|
||||
});
|
||||
|
||||
grpc-haskell =
|
||||
|
@ -257,7 +262,7 @@ let
|
|||
--prefix DYLD_LIBRARY_PATH : ${grpc}/lib
|
||||
'';
|
||||
|
||||
shellHook = ''
|
||||
shellHook = (oldDerivation.shellHook or "") + ''
|
||||
export DYLD_LIBRARY_PATH=${grpc}/lib''${DYLD_LIBRARY_PATH:+:}$DYLD_LIBRARY_PATH
|
||||
# This lets us use our custom ghc and python environments in the shell.
|
||||
export PATH=${stack}/bin:${ghc}/bin:${python}/bin''${PATH:+:}$PATH
|
||||
|
@ -278,10 +283,11 @@ let
|
|||
pkgs = import nixpkgs { inherit config; };
|
||||
|
||||
in
|
||||
{ grpc-haskell-linux = linuxPkgs.haskellPackages.grpc-haskell;
|
||||
grpc-haskell-darwin = darwinPkgs.haskellPackages.grpc-haskell;
|
||||
grpc-haskell = pkgs.haskellPackages.grpc-haskell;
|
||||
grpc-linux = linuxPkgs.grpc;
|
||||
grpc-darwin = darwinPkgs.grpc;
|
||||
grpc = pkgs.grpc;
|
||||
{ grpc-haskell-linux = linuxPkgs.haskellPackages.grpc-haskell;
|
||||
grpc-haskell-darwin = darwinPkgs.haskellPackages.grpc-haskell;
|
||||
grpc-haskell = pkgs.haskellPackages.grpc-haskell;
|
||||
grpc-haskell-no-tests = pkgs.haskellPackages.grpc-haskell-no-tests;
|
||||
grpc-linux = linuxPkgs.grpc;
|
||||
grpc-darwin = darwinPkgs.grpc;
|
||||
grpc = pkgs.grpc;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue