mirror of
https://github.com/unclechu/gRPC-haskell.git
synced 2024-11-16 16:19:42 +01:00
Factor out shell-hook-common
This commit is contained in:
parent
c92a053981
commit
e80dd2ff31
1 changed files with 12 additions and 9 deletions
21
release.nix
21
release.nix
|
@ -75,7 +75,7 @@ let
|
|||
allowBroken = true;
|
||||
};
|
||||
|
||||
overlay = pkgsNew: pkgsOld: {
|
||||
overlay = pkgsNew: pkgsOld: rec {
|
||||
|
||||
grpc = pkgsNew.callPackage ./nix/grpc.nix { };
|
||||
|
||||
|
@ -171,7 +171,6 @@ let
|
|||
);
|
||||
|
||||
parameterized = pkgsNew.haskell.lib.appendPatch haskellPackagesOld.parameterized ./nix/parameterized.patch;
|
||||
|
||||
};
|
||||
};
|
||||
|
||||
|
@ -180,6 +179,14 @@ let
|
|||
pkgsNew.pythonPackages.protobuf
|
||||
(oldAttrs : {doCheck = false; doInstallCheck = false;});
|
||||
|
||||
shell-hook-common =
|
||||
pkgsNew.lib.optionalString pkgsNew.stdenv.isDarwin ''
|
||||
export DYLD_LIBRARY_PATH=${pkgsNew.grpc}/lib''${DYLD_LIBRARY_PATH:+:}$DYLD_LIBRARY_PATH
|
||||
'' +
|
||||
pkgsNew.lib.optionalString pkgsNew.stdenv.isLinux ''
|
||||
export LD_LIBRARY_PATH=${pkgsNew.grpc}/lib''${LD_LIBRARY_PATH:+:}$LD_LIBRARY_PATH
|
||||
'';
|
||||
|
||||
test-grpc-haskell =
|
||||
pkgsNew.mkShell {
|
||||
nativeBuildInputs = [
|
||||
|
@ -201,13 +208,9 @@ let
|
|||
export LD_LIBRARY_PATH=${pkgsNew.grpc}/lib''${LD_LIBRARY_PATH:+:}$LD_LIBRARY_PATH
|
||||
'';
|
||||
|
||||
shellHook = (oldAttributes.shellHook or "") +
|
||||
pkgsNew.lib.optionalString pkgsNew.stdenv.isDarwin ''
|
||||
export DYLD_LIBRARY_PATH=${pkgsNew.grpc}/lib''${DYLD_LIBRARY_PATH:+:}$DYLD_LIBRARY_PATH
|
||||
'' +
|
||||
pkgsNew.lib.optionalString pkgsNew.stdenv.isLinux ''
|
||||
export LD_LIBRARY_PATH=${pkgsNew.grpc}/lib''${LD_LIBRARY_PATH:+:}$LD_LIBRARY_PATH
|
||||
'';
|
||||
shellHook = (oldAttributes.shellHook or "") + ''
|
||||
${shell-hook-common}
|
||||
'';
|
||||
}
|
||||
);
|
||||
};
|
||||
|
|
Loading…
Reference in a new issue