summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBen Sima <ben@bsima.me>2024-06-06 15:13:56 -0400
committerBen Sima <ben@bsima.me>2024-12-21 10:06:42 -0500
commit4bbbd9ded5a88a2d0681aab86892e1058b538467 (patch)
tree3c1e3df2a6b1420c4c07a2742c74f05dc2a73baa
parent1b667645b5e86e9401ae87490e5772b413687cf0 (diff)
Set explicit srcs in hand-written bild build
I'm not sure when `lib.fileset` was introduced, but it allows me to easily create a source that can be unpacked by the `unpackPhase` which also maintains the directory structure. This means I can pass a subset of the whole repo to the builder, and changing an unrelated file (outside of that subset) won't cause a rebuild of bild, which wasn't the case before.
-rw-r--r--Biz/Bild.nix13
1 files changed, 12 insertions, 1 deletions
diff --git a/Biz/Bild.nix b/Biz/Bild.nix
index c24cecd..7d23d6a 100644
--- a/Biz/Bild.nix
+++ b/Biz/Bild.nix
@@ -107,7 +107,18 @@ let
# hand-written builder we need
bild = self.stdenv.mkDerivation {
name = "bild";
- src = ../.;
+ srcs = self.lib.fileset.toSource {
+ root = ../.;
+ fileset = self.lib.fileset.unions [
+ ../Alpha.hs
+ ../Biz/Bild.hs
+ ../Biz/Bild/Meta.hs
+ ../Biz/Cli.hs
+ ../Biz/Log.hs
+ ../Biz/Namespace.hs
+ ../Biz/Test.hs
+ ];
+ };
nativeBuildInputs = [ self.haskell.ghcPackageSetBild ];
buildInputs = [ self.makeWrapper ];
propagatedBuildInputs = with self.pkgs; [