diff options
author | Ryan Lahfa <masterancpp@gmail.com> | 2023-11-21 16:41:49 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-11-21 16:41:49 +0100 |
commit | e5d7fa1eae60d57c582025f0d43294c2ab810eed (patch) | |
tree | 9bff68702c351f620cbd67ce08446d6754cccd59 | |
parent | 7ddfd3f64f73fa065ebae80bff13998009d35005 (diff) | |
parent | 94a5cfaae6ef5df42bd131da04125a6480983023 (diff) |
Merge pull request #265924 from RaitoBezarius/nix_23
-rw-r--r-- | pkgs/tools/package-management/nix/common.nix | 35 | ||||
-rw-r--r-- | pkgs/tools/package-management/nix/default.nix | 10 |
2 files changed, 21 insertions, 24 deletions
diff --git a/pkgs/tools/package-management/nix/common.nix b/pkgs/tools/package-management/nix/common.nix index 798c7cc918d53..d61384ec10554 100644 --- a/pkgs/tools/package-management/nix/common.nix +++ b/pkgs/tools/package-management/nix/common.nix @@ -1,9 +1,11 @@ -{ lib, fetchFromGitHub +{ lib +, fetchFromGitHub , version , suffix ? "" , hash ? null , src ? fetchFromGitHub { owner = "NixOS"; repo = "nix"; rev = version; inherit hash; } , patches ? [ ] +, maintainers ? with lib.maintainers; [ eelco lovesegfault artturin ] }: assert (hash == null) -> (src != null); let @@ -27,6 +29,8 @@ in , callPackage , coreutils , curl +, docbook_xsl_ns +, docbook5 , editline , flex , gnutar @@ -37,6 +41,8 @@ in , libarchive , libcpuid , libsodium +, libxml2 +, libxslt , lowdown , mdbook , mdbook-linkcheck @@ -86,13 +92,17 @@ self = stdenv.mkDerivation { nativeBuildInputs = [ pkg-config - ] ++ lib.optionals atLeast24 [ autoconf-archive autoreconfHook bison flex jq - ] ++ lib.optionals (atLeast24 && enableDocumentation) [ + ] ++ lib.optionals (enableDocumentation && !atLeast24) [ + libxslt + libxml2 + docbook_xsl_ns + docbook5 + ] ++ lib.optionals (enableDocumentation && atLeast24) [ (lib.getBin lowdown) mdbook ] ++ lib.optionals (atLeast213 && enableDocumentation) [ @@ -111,13 +121,12 @@ self = stdenv.mkDerivation { openssl sqlite xz - ] ++ lib.optionals stdenv.isDarwin [ - Security - ] ++ lib.optionals atLeast24 [ gtest libarchive lowdown - ] ++ lib.optionals (atLeast24 && stdenv.isx86_64) [ + ] ++ lib.optionals stdenv.isDarwin [ + Security + ] ++ lib.optionals (stdenv.isx86_64) [ libcpuid ] ++ lib.optionals atLeast214 [ rapidcheck @@ -133,13 +142,6 @@ self = stdenv.mkDerivation { nlohmann_json ]; - NIX_LDFLAGS = lib.optionals (!atLeast24) [ - # https://github.com/NixOS/nix/commit/3e85c57a6cbf46d5f0fe8a89b368a43abd26daba - (lib.optionalString enableStatic "-lssl -lbrotlicommon -lssh2 -lz -lnghttp2 -lcrypto") - # https://github.com/NixOS/nix/commits/74b4737d8f0e1922ef5314a158271acf81cd79f8 - (lib.optionalString (stdenv.hostPlatform.system == "armv5tel-linux" || stdenv.hostPlatform.system == "armv6l-linux") "-latomic") - ]; - postPatch = '' patchShebangs --build tests ''; @@ -180,9 +182,6 @@ self = stdenv.mkDerivation { "--enable-gc" ] ++ lib.optionals (!enableDocumentation) [ "--disable-doc-gen" - ] ++ lib.optionals (!atLeast24) [ - # option was removed in 2.4 - "--disable-init-state" ] ++ lib.optionals atLeast214 [ "CXXFLAGS=-I${lib.getDev rapidcheck}/extras/gtest/include" ] ++ lib.optionals stdenv.isLinux [ @@ -246,7 +245,7 @@ self = stdenv.mkDerivation { ''; homepage = "https://nixos.org/"; license = licenses.lgpl2Plus; - maintainers = with maintainers; [ eelco lovesegfault artturin ]; + inherit maintainers; platforms = platforms.unix; outputsToInstall = [ "out" ] ++ optional enableDocumentation "man"; mainProgram = "nix"; diff --git a/pkgs/tools/package-management/nix/default.nix b/pkgs/tools/package-management/nix/default.nix index 2bf354fbc69f9..dd5d35375e30e 100644 --- a/pkgs/tools/package-management/nix/default.nix +++ b/pkgs/tools/package-management/nix/default.nix @@ -145,15 +145,13 @@ let pkg; in lib.makeExtensible (self: ({ - nix_2_3 = (common rec { - version = "2.3.16"; - src = fetchurl { - url = "https://nixos.org/releases/nix/nix-${version}/nix-${version}.tar.xz"; - hash = "sha256-fuaBtp8FtSVJLSAsO+3Nne4ZYLuBj2JpD2xEk7fCqrw="; - }; + nix_2_3 = (common { + version = "2.3.17"; + hash = "sha256-EK0pgHDekJFqr0oMj+8ANIjq96WPjICe2s0m4xkUdH4="; patches = [ patch-monitorfdhup ]; + maintainers = with lib.maintainers; [ flokli raitobezarius ]; }).override { boehmgc = boehmgc-nix_2_3; }; nix_2_10 = common { |