aboutsummaryrefslogtreecommitdiff
path: root/flake.nix
diff options
context:
space:
mode:
authorregnat <rg@regnat.ovh>2020-11-10 10:43:33 +0100
committerregnat <rg@regnat.ovh>2021-03-16 14:20:41 +0100
commit5716345adf2e794fd62229ea52352e74e92e8e63 (patch)
tree3712c69131d9a84b39cbe4e7f464078fa060af4d /flake.nix
parent338f2710580b334a754fad28b88c5cb137c83352 (diff)
Add a test ensuring compatibility with an old daemon
This requires adding `nix` to its own closure which is a bit unfortunate, but as it is optional (the test will be disabled if `OUTER_NIX` is unset) it shouldn't be too much of an issue. (Ideally this should go in another derivation so that we can build Nix and run the test independently, but as the tests are running in the same derivation as the build it's a bit complicated to do so).
Diffstat (limited to 'flake.nix')
-rw-r--r--flake.nix9
1 files changed, 9 insertions, 0 deletions
diff --git a/flake.nix b/flake.nix
index e59ec9a35..3e236aaca 100644
--- a/flake.nix
+++ b/flake.nix
@@ -150,6 +150,11 @@
# 'nix.perl-bindings' packages.
overlay = final: prev: {
+ # An older version of Nix to test against when using the daemon.
+ # Currently using `nixUnstable` as the stable one doesn't respect
+ # `NIX_DAEMON_SOCKET_PATH` which is needed for the tests.
+ mainstream-nix = prev.nixUnstable;
+
nix = with final; with commonDeps pkgs; stdenv.mkDerivation {
name = "nix-${version}";
inherit version;
@@ -158,6 +163,8 @@
VERSION_SUFFIX = versionSuffix;
+ OUTER_NIX = mainstream-nix;
+
outputs = [ "out" "dev" "doc" ];
nativeBuildInputs = nativeBuildDeps;
@@ -486,6 +493,8 @@
stdenv.mkDerivation {
name = "nix";
+ OUTER_NIX = mainstream-nix;
+
outputs = [ "out" "dev" "doc" ];
nativeBuildInputs = nativeBuildDeps;