summaryrefslogtreecommitdiffstats
path: root/pkgs/test/haskell
diff options
context:
space:
mode:
Diffstat (limited to 'pkgs/test/haskell')
-rw-r--r--pkgs/test/haskell/cabalSdist/default.nix19
1 files changed, 15 insertions, 4 deletions
diff --git a/pkgs/test/haskell/cabalSdist/default.nix b/pkgs/test/haskell/cabalSdist/default.nix
index c0a9d406a503..4432e95ab56e 100644
--- a/pkgs/test/haskell/cabalSdist/default.nix
+++ b/pkgs/test/haskell/cabalSdist/default.nix
@@ -1,7 +1,18 @@
-{ lib, haskellPackages, runCommand }:
+{ lib, haskell, haskellPackages, runCommand }:
let
- localRaw = haskellPackages.callPackage ./local/generated.nix {};
+ src = lib.fileset.toSource {
+ root = ./local;
+ fileset = lib.fileset.unions [
+ ./local/app
+ ./local/CHANGELOG.md
+ ./local/local.cabal
+ ];
+ };
+ # This prevents the source from depending on the formatting of the ./local/generated.nix file
+ localRaw = haskell.lib.compose.overrideSrc {
+ inherit src;
+ } (haskellPackages.callPackage ./local/generated.nix {});
in
lib.recurseIntoAttrs rec {
@@ -20,14 +31,14 @@ lib.recurseIntoAttrs rec {
assumptionLocalHasDirectReference = runCommand "localHasDirectReference" {
drvPath = builtins.unsafeDiscardOutputDependency localRaw.drvPath;
} ''
- grep ${./local} $drvPath >/dev/null
+ grep ${src} $drvPath >/dev/null
touch $out
'';
localHasNoDirectReference = runCommand "localHasNoDirectReference" {
drvPath = builtins.unsafeDiscardOutputDependency localFromCabalSdist.drvPath;
} ''
- grep -v ${./local} $drvPath >/dev/null
+ grep -v ${src} $drvPath >/dev/null
touch $out
'';
}