Skip to content

Commit e5f2262

Browse files
author
Shay Bergmann
authored
Merge pull request #912 from input-output-hk/nix-pure-eval
Fix for deployment with Nix's pure evaluation mode / flakes
2 parents a5910a8 + bcf9ceb commit e5f2262

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

nix/default.nix

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,11 @@ let
55
# affect the fixed derivation calculation from sbt-derivation
66
overlay = final: prev: let
77
inherit (import sources.gitignore { inherit (prev) lib; }) gitignoreSource;
8-
cleanedSrc = prev.lib.cleanSource (gitignoreSource src);
8+
# If src isn't a path, it's likely a prefiltered store path, so use it directly
9+
# This also makes Nix flakes work by passing the flake source as the `src` arg
10+
cleanedSrc = if builtins.isPath src
11+
then prev.lib.cleanSource (gitignoreSource src)
12+
else src;
913
in {
1014
inherit sources;
1115

0 commit comments

Comments
 (0)