Skip to content

Commit c7b92db

Browse files
committed
Hopefully avoid copying git ignored stuff to Nix store
1 parent bb49677 commit c7b92db

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

tests/src/TestLib/NixEnvironmentContext.hs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ introduceNixEnvironment kernels otherConfig label = introduceWith' (defaultNodeO
5656

5757
let nixEnv = NixEnvironment {
5858
nixEnvironmentChannels = [
59-
NixSrcPath "codedown" [i|builtins.fetchTree { type = "path"; path = "#{rootDir}"; }|]
59+
NixSrcPath "codedown" [i|builtins.fetchGit { url = "file://#{rootDir}"; }|]
6060
, nixpkgsSrcSpec
6161
]
6262
, nixEnvironmentKernels = kernels
@@ -80,7 +80,7 @@ introduceNixEnvironment kernels otherConfig label = introduceWith' (defaultNodeO
8080
, "--impure"
8181
-- , "--include", rootDir
8282
, "--option", "restrict-eval", "true"
83-
, "--option", "allowed-uris", L.unwords ["path:" <> rootDir, nixpkgsUri]
83+
, "--option", "allowed-uris", L.unwords ["git+file://" <> rootDir <> "?exportIgnore=1", nixpkgsUri]
8484
, "--expr", T.unpack rendered
8585
, "-o", linkPath
8686
]

0 commit comments

Comments
 (0)