summary refs log tree commit diff
path: root/pkgs/test
diff options
context:
space:
mode:
authorRobert Hensing <roberth@users.noreply.github.com>2022-03-20 19:18:44 +0100
committerGitHub <noreply@github.com>2022-03-20 19:18:44 +0100
commit9bc841fec1c0e8b9772afa29f934d2c7ce57da8e (patch)
tree9080ea3014c3f230f9a3893740ce4e4fd2c08ed1 /pkgs/test
parent7e1810ceb2ccadb72fa03eff69d89e682d7207a7 (diff)
parent2e87d165f74411ae00f964a508945696969ff53d (diff)
downloadnixpkgs-9bc841fec1c0e8b9772afa29f934d2c7ce57da8e.tar
nixpkgs-9bc841fec1c0e8b9772afa29f934d2c7ce57da8e.tar.gz
nixpkgs-9bc841fec1c0e8b9772afa29f934d2c7ce57da8e.tar.bz2
nixpkgs-9bc841fec1c0e8b9772afa29f934d2c7ce57da8e.tar.lz
nixpkgs-9bc841fec1c0e8b9772afa29f934d2c7ce57da8e.tar.xz
nixpkgs-9bc841fec1c0e8b9772afa29f934d2c7ce57da8e.tar.zst
nixpkgs-9bc841fec1c0e8b9772afa29f934d2c7ce57da8e.zip
Merge pull request #164305 from hercules-ci/haskellPackages-shellFor-extraDependencies
haskellPackages.shellFor: Add extraDependencies
Diffstat (limited to 'pkgs/test')
-rw-r--r--pkgs/test/haskell/shellFor/default.nix11
1 files changed, 11 insertions, 0 deletions
diff --git a/pkgs/test/haskell/shellFor/default.nix b/pkgs/test/haskell/shellFor/default.nix
index 04f5e045361..aa06ff6e52f 100644
--- a/pkgs/test/haskell/shellFor/default.nix
+++ b/pkgs/test/haskell/shellFor/default.nix
@@ -2,6 +2,7 @@
 
 (haskellPackages.shellFor {
   packages = p: [ p.constraints p.linear ];
+  extraDependencies = p: { libraryHaskellDepends = [ p.releaser ]; };
   nativeBuildInputs = [ cabal-install ];
   phases = [ "unpackPhase" "buildPhase" "installPhase" ];
   unpackPhase = ''
@@ -16,6 +17,16 @@
     export HOME=$(mktemp -d)
     mkdir -p $HOME/.cabal
     touch $HOME/.cabal/config
+
+    # Check extraDependencies.libraryHaskellDepends arg
+    ghci <<EOF
+    :m + Releaser.Primitives
+    :m + System.IO
+    writeFile "done" "done"
+    EOF
+    [[ done == $(cat done) ]]
+
+    # Check packages arg
     cabal v2-build --offline --verbose constraints linear --ghc-options="-O0 -j$NIX_BUILD_CORES"
   '';
   installPhase = ''