mirror of
https://github.com/NixOS/nix
synced 2025-06-25 06:31:14 +02:00
Make config.nix
shims
As requested in https://github.com/NixOS/nix/pull/11792#discussion_r1827034428
This commit is contained in:
parent
e70c9bb06a
commit
f7591bc6ed
56 changed files with 49 additions and 77 deletions
2
tests/functional/ca/config.nix
Normal file
2
tests/functional/ca/config.nix
Normal file
|
@ -0,0 +1,2 @@
|
|||
# Shim to get generated file
|
||||
import "${builtins.getEnv "_NIX_TEST_BUILD_DIR"}/ca/config.nix"
|
|
@ -1,4 +1,4 @@
|
|||
with import "${builtins.getEnv "_NIX_TEST_BUILD_DIR"}/ca/config.nix";
|
||||
with import ./config.nix;
|
||||
|
||||
let mkCADerivation = args: mkDerivation ({
|
||||
__contentAddressed = true;
|
||||
|
|
|
@ -6,7 +6,4 @@ flakeDir="$TEST_HOME/flake"
|
|||
mkdir -p "${flakeDir}"
|
||||
cp flake.nix "${_NIX_TEST_BUILD_DIR}/ca/config.nix" content-addressed.nix "${flakeDir}"
|
||||
|
||||
# `config.nix` cannot be gotten via build dir / env var (runs afoul pure eval). Instead get from flake.
|
||||
removeBuildDirRef "$flakeDir"/*.nix
|
||||
|
||||
nix run --no-write-lock-file "path:${flakeDir}#runnable"
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
with import "${builtins.getEnv "_NIX_TEST_BUILD_DIR"}/ca/config.nix";
|
||||
with import ./config.nix;
|
||||
|
||||
let mkCADerivation = args: mkDerivation ({
|
||||
__contentAddressed = true;
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
# build it at once.
|
||||
|
||||
|
||||
with import "${builtins.getEnv "_NIX_TEST_BUILD_DIR"}/ca/config.nix";
|
||||
with import ./config.nix;
|
||||
|
||||
mkDerivation {
|
||||
name = "simple";
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue