Skip to content

Commit

Permalink
Temporarily restore nixVersions 2.4-2.9
Browse files Browse the repository at this point in the history
This commit temporarily restores nixVersions 2.4-2.9 so the
following commit can split them into separate files before
re-performing the deletion (against the kept-in-separate-files
version).
  • Loading branch information
Adam Joseph committed Mar 28, 2023
1 parent 5e2ca1e commit fc8b055
Show file tree
Hide file tree
Showing 2 changed files with 86 additions and 6 deletions.
56 changes: 50 additions & 6 deletions pkgs/tools/package-management/nix/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -72,17 +72,61 @@ in lib.makeExtensible (self: {
];
}).override { boehmgc = boehmgc-nix_2_3; };

nix_2_4 = throw "nixVersions.nix_2_4 has been removed";
nix_2_4 = common {
version = "2.4";
sha256 = "sha256-op48CCDgLHK0qV1Batz4Ln5FqBiRjlE6qHTiZgt3b6k=";
# https://github.com/NixOS/nix/pull/5537
patches = [ ./patches/install-nlohmann_json-headers.patch ];
};

nix_2_5 = throw "nixVersions.nix_2_5 has been removed";
nix_2_5 = common {
version = "2.5.1";
sha256 = "sha256-GOsiqy9EaTwDn2PLZ4eFj1VkXcBUbqrqHehRE9GuGdU=";
# https://github.com/NixOS/nix/pull/5536
patches = [ ./patches/install-nlohmann_json-headers.patch ];
};

nix_2_6 = throw "nixVersions.nix_2_6 has been removed";
# This is the last version of nix where https://github.com/NixOS/nix/issues/6572
# is not an unsolved breaking bug. Please keep it until the issue is fixed
# and in latest stable nix.
nix_2_6 = common {
version = "2.6.1";
sha256 = "sha256-E9iQ7f+9Z6xFcUvvfksTEfn8LsDfzmwrcRBC//5B3V0=";
};

nix_2_7 = throw "nixVersions.nix_2_7 has been removed";
nix_2_7 = common {
version = "2.7.0";
sha256 = "sha256-m8tqCS6uHveDon5GSro5yZor9H+sHeh+v/veF1IGw24=";
patches = [
# remove when there's a 2.7.1 release
# https://github.com/NixOS/nix/pull/6297
# https://github.com/NixOS/nix/issues/6243
# https://github.com/NixOS/nixpkgs/issues/163374
(fetchpatch {
url = "https://github.com/NixOS/nix/commit/c9afca59e87afe7d716101e6a75565b4f4b631f7.patch";
sha256 = "sha256-xz7QnWVCI12lX1+K/Zr9UpB93b10t1HS9y/5n5FYf8Q=";
})
];
};

nix_2_8 = throw "nixVersions.nix_2_8 has been removed";
nix_2_8 = common {
version = "2.8.1";
sha256 = "sha256-zldZ4SiwkISFXxrbY/UdwooIZ3Z/I6qKxtpc3zD0T/o=";
};

nix_2_9 = throw "nixVersions.nix_2_9 has been removed";
nix_2_9 = common {
version = "2.9.2";
sha256 = "sha256-uZCaBo9rdWRO/AlQMvVVjpAwzYijB2H5KKQqde6eHkg=";
patches = [
(fetchpatch {
# https://github.com/NixOS/nix/pull/7283
name = "fix-requires-non-existing-output.patch";
url = "https://github.com/NixOS/nix/commit/3ade5f5d6026b825a80bdcc221058c4f14e10a27.patch";
sha256 = "sha256-s1ybRFCjQaSGj7LKu0Z5g7UiHqdJGeD+iPoQL0vaiS0=";
})
patch-sqlite-exception
];
};

nix_2_10 = common {
version = "2.10.3";
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
From 3884f7a69a57d8ecfcbcaae476ec2ff53ffbd549 Mon Sep 17 00:00:00 2001
From: Robert Hensing <robert@roberthensing.nl>
Date: Thu, 11 Nov 2021 11:03:21 +0100
Subject: [PATCH] Install nlohmann_json headers

These headers are included by the libexpr, libfetchers, libstore
and libutil headers.
Considering that these are vendored sources, Nix should expose them,
as it is not a good idea for reverse dependencies to rely on a
potentially different source that can go out of sync.
---
Makefile | 1 +
src/nlohmann/local.mk | 2 ++
2 files changed, 3 insertions(+)
create mode 100644 src/nlohmann/local.mk

diff --git a/Makefile b/Makefile
index 5040d288485..e6ce50cbdb7 100644
--- a/Makefile
+++ b/Makefile
@@ -10,6 +10,7 @@ makefiles = \
src/libexpr/local.mk \
src/libcmd/local.mk \
src/nix/local.mk \
+ src/nlohmann/local.mk \
src/resolve-system-dependencies/local.mk \
scripts/local.mk \
misc/bash/local.mk \
diff --git a/src/nlohmann/local.mk b/src/nlohmann/local.mk
new file mode 100644
index 00000000000..63c427e000e
--- /dev/null
+++ b/src/nlohmann/local.mk
@@ -0,0 +1,2 @@
+$(foreach i, $(wildcard src/nlohmann/*.hpp), \
+ $(eval $(call install-file-in, $(i), $(includedir)/nlohmann, 0644)))

0 comments on commit fc8b055

Please sign in to comment.