-
Notifications
You must be signed in to change notification settings - Fork 95
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
mkDummySrc: fix cleaning to work with Nix store overrides (#448)
* Turns out if a build is invoked with `--store` then the source cleaning filter will observe paths rooted at the alternative store which breaks out previous string handling (and results in incorrectly ignoring files which should be included)
- Loading branch information
Showing
6 changed files
with
38 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,5 @@ | ||
gcroot | ||
result* | ||
target/ | ||
/extra-tests/*/alt-store | ||
/extra-tests/*/flake.lock |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
{ | ||
inputs = { | ||
crane.url = "github:ipetkov/crane"; | ||
nixpkgs.follows = "crane/nixpkgs"; | ||
flake-utils.url = "github:numtide/flake-utils"; | ||
}; | ||
|
||
outputs = { flake-utils, crane, ... }: flake-utils.lib.eachDefaultSystem (system: | ||
let | ||
craneLib = crane.lib.${system}; | ||
in | ||
{ | ||
# https://github.com/ipetkov/crane/issues/446 | ||
packages.default = craneLib.buildPackage { | ||
src = craneLib.cleanCargoSource (craneLib.path ../../checks/simple); | ||
}; | ||
}); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
#!/bin/sh | ||
# Regression test for https://github.com/ipetkov/crane/issues/446 | ||
set -eu | ||
|
||
scriptDir=$(dirname "$0") | ||
cd "${scriptDir}" | ||
|
||
nix build .#default --override-input crane ../.. --store $(pwd)/alt-store |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters