From 81c06bc6094a3a637c90e1ad57616caf2f137a07 Mon Sep 17 00:00:00 2001 From: Philip Taron Date: Mon, 17 Jun 2024 09:39:16 -0700 Subject: [PATCH 1/2] tests.haskell.cabalSdist.localFromCabalSdist: prevent unnecessary rebuilds --- pkgs/test/haskell/cabalSdist/local/generated.nix | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/pkgs/test/haskell/cabalSdist/local/generated.nix b/pkgs/test/haskell/cabalSdist/local/generated.nix index bfa299962bcb..f6463e762ddd 100644 --- a/pkgs/test/haskell/cabalSdist/local/generated.nix +++ b/pkgs/test/haskell/cabalSdist/local/generated.nix @@ -3,7 +3,14 @@ mkDerivation { pname = "local"; version = "0.1.0.0"; - src = ./.; + src = lib.fileset.toSource { + root = ./.; + fileset = lib.fileset.unions [ + ./app + ./CHANGELOG.md + ./local.cabal + ]; + }; isLibrary = false; isExecutable = true; executableHaskellDepends = [ base ]; From 53f06894e108431799cf23b0069e98f4aeba8d0c Mon Sep 17 00:00:00 2001 From: Philip Taron Date: Mon, 17 Jun 2024 09:43:20 -0700 Subject: [PATCH 2/2] tests.haskell.setBuildTarget: prevent unnecessary rebuilds --- pkgs/test/haskell/setBuildTarget/default.nix | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/pkgs/test/haskell/setBuildTarget/default.nix b/pkgs/test/haskell/setBuildTarget/default.nix index f0c78c510449..39d5db698bcd 100644 --- a/pkgs/test/haskell/setBuildTarget/default.nix +++ b/pkgs/test/haskell/setBuildTarget/default.nix @@ -7,7 +7,15 @@ let mkDerivation { pname = "haskell-setBuildTarget"; version = "0.1.0.0"; - src = ./.; + src = lib.fileset.toSource { + root = ./.; + fileset = lib.fileset.unions [ + ./haskell-setBuildTarget.cabal + ./Bar.hs + ./Foo.hs + ./Setup.hs + ]; + }; isLibrary = false; isExecutable = true; executableHaskellDepends = [ base ];