forked from mirrors/nixpkgs
made EXPR_PATH point to local instead of store
- we need this behavior in dev shell - the main build still uses the store file
This commit is contained in:
parent
437b2054f4
commit
ca97497bfd
|
@ -8,7 +8,7 @@
|
|||
makeWrapper,
|
||||
}:
|
||||
let
|
||||
runtimeExprPath = "${./src/eval.nix}";
|
||||
runtimeExprPath = ./src/eval.nix;
|
||||
package =
|
||||
rustPlatform.buildRustPackage {
|
||||
name = "nixpkgs-check-by-name";
|
||||
|
@ -20,7 +20,7 @@ let
|
|||
clippy
|
||||
makeWrapper
|
||||
];
|
||||
env.NIX_CHECK_BY_NAME_EXPR_PATH = runtimeExprPath;
|
||||
env.NIX_CHECK_BY_NAME_EXPR_PATH = "${runtimeExprPath}";
|
||||
# Needed to make Nix evaluation work inside the nix build
|
||||
preCheck = ''
|
||||
export TEST_ROOT=$(pwd)/test-tmp
|
||||
|
@ -43,7 +43,7 @@ let
|
|||
--set NIX_CHECK_BY_NAME_EXPR_PATH "$NIX_CHECK_BY_NAME_EXPR_PATH"
|
||||
'';
|
||||
passthru.shell = mkShell {
|
||||
env.NIX_CHECK_BY_NAME_EXPR_PATH = runtimeExprPath;
|
||||
env.NIX_CHECK_BY_NAME_EXPR_PATH = toString runtimeExprPath;
|
||||
inputsFrom = [ package ];
|
||||
};
|
||||
};
|
||||
|
|
|
@ -58,7 +58,8 @@ pub fn check_values(
|
|||
attrs_file_path.display()
|
||||
))?;
|
||||
|
||||
let expr_path = std::env::var("NIX_CHECK_BY_NAME_EXPR_PATH")?;
|
||||
let expr_path = std::env::var("NIX_CHECK_BY_NAME_EXPR_PATH")
|
||||
.context("Could not get environment variable NIX_CHECK_BY_NAME_EXPR_PATH")?;
|
||||
// With restrict-eval, only paths in NIX_PATH can be accessed, so we explicitly specify the
|
||||
// ones needed needed
|
||||
let mut command = process::Command::new("nix-instantiate");
|
||||
|
|
Loading…
Reference in a new issue