From 3d5d225ba19fb22a89407b370e2d81b46643f6f6 Mon Sep 17 00:00:00 2001 From: Florian Klink Date: Wed, 17 Nov 2021 22:02:58 +0100 Subject: [PATCH 01/43] crd2pulumi: init at 1.0.10 --- pkgs/development/tools/crd2pulumi/default.nix | 26 +++++++++++++++++++ pkgs/top-level/all-packages.nix | 2 ++ 2 files changed, 28 insertions(+) create mode 100644 pkgs/development/tools/crd2pulumi/default.nix diff --git a/pkgs/development/tools/crd2pulumi/default.nix b/pkgs/development/tools/crd2pulumi/default.nix new file mode 100644 index 000000000000..574228fa4cf0 --- /dev/null +++ b/pkgs/development/tools/crd2pulumi/default.nix @@ -0,0 +1,26 @@ +{ lib, buildGoModule, fetchFromGitHub }: + +buildGoModule rec { + pname = "crd2pulumi"; + version = "1.0.10"; + + src = fetchFromGitHub { + owner = "pulumi"; + repo = "crd2pulumi"; + rev = "v${version}"; + sha256 = "1xzr63brzqysvhm3fqj246c7s84kchpcm6wad3mvxcxjcab6xd1f"; + }; + + vendorSha256 = "0xi5va2fy4nrxp3qgyzcw20a2089sbz8h1hvqx2ryxijr61wd93d"; + + ldflags = [ "-s" "-w" "-X github.com/pulumi/crd2pulumi/gen.Version=${src.rev}" ]; + + subPackages = [ "." ]; + + meta = with lib; { + description = "Generate typed CustomResources from a Kubernetes CustomResourceDefinition"; + homepage = "https://github.com/pulumi/crd2pulumi"; + license = licenses.asl20; + maintainers = with maintainers; [ flokli ]; + }; +} diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 4c6b850e8f57..17d289c9be22 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -4283,6 +4283,8 @@ with pkgs; crackxls = callPackage ../tools/security/crackxls { }; + crd2pulumi = callPackage ../development/tools/crd2pulumi { }; + create-cycle-app = nodePackages.create-cycle-app; createrepo_c = callPackage ../tools/package-management/createrepo_c { }; From 9d21602e75d7383cf2ee01fa657f423f205c7805 Mon Sep 17 00:00:00 2001 From: Ryan Burns Date: Sat, 20 Nov 2021 16:18:37 -0800 Subject: [PATCH 02/43] aws-c-common: 0.6.14 -> 0.6.17 --- pkgs/development/libraries/aws-c-common/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/development/libraries/aws-c-common/default.nix b/pkgs/development/libraries/aws-c-common/default.nix index c927ca53336a..e7a09a19ece5 100644 --- a/pkgs/development/libraries/aws-c-common/default.nix +++ b/pkgs/development/libraries/aws-c-common/default.nix @@ -7,13 +7,13 @@ stdenv.mkDerivation rec { pname = "aws-c-common"; - version = "0.6.14"; + version = "0.6.17"; src = fetchFromGitHub { owner = "awslabs"; repo = pname; rev = "v${version}"; - sha256 = "sha256-JEaRB0k6zyk5UKuB2hEZUAsnp2SuI9mrok/EvwclUJk="; + sha256 = "sha256-+FzTEpotxco4+9gLVUL+rkCWoMjRCorKQ47JINHsnNA="; }; nativeBuildInputs = [ cmake ]; From ea80624cdc9e5d1718f4d53ade4abdb6aa7d2367 Mon Sep 17 00:00:00 2001 From: Ryan Burns Date: Sat, 20 Nov 2021 16:18:49 -0800 Subject: [PATCH 03/43] aws-c-http: 0.6.8 -> 0.6.10 --- pkgs/development/libraries/aws-c-http/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/development/libraries/aws-c-http/default.nix b/pkgs/development/libraries/aws-c-http/default.nix index a57747260513..a25231ee8831 100644 --- a/pkgs/development/libraries/aws-c-http/default.nix +++ b/pkgs/development/libraries/aws-c-http/default.nix @@ -10,13 +10,13 @@ stdenv.mkDerivation rec { pname = "aws-c-http"; - version = "0.6.8"; + version = "0.6.10"; src = fetchFromGitHub { owner = "awslabs"; repo = "aws-c-http"; rev = "v${version}"; - sha256 = "sha256-JqFvKoWW/2UV0jcR50QlD+LEPwQ4qwPoaPpioAuwf90="; + sha256 = "sha256-R+teEKSQjSFYt3+XXvooAy4GJwN4yzEhJtiuknBZIgU="; }; nativeBuildInputs = [ From 2eb081deb2327d44c78d0ed5cc3c32b5010f0297 Mon Sep 17 00:00:00 2001 From: Ryan Burns Date: Sat, 20 Nov 2021 16:19:04 -0800 Subject: [PATCH 04/43] aws-crt-cpp: 0.17.0 -> 0.17.8 --- pkgs/development/libraries/aws-crt-cpp/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/development/libraries/aws-crt-cpp/default.nix b/pkgs/development/libraries/aws-crt-cpp/default.nix index 68414931e413..5d4a44ccf159 100644 --- a/pkgs/development/libraries/aws-crt-cpp/default.nix +++ b/pkgs/development/libraries/aws-crt-cpp/default.nix @@ -16,13 +16,13 @@ stdenv.mkDerivation rec { pname = "aws-crt-cpp"; - version = "0.17.0"; + version = "0.17.8"; src = fetchFromGitHub { owner = "awslabs"; repo = "aws-crt-cpp"; rev = "v${version}"; - sha256 = "0ijvyg3hrh1d0npca62syz8qy6nkqh90fq54cqyln0p333z16q52"; + sha256 = "sha256-eHABIg3v5ycpQzacW/8C74PT6yDOXGmJqDa9P1hN7Mo="; }; postPatch = '' From 592924102351bcc3133e7a244722ebd3a6e88562 Mon Sep 17 00:00:00 2001 From: Ryan Burns Date: Sat, 20 Nov 2021 16:31:45 -0800 Subject: [PATCH 05/43] s2n-tls: 1.0.17 -> 1.3.0 --- pkgs/development/libraries/s2n-tls/default.nix | 13 ++----------- 1 file changed, 2 insertions(+), 11 deletions(-) diff --git a/pkgs/development/libraries/s2n-tls/default.nix b/pkgs/development/libraries/s2n-tls/default.nix index 1ce6f2672104..35a37fbddb86 100644 --- a/pkgs/development/libraries/s2n-tls/default.nix +++ b/pkgs/development/libraries/s2n-tls/default.nix @@ -1,29 +1,20 @@ { lib, stdenv , fetchFromGitHub -, fetchpatch , cmake , openssl }: stdenv.mkDerivation rec { pname = "s2n-tls"; - version = "1.0.17"; + version = "1.3.0"; src = fetchFromGitHub { owner = "aws"; repo = pname; rev = "v${version}"; - sha256 = "sha256-6XqBpNURU8fzGkTt4jsijgMiOkzMebmLmPAq8yQsTg4="; + sha256 = "sha256-gd91thIcJO6Bhn1ENkW0k2iDzu1CvSYwWVv0VEM9umU="; }; - patches = [ - # Fix FindLibCrypto paths (https://github.com/aws/s2n-tls/pull/3067) - (fetchpatch { - url = "https://github.com/aws/s2n-tls/commit/bda649524402be4018c44bff07f6c64502a351ec.patch"; - sha256 = "02jmxsrd506vhjzlrgh1p2z1f1sn4v8klks25zisiykyqkyaczkv"; - }) - ]; - nativeBuildInputs = [ cmake ]; outputs = [ "out" "dev"]; From ec720845982d64209866288c55a749a56a150681 Mon Sep 17 00:00:00 2001 From: Ryan Burns Date: Sat, 20 Nov 2021 16:27:04 -0800 Subject: [PATCH 06/43] aws-c-auth: 0.6.5 -> 0.6.8 --- pkgs/development/libraries/aws-c-auth/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/development/libraries/aws-c-auth/default.nix b/pkgs/development/libraries/aws-c-auth/default.nix index 7de352328100..ad1f3483cff0 100644 --- a/pkgs/development/libraries/aws-c-auth/default.nix +++ b/pkgs/development/libraries/aws-c-auth/default.nix @@ -12,13 +12,13 @@ stdenv.mkDerivation rec { pname = "aws-c-auth"; - version = "0.6.5"; + version = "0.6.8"; src = fetchFromGitHub { owner = "awslabs"; repo = "aws-c-auth"; rev = "v${version}"; - sha256 = "sha256-d3UdZucicp+Z0EjWNE5Xa/EMIGPk6GtQc7f0H8RBHA8="; + sha256 = "sha256-cZyWe3kX5JiB6th1VkkBFKa2MEilRtU+tHvu7c9e+Yw="; }; nativeBuildInputs = [ From 181ee83bff05cf9ae056e703ca87c018f27713d7 Mon Sep 17 00:00:00 2001 From: Ryan Burns Date: Sat, 20 Nov 2021 16:27:14 -0800 Subject: [PATCH 07/43] aws-c-mqtt: 0.7.8 -> 0.7.9 --- pkgs/development/libraries/aws-c-mqtt/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/development/libraries/aws-c-mqtt/default.nix b/pkgs/development/libraries/aws-c-mqtt/default.nix index 39a75c511622..f75b744c3a91 100644 --- a/pkgs/development/libraries/aws-c-mqtt/default.nix +++ b/pkgs/development/libraries/aws-c-mqtt/default.nix @@ -11,13 +11,13 @@ stdenv.mkDerivation rec { pname = "aws-c-mqtt"; - version = "0.7.8"; + version = "0.7.9"; src = fetchFromGitHub { owner = "awslabs"; repo = "aws-c-mqtt"; rev = "v${version}"; - sha256 = "19j6nw2v36c4yff4p0fbf0748s06fd5r9cp2yakry9ybn1ada99c"; + sha256 = "sha256-YMAqK4DOFA5TkMNwLHRk1m14V8lN6X5SDAwrTYWdGMc="; }; nativeBuildInputs = [ From f09fff1e1f0d6a671f713006367474314dc5649f Mon Sep 17 00:00:00 2001 From: Ryan Burns Date: Sat, 20 Nov 2021 16:29:31 -0800 Subject: [PATCH 08/43] aws-c-cal: 0.5.11 -> 0.5.12 --- pkgs/development/libraries/aws-c-cal/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/development/libraries/aws-c-cal/default.nix b/pkgs/development/libraries/aws-c-cal/default.nix index d0bcfc901084..87d66e15355d 100644 --- a/pkgs/development/libraries/aws-c-cal/default.nix +++ b/pkgs/development/libraries/aws-c-cal/default.nix @@ -2,13 +2,13 @@ stdenv.mkDerivation rec { pname = "aws-c-cal"; - version = "0.5.11"; + version = "0.5.12"; src = fetchFromGitHub { owner = "awslabs"; repo = pname; rev = "v${version}"; - sha256 = "sha256-rmEsDsY50IKpCpQTvAFEkgCtuHwwgwMwcRpBUyyZGGc="; + sha256 = "sha256-KzuaT9c1l9Uhyj6IEy8JfDYzEYI2OcUkq+KRDoJx+Cc="; }; nativeBuildInputs = [ cmake ]; From 184f85323948abbcfa5e079bb3684a7ab7bf315d Mon Sep 17 00:00:00 2001 From: Ryan Burns Date: Sat, 20 Nov 2021 16:30:30 -0800 Subject: [PATCH 09/43] aws-c-io: 0.10.12 -> 0.10.13 --- pkgs/development/libraries/aws-c-io/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/development/libraries/aws-c-io/default.nix b/pkgs/development/libraries/aws-c-io/default.nix index 1ff28dccc9ef..2cfba1bd2046 100644 --- a/pkgs/development/libraries/aws-c-io/default.nix +++ b/pkgs/development/libraries/aws-c-io/default.nix @@ -2,13 +2,13 @@ stdenv.mkDerivation rec { pname = "aws-c-io"; - version = "0.10.12"; + version = "0.10.13"; src = fetchFromGitHub { owner = "awslabs"; repo = pname; rev = "v${version}"; - sha256 = "sha256-8v38NN9qrgdrshMx3l2wLrl7l77HjsW2GPu8IwkclJQ="; + sha256 = "sha256-wdsSxEY9FwJoqdi0S8TNoyq8oxoZORKWeorsSpn+1IY="; }; nativeBuildInputs = [ cmake ]; From e191321866b1d754eed23a577837f183c76581f7 Mon Sep 17 00:00:00 2001 From: sternenseemann Date: Tue, 23 Nov 2021 16:12:48 +0100 Subject: [PATCH 10/43] haskell.compiler.ghc865Binary: build with correct LLVM version See https://gitlab.haskell.org/ghc/ghc/-/wikis/commentary/compiler/backends/llvm/installing#llvm-support --- pkgs/top-level/haskell-packages.nix | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/pkgs/top-level/haskell-packages.nix b/pkgs/top-level/haskell-packages.nix index bf340c10cb3b..b5d214c579ce 100644 --- a/pkgs/top-level/haskell-packages.nix +++ b/pkgs/top-level/haskell-packages.nix @@ -50,7 +50,9 @@ in { compiler = { - ghc865Binary = callPackage ../development/compilers/ghc/8.6.5-binary.nix { }; + ghc865Binary = callPackage ../development/compilers/ghc/8.6.5-binary.nix { + llvmPackages = pkgs.llvmPackages_6; + }; ghc8102Binary = callPackage ../development/compilers/ghc/8.10.2-binary.nix { llvmPackages = pkgs.llvmPackages_9; From d7ff8061beed6ce1c141066fd268cdbb5acc0dd1 Mon Sep 17 00:00:00 2001 From: sternenseemann Date: Tue, 23 Nov 2021 16:11:37 +0100 Subject: [PATCH 11/43] haskellPackages: always inherit llvmPackages from ghc's passthru This means we only have to update the llvmPackages attribute in one place now and should prevent situations like with 8.6.5 where different versions would be used in the package set compared to the compiler build. Drop comments in the configuration-ghc-X.Y.x.nix files as well, since LLVM version isn't tied to the compiler minor version at all (e. g. 8.10.2 and 8.10.7 have different support ranges). --- pkgs/development/compilers/ghc/8.10.2-binary.nix | 2 ++ pkgs/development/compilers/ghc/8.10.7-binary.nix | 2 ++ pkgs/development/compilers/ghc/8.6.5-binary.nix | 2 ++ pkgs/development/haskell-modules/configuration-ghc-8.10.x.nix | 3 +-- pkgs/development/haskell-modules/configuration-ghc-8.6.x.nix | 3 +-- pkgs/development/haskell-modules/configuration-ghc-8.8.x.nix | 3 +-- pkgs/development/haskell-modules/configuration-ghc-9.0.x.nix | 3 +-- pkgs/development/haskell-modules/configuration-ghc-9.2.x.nix | 3 +-- pkgs/development/haskell-modules/configuration-ghc-head.nix | 2 +- 9 files changed, 12 insertions(+), 11 deletions(-) diff --git a/pkgs/development/compilers/ghc/8.10.2-binary.nix b/pkgs/development/compilers/ghc/8.10.2-binary.nix index bf909016ac22..93ebca2b6c4a 100644 --- a/pkgs/development/compilers/ghc/8.10.2-binary.nix +++ b/pkgs/development/compilers/ghc/8.10.2-binary.nix @@ -378,6 +378,8 @@ stdenv.mkDerivation rec { targetPrefix = ""; enableShared = true; + inherit llvmPackages; + # Our Cabal compiler name haskellCompilerName = "ghc-${version}"; }; diff --git a/pkgs/development/compilers/ghc/8.10.7-binary.nix b/pkgs/development/compilers/ghc/8.10.7-binary.nix index 58be16dc5693..a8ec751d2d24 100644 --- a/pkgs/development/compilers/ghc/8.10.7-binary.nix +++ b/pkgs/development/compilers/ghc/8.10.7-binary.nix @@ -378,6 +378,8 @@ stdenv.mkDerivation rec { targetPrefix = ""; enableShared = true; + inherit llvmPackages; + # Our Cabal compiler name haskellCompilerName = "ghc-${version}"; }; diff --git a/pkgs/development/compilers/ghc/8.6.5-binary.nix b/pkgs/development/compilers/ghc/8.6.5-binary.nix index b1126fda7d26..5b52f0e4cdd9 100644 --- a/pkgs/development/compilers/ghc/8.6.5-binary.nix +++ b/pkgs/development/compilers/ghc/8.6.5-binary.nix @@ -181,6 +181,8 @@ stdenv.mkDerivation rec { targetPrefix = ""; enableShared = true; + inherit llvmPackages; + # Our Cabal compiler name haskellCompilerName = "ghc-${version}"; }; diff --git a/pkgs/development/haskell-modules/configuration-ghc-8.10.x.nix b/pkgs/development/haskell-modules/configuration-ghc-8.10.x.nix index 5e42a7c1131c..ec5515659309 100644 --- a/pkgs/development/haskell-modules/configuration-ghc-8.10.x.nix +++ b/pkgs/development/haskell-modules/configuration-ghc-8.10.x.nix @@ -4,8 +4,7 @@ with haskellLib; self: super: { - # This compiler version needs llvm 9.x. - llvmPackages = pkgs.lib.dontRecurseIntoAttrs pkgs.llvmPackages_9; + llvmPackages = pkgs.lib.dontRecurseIntoAttrs self.ghc.llvmPackages; # Disable GHC 8.10.x core libraries. array = null; diff --git a/pkgs/development/haskell-modules/configuration-ghc-8.6.x.nix b/pkgs/development/haskell-modules/configuration-ghc-8.6.x.nix index db202735f893..ce7bf88d1da8 100644 --- a/pkgs/development/haskell-modules/configuration-ghc-8.6.x.nix +++ b/pkgs/development/haskell-modules/configuration-ghc-8.6.x.nix @@ -4,8 +4,7 @@ with haskellLib; self: super: { - # This compiler version needs llvm 6.x. - llvmPackages = pkgs.lib.dontRecurseIntoAttrs pkgs.llvmPackages_6; + llvmPackages = pkgs.lib.dontRecurseIntoAttrs self.ghc.llvmPackages; # Disable GHC 8.6.x core libraries. array = null; diff --git a/pkgs/development/haskell-modules/configuration-ghc-8.8.x.nix b/pkgs/development/haskell-modules/configuration-ghc-8.8.x.nix index a27a7c522098..94e9a32ce05a 100644 --- a/pkgs/development/haskell-modules/configuration-ghc-8.8.x.nix +++ b/pkgs/development/haskell-modules/configuration-ghc-8.8.x.nix @@ -4,8 +4,7 @@ with haskellLib; self: super: { - # This compiler version needs llvm 7.x. - llvmPackages = pkgs.lib.dontRecurseIntoAttrs pkgs.llvmPackages_7; + llvmPackages = pkgs.lib.dontRecurseIntoAttrs self.ghc.llvmPackages; # Disable GHC 8.8.x core libraries. array = null; diff --git a/pkgs/development/haskell-modules/configuration-ghc-9.0.x.nix b/pkgs/development/haskell-modules/configuration-ghc-9.0.x.nix index 08d1ba3b2107..7999e228c748 100644 --- a/pkgs/development/haskell-modules/configuration-ghc-9.0.x.nix +++ b/pkgs/development/haskell-modules/configuration-ghc-9.0.x.nix @@ -4,8 +4,7 @@ with haskellLib; self: super: { - # This compiler version needs llvm 10.x. - llvmPackages = pkgs.lib.dontRecurseIntoAttrs pkgs.llvmPackages_10; + llvmPackages = pkgs.lib.dontRecurseIntoAttrs self.ghc.llvmPackages; # Disable GHC 9.0.x core libraries. array = null; diff --git a/pkgs/development/haskell-modules/configuration-ghc-9.2.x.nix b/pkgs/development/haskell-modules/configuration-ghc-9.2.x.nix index 7dc5e70b90c7..c8488453fdcb 100644 --- a/pkgs/development/haskell-modules/configuration-ghc-9.2.x.nix +++ b/pkgs/development/haskell-modules/configuration-ghc-9.2.x.nix @@ -4,8 +4,7 @@ with haskellLib; self: super: { - # This compiler version needs llvm 10.x. - llvmPackages = pkgs.lib.dontRecurseIntoAttrs pkgs.llvmPackages_10; + llvmPackages = pkgs.lib.dontRecurseIntoAttrs self.ghc.llvmPackages; # Disable GHC 9.2.x core libraries. array = null; diff --git a/pkgs/development/haskell-modules/configuration-ghc-head.nix b/pkgs/development/haskell-modules/configuration-ghc-head.nix index f2fa17d9c46b..e1e3f2c99884 100644 --- a/pkgs/development/haskell-modules/configuration-ghc-head.nix +++ b/pkgs/development/haskell-modules/configuration-ghc-head.nix @@ -11,7 +11,7 @@ with haskellLib; self: super: { - llvmPackages = pkgs.lib.dontRecurseIntoAttrs pkgs.llvmPackages_10; + llvmPackages = pkgs.lib.dontRecurseIntoAttrs self.ghc.llvmPackages; # Disable GHC 8.7.x core libraries. array = null; From 5a568ea36fc596b349ac088418c627d4a1488ce0 Mon Sep 17 00:00:00 2001 From: sternenseemann Date: Sun, 21 Nov 2021 23:33:39 +0100 Subject: [PATCH 12/43] haskell.compiler.ghc901: drop LLVM version to 9 GHC 9.0.1 only supports LLVM 9 and spews a lot of warnings about LLVM 10 when using the LLVM backend atm. See also: https://www.haskell.org/ghc/download_ghc_9_0_1.html --- pkgs/top-level/haskell-packages.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/top-level/haskell-packages.nix b/pkgs/top-level/haskell-packages.nix index b5d214c579ce..c96c166d5eaf 100644 --- a/pkgs/top-level/haskell-packages.nix +++ b/pkgs/top-level/haskell-packages.nix @@ -111,8 +111,8 @@ in { packages.ghc8107Binary; inherit (buildPackages.python3Packages) sphinx; inherit (buildPackages.darwin) autoSignDarwinBinariesHook; - buildLlvmPackages = buildPackages.llvmPackages_10; - llvmPackages = pkgs.llvmPackages_10; + buildLlvmPackages = buildPackages.llvmPackages_9; + llvmPackages = pkgs.llvmPackages_9; }; ghc921 = callPackage ../development/compilers/ghc/9.2.1.nix { bootPkgs = From 9e1f438a7656b5ab2247eca914902525207f12cc Mon Sep 17 00:00:00 2001 From: sternenseemann Date: Tue, 23 Nov 2021 16:21:32 +0100 Subject: [PATCH 13/43] haskell.compiler.*: upgrade to latest supported LLVM version Source: * (8.6.5: https://www.haskell.org/ghc/download_ghc_8_6_5.html) * (8.8.4: https://www.haskell.org/ghc/download_ghc_8_8_4.html) * (8.10.2: https://www.haskell.org/ghc/download_ghc_8_10_2.html) * 8.10.7: https://www.haskell.org/ghc/download_ghc_8_10_7.html * (9.0.1: https://www.haskell.org/ghc/download_ghc_9_0_1.html) * 9.2.1: https://www.haskell.org/ghc/download_ghc_9_2_1.html * HEAD: https://gitlab.haskell.org/ghc/ghc/-/blob/3ab3631f41efe9a1ae32a5b1f709152228edb09a/configure.ac#L674 --- pkgs/top-level/haskell-packages.nix | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/pkgs/top-level/haskell-packages.nix b/pkgs/top-level/haskell-packages.nix index c96c166d5eaf..87a2778fdf85 100644 --- a/pkgs/top-level/haskell-packages.nix +++ b/pkgs/top-level/haskell-packages.nix @@ -64,11 +64,11 @@ in { }; ghc8107Binary = callPackage ../development/compilers/ghc/8.10.7-binary.nix { - llvmPackages = pkgs.llvmPackages_11; + llvmPackages = pkgs.llvmPackages_12; }; ghc8107BinaryMinimal = callPackage ../development/compilers/ghc/8.10.7-binary.nix { - llvmPackages = pkgs.llvmPackages_11; + llvmPackages = pkgs.llvmPackages_12; minimal = true; }; @@ -98,8 +98,8 @@ in { # https://github.com/xattr/xattr/issues/44 and # https://github.com/xattr/xattr/issues/55 are solved. inherit (buildPackages.darwin) xattr autoSignDarwinBinariesHook; - buildLlvmPackages = buildPackages.llvmPackages_9; - llvmPackages = pkgs.llvmPackages_9; + buildLlvmPackages = buildPackages.llvmPackages_12; + llvmPackages = pkgs.llvmPackages_12; }; ghc901 = callPackage ../development/compilers/ghc/9.0.1.nix { bootPkgs = @@ -126,8 +126,8 @@ in { # https://github.com/xattr/xattr/issues/44 and # https://github.com/xattr/xattr/issues/55 are solved. inherit (buildPackages.darwin) xattr autoSignDarwinBinariesHook; - buildLlvmPackages = buildPackages.llvmPackages_10; - llvmPackages = pkgs.llvmPackages_10; + buildLlvmPackages = buildPackages.llvmPackages_12; + llvmPackages = pkgs.llvmPackages_12; }; ghcHEAD = callPackage ../development/compilers/ghc/head.nix { bootPkgs = packages.ghc8107Binary; @@ -136,8 +136,8 @@ in { # https://github.com/xattr/xattr/issues/44 and # https://github.com/xattr/xattr/issues/55 are solved. inherit (buildPackages.darwin) xattr autoSignDarwinBinariesHook; - buildLlvmPackages = buildPackages.llvmPackages_10; - llvmPackages = pkgs.llvmPackages_10; + buildLlvmPackages = buildPackages.llvmPackages_12; + llvmPackages = pkgs.llvmPackages_12; libffi = pkgs.libffi; }; From b9f15821064edcb61d9c5e06285fbbde775edeb9 Mon Sep 17 00:00:00 2001 From: sternenseemann Date: Wed, 24 Nov 2021 13:28:28 +0100 Subject: [PATCH 14/43] haskell.compiler.ghc865Binary: remove aarch64-linux from platforms GHC 8.6.5 will always segfault on aarch64-linux and at this point it's not realistic we'll ever fix this. --- pkgs/development/compilers/ghc/8.6.5-binary.nix | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/pkgs/development/compilers/ghc/8.6.5-binary.nix b/pkgs/development/compilers/ghc/8.6.5-binary.nix index 5b52f0e4cdd9..e8ae6761be8d 100644 --- a/pkgs/development/compilers/ghc/8.6.5-binary.nix +++ b/pkgs/development/compilers/ghc/8.6.5-binary.nix @@ -189,8 +189,7 @@ stdenv.mkDerivation rec { meta = rec { license = lib.licenses.bsd3; - platforms = ["x86_64-linux" "aarch64-linux" "i686-linux" "x86_64-darwin"]; - hydraPlatforms = builtins.filter (p: p != "aarch64-linux") platforms; + platforms = ["x86_64-linux" "i686-linux" "x86_64-darwin"]; # build segfaults, use ghc8102Binary which has proper musl support instead broken = stdenv.hostPlatform.isMusl; maintainers = with lib.maintainers; [ From 55b8d8c1bfd055f7efecf175fb7e528b193d2762 Mon Sep 17 00:00:00 2001 From: sternenseemann Date: Wed, 24 Nov 2021 15:12:36 +0100 Subject: [PATCH 15/43] haskell.compiler.ghc884: re-enable aarch64-linux Since we inherit the platform list from the bootstrap GHC, we get differing lists depending on which platform we evaluate the platform list on (depending on whether 8.10.2 or 8.6.5 is used). This leads to Hydra thinking aarch64-linux is not supported as it evaluates on x86_64-linux usually. --- pkgs/development/compilers/ghc/8.8.4.nix | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/pkgs/development/compilers/ghc/8.8.4.nix b/pkgs/development/compilers/ghc/8.8.4.nix index 1d31ffba4111..c5be8bb84376 100644 --- a/pkgs/development/compilers/ghc/8.8.4.nix +++ b/pkgs/development/compilers/ghc/8.8.4.nix @@ -345,7 +345,10 @@ stdenv.mkDerivation (rec { guibou ] ++ lib.teams.haskell.members; timeout = 24 * 3600; - inherit (ghc.meta) license platforms; + inherit (ghc.meta) license; + # hardcode platforms because the bootstrap GHC differs depending on the platform, + # with differing platforms available for each of them + platforms = ["x86_64-linux" "aarch64-linux" "i686-linux" "x86_64-darwin"]; # integer-simple builds are broken with musl when bootstrapping using # GHC 8.10.2 and below, however it is not possible to reverse bootstrap # GHC 8.8.4 with GHC 8.10.7. From b2c2215f606426a8bc8368b344f14a5123f14f3c Mon Sep 17 00:00:00 2001 From: sternenseemann Date: Wed, 24 Nov 2021 17:07:57 +0100 Subject: [PATCH 16/43] pkgsMusl.haskell.compiler.ghc884: return accurate platforms --- pkgs/development/compilers/ghc/8.8.4.nix | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/pkgs/development/compilers/ghc/8.8.4.nix b/pkgs/development/compilers/ghc/8.8.4.nix index c5be8bb84376..3903b414b09c 100644 --- a/pkgs/development/compilers/ghc/8.8.4.nix +++ b/pkgs/development/compilers/ghc/8.8.4.nix @@ -347,8 +347,15 @@ stdenv.mkDerivation (rec { timeout = 24 * 3600; inherit (ghc.meta) license; # hardcode platforms because the bootstrap GHC differs depending on the platform, - # with differing platforms available for each of them - platforms = ["x86_64-linux" "aarch64-linux" "i686-linux" "x86_64-darwin"]; + # with differing platforms available for each of them; See HACK comment in + # 8.10.2-binary.nix for an explanation of the musl special casing. + platforms = [ + "x86_64-linux" + ] ++ lib.optionals (!hostPlatform.isMusl) [ + "i686-linux" + "aarch64-linux" + "x86_64-darwin" + ]; # integer-simple builds are broken with musl when bootstrapping using # GHC 8.10.2 and below, however it is not possible to reverse bootstrap # GHC 8.8.4 with GHC 8.10.7. From 579bc49e9485b337b0b13671fc3e368c6c93483b Mon Sep 17 00:00:00 2001 From: sternenseemann Date: Thu, 25 Nov 2021 13:44:50 +0100 Subject: [PATCH 17/43] haskell.compiler.ghc*Binary: don't propagate LLVM, use wrapper Copy the approach from the normal GHC derivations for adding an `export PATH` into the scripts in `$out/bin` and use it to put the specific LLVM version of the binary GHC into its PATH. This will prevent the LLVM version of the GHC we are building later to take precedence over the LLVM version this GHC needs. --- pkgs/development/compilers/ghc/8.10.2-binary.nix | 16 ++++++++++++++-- pkgs/development/compilers/ghc/8.10.7-binary.nix | 16 +++++++++++++--- pkgs/development/compilers/ghc/8.6.5-binary.nix | 14 +++++++++++++- 3 files changed, 40 insertions(+), 6 deletions(-) diff --git a/pkgs/development/compilers/ghc/8.10.2-binary.nix b/pkgs/development/compilers/ghc/8.10.2-binary.nix index 93ebca2b6c4a..d610e4bcd8cb 100644 --- a/pkgs/development/compilers/ghc/8.10.2-binary.nix +++ b/pkgs/development/compilers/ghc/8.10.2-binary.nix @@ -140,6 +140,10 @@ let libEnvVar = lib.optionalString stdenv.hostPlatform.isDarwin "DY" + "LD_LIBRARY_PATH"; + runtimeDeps = lib.optionals useLLVM [ + (lib.getBin llvmPackages.llvm) + ]; + in stdenv.mkDerivation rec { @@ -156,7 +160,6 @@ stdenv.mkDerivation rec { nativeBuildInputs = [ perl ]; propagatedBuildInputs = - lib.optionals useLLVM [ llvmPackages.llvm ] # Because musl bindists currently provide no way to tell where # libgmp is (see not [musl bindists have no .buildinfo]), we need # to propagate `gmp`, otherwise programs built by this ghc will @@ -177,7 +180,7 @@ stdenv.mkDerivation rec { # fixing the above-mentioned release issue, # and for GHC >= 9.* it is not clear as of writing whether that switch # will be made there too. - ++ lib.optionals stdenv.hostPlatform.isMusl [ gmp ]; # musl bindist needs this + lib.optionals stdenv.hostPlatform.isMusl [ gmp ]; # musl bindist needs this # Set LD_LIBRARY_PATH or equivalent so that the programs running as part # of the bindist installer can find the libraries they expect. @@ -278,6 +281,15 @@ stdenv.mkDerivation rec { # calls install-strip ... dontBuild = true; + # Patch scripts to include runtime dependencies in $PATH. + postInstall = '' + for i in "$out/bin/"*; do + test ! -h "$i" || continue + isScript "$i" || continue + sed -i -e '2i export PATH="${lib.makeBinPath runtimeDeps}:$PATH"' "$i" + done + ''; + # Apparently necessary for the ghc Alpine (musl) bindist: # When we strip, and then run the # patchelf --set-rpath "${libPath}:$(patchelf --print-rpath $p)" $p diff --git a/pkgs/development/compilers/ghc/8.10.7-binary.nix b/pkgs/development/compilers/ghc/8.10.7-binary.nix index a8ec751d2d24..b8164ae9f6f3 100644 --- a/pkgs/development/compilers/ghc/8.10.7-binary.nix +++ b/pkgs/development/compilers/ghc/8.10.7-binary.nix @@ -155,6 +155,10 @@ let libEnvVar = lib.optionalString stdenv.hostPlatform.isDarwin "DY" + "LD_LIBRARY_PATH"; + runtimeDeps = lib.optionals useLLVM [ + (lib.getBin llvmPackages.llvm) + ]; + in stdenv.mkDerivation rec { @@ -175,9 +179,6 @@ stdenv.mkDerivation rec { # and update this comment accordingly. nativeBuildInputs = [ perl ]; - propagatedBuildInputs = - lib.optionals useLLVM [ llvmPackages.llvm ] - ; # Set LD_LIBRARY_PATH or equivalent so that the programs running as part # of the bindist installer can find the libraries they expect. @@ -278,6 +279,15 @@ stdenv.mkDerivation rec { # calls install-strip ... dontBuild = true; + # Patch scripts to include runtime dependencies in $PATH. + postInstall = '' + for i in "$out/bin/"*; do + test ! -h "$i" || continue + isScript "$i" || continue + sed -i -e '2i export PATH="${lib.makeBinPath runtimeDeps}:$PATH"' "$i" + done + ''; + # Apparently necessary for the ghc Alpine (musl) bindist: # When we strip, and then run the # patchelf --set-rpath "${libPath}:$(patchelf --print-rpath $p)" $p diff --git a/pkgs/development/compilers/ghc/8.6.5-binary.nix b/pkgs/development/compilers/ghc/8.6.5-binary.nix index e8ae6761be8d..95b381b955fd 100644 --- a/pkgs/development/compilers/ghc/8.6.5-binary.nix +++ b/pkgs/development/compilers/ghc/8.6.5-binary.nix @@ -30,6 +30,10 @@ let downloadsUrl = "https://downloads.haskell.org/ghc"; + runtimeDeps = lib.optionals useLLVM [ + (lib.getBin llvmPackages.llvm) + ]; + in stdenv.mkDerivation rec { @@ -62,7 +66,6 @@ stdenv.mkDerivation rec { or (throw "cannot bootstrap GHC on this platform")); nativeBuildInputs = [ perl ]; - propagatedBuildInputs = lib.optionals useLLVM [ llvmPackages.llvm ]; # Cannot patchelf beforehand due to relative RPATHs that anticipate # the final install location/ @@ -130,6 +133,15 @@ stdenv.mkDerivation rec { # calls install-strip ... dontBuild = true; + # Patch scripts to include runtime dependencies in $PATH. + postInstall = '' + for i in "$out/bin/"*; do + test ! -h "$i" || continue + isScript "$i" || continue + sed -i -e '2i export PATH="${lib.makeBinPath runtimeDeps}:$PATH"' "$i" + done + ''; + # On Linux, use patchelf to modify the executables so that they can # find editline/gmp. postFixup = lib.optionalString stdenv.isLinux '' From 5384a35a0c5198e224435b7295b3d273e645243d Mon Sep 17 00:00:00 2001 From: sternenseemann Date: Thu, 25 Nov 2021 13:52:57 +0100 Subject: [PATCH 18/43] haskell.compiler.ghc*Binary: add all missing runtimeDeps to PATH This brings the binary GHCs on parity with the source built ones in terms of the wrapper. The upshot of this is that compiling something using the binary GHCs no longer depends on PATH being populated with the tools included in stdenv at all. We can even test this by running the installCheck with an empty environment (via `env -i`). --- .../compilers/ghc/8.10.2-binary.nix | 18 +++++++++++++++--- .../compilers/ghc/8.10.7-binary.nix | 16 +++++++++++++--- .../development/compilers/ghc/8.6.5-binary.nix | 16 +++++++++++++--- 3 files changed, 41 insertions(+), 9 deletions(-) diff --git a/pkgs/development/compilers/ghc/8.10.2-binary.nix b/pkgs/development/compilers/ghc/8.10.2-binary.nix index d610e4bcd8cb..a29a5b0b5ab6 100644 --- a/pkgs/development/compilers/ghc/8.10.2-binary.nix +++ b/pkgs/development/compilers/ghc/8.10.2-binary.nix @@ -3,6 +3,8 @@ , ncurses5 , ncurses6, gmp, libiconv, numactl , llvmPackages +, coreutils +, targetPackages # minimal = true; will remove files that aren't strictly necessary for # regular builds and GHC bootstrapping. @@ -140,8 +142,17 @@ let libEnvVar = lib.optionalString stdenv.hostPlatform.isDarwin "DY" + "LD_LIBRARY_PATH"; - runtimeDeps = lib.optionals useLLVM [ + runtimeDeps = [ + targetPackages.stdenv.cc + targetPackages.stdenv.cc.bintools + coreutils # for cat + ] + ++ lib.optionals useLLVM [ (lib.getBin llvmPackages.llvm) + ] + # On darwin, we need unwrapped bintools as well (for otool) + ++ lib.optionals (stdenv.targetPlatform.linker == "cctools") [ + targetPackages.stdenv.cc.bintools.bintools ]; in @@ -372,7 +383,6 @@ stdenv.mkDerivation rec { doInstallCheck = true; installCheckPhase = '' - unset ${libEnvVar} # Sanity check, can ghc create executables? cd $TMP mkdir test-ghc; cd test-ghc @@ -381,7 +391,9 @@ stdenv.mkDerivation rec { module Main where main = putStrLn \$([|"yes"|]) EOF - $out/bin/ghc --make main.hs || exit 1 + # can't use env -i here because otherwise we don't find -lgmp on musl + env ${libEnvVar}= PATH= \ + $out/bin/ghc --make main.hs || exit 1 echo compilation ok [ $(./main) == "yes" ] ''; diff --git a/pkgs/development/compilers/ghc/8.10.7-binary.nix b/pkgs/development/compilers/ghc/8.10.7-binary.nix index b8164ae9f6f3..7b10f60affda 100644 --- a/pkgs/development/compilers/ghc/8.10.7-binary.nix +++ b/pkgs/development/compilers/ghc/8.10.7-binary.nix @@ -3,6 +3,8 @@ , ncurses5 , ncurses6, gmp, libiconv, numactl , llvmPackages +, coreutils +, targetPackages # minimal = true; will remove files that aren't strictly necessary for # regular builds and GHC bootstrapping. @@ -155,8 +157,17 @@ let libEnvVar = lib.optionalString stdenv.hostPlatform.isDarwin "DY" + "LD_LIBRARY_PATH"; - runtimeDeps = lib.optionals useLLVM [ + runtimeDeps = [ + targetPackages.stdenv.cc + targetPackages.stdenv.cc.bintools + coreutils # for cat + ] + ++ lib.optionals useLLVM [ (lib.getBin llvmPackages.llvm) + ] + # On darwin, we need unwrapped bintools as well (for otool) + ++ lib.optionals (stdenv.targetPlatform.linker == "cctools") [ + targetPackages.stdenv.cc.bintools.bintools ]; in @@ -370,7 +381,6 @@ stdenv.mkDerivation rec { doInstallCheck = true; installCheckPhase = '' - unset ${libEnvVar} # Sanity check, can ghc create executables? cd $TMP mkdir test-ghc; cd test-ghc @@ -379,7 +389,7 @@ stdenv.mkDerivation rec { module Main where main = putStrLn \$([|"yes"|]) EOF - $out/bin/ghc --make main.hs || exit 1 + env -i $out/bin/ghc --make main.hs || exit 1 echo compilation ok [ $(./main) == "yes" ] ''; diff --git a/pkgs/development/compilers/ghc/8.6.5-binary.nix b/pkgs/development/compilers/ghc/8.6.5-binary.nix index 95b381b955fd..22bfae79c0ce 100644 --- a/pkgs/development/compilers/ghc/8.6.5-binary.nix +++ b/pkgs/development/compilers/ghc/8.6.5-binary.nix @@ -2,6 +2,8 @@ , fetchurl, perl, gcc , ncurses5, ncurses6, gmp, glibc, libiconv , llvmPackages +, coreutils +, targetPackages }: # Prebuilt only does native @@ -30,8 +32,17 @@ let downloadsUrl = "https://downloads.haskell.org/ghc"; - runtimeDeps = lib.optionals useLLVM [ + runtimeDeps = [ + targetPackages.stdenv.cc + targetPackages.stdenv.cc.bintools + coreutils # for cat + ] + ++ lib.optionals useLLVM [ (lib.getBin llvmPackages.llvm) + ] + # On darwin, we need unwrapped bintools as well (for otool) + ++ lib.optionals (stdenv.targetPlatform.linker == "cctools") [ + targetPackages.stdenv.cc.bintools.bintools ]; in @@ -175,7 +186,6 @@ stdenv.mkDerivation rec { doInstallCheck = true; installCheckPhase = '' - unset ${libEnvVar} # Sanity check, can ghc create executables? cd $TMP mkdir test-ghc; cd test-ghc @@ -184,7 +194,7 @@ stdenv.mkDerivation rec { module Main where main = putStrLn \$([|"yes"|]) EOF - $out/bin/ghc --make main.hs || exit 1 + env -i $out/bin/ghc --make main.hs || exit 1 echo compilation ok [ $(./main) == "yes" ] ''; From 035f20bc6bf809c7be9bb5b6d4dd19b0a2df9d17 Mon Sep 17 00:00:00 2001 From: sternenseemann Date: Thu, 25 Nov 2021 13:12:40 +0100 Subject: [PATCH 19/43] haskell.compiler.*: prefix PATH with runtimeDeps This will prevent freak accidents where the wrong tools are used because they are in PATH by chance. --- pkgs/development/compilers/ghc/8.10.7.nix | 6 +++--- pkgs/development/compilers/ghc/8.8.4.nix | 6 +++--- pkgs/development/compilers/ghc/9.0.1.nix | 6 +++--- pkgs/development/compilers/ghc/9.2.1.nix | 6 +++--- pkgs/development/compilers/ghc/head.nix | 6 +++--- 5 files changed, 15 insertions(+), 15 deletions(-) diff --git a/pkgs/development/compilers/ghc/8.10.7.nix b/pkgs/development/compilers/ghc/8.10.7.nix index f0c57f7fae8b..9cf459f45167 100644 --- a/pkgs/development/compilers/ghc/8.10.7.nix +++ b/pkgs/development/compilers/ghc/8.10.7.nix @@ -134,7 +134,7 @@ let runtimeDeps = [ targetPackages.stdenv.cc.bintools - coreutils + coreutils # for cat ] # On darwin, we need unwrapped bintools as well (for otool) ++ lib.optionals (stdenv.targetPlatform.linker == "cctools") [ @@ -321,11 +321,11 @@ stdenv.mkDerivation (rec { # Install the bash completion file. install -D -m 444 utils/completion/ghc.bash $out/share/bash-completion/completions/${targetPrefix}ghc - # Patch scripts to include "readelf" and "cat" in $PATH. + # Patch scripts to include runtime dependencies in $PATH. for i in "$out/bin/"*; do test ! -h $i || continue egrep --quiet '^#!' <(head -n 1 $i) || continue - sed -i -e '2i export PATH="$PATH:${lib.makeBinPath runtimeDeps}"' $i + sed -i -e '2i export PATH="${lib.makeBinPath runtimeDeps}:$PATH"' $i done ''; diff --git a/pkgs/development/compilers/ghc/8.8.4.nix b/pkgs/development/compilers/ghc/8.8.4.nix index e0f6c84637b2..069657808a35 100644 --- a/pkgs/development/compilers/ghc/8.8.4.nix +++ b/pkgs/development/compilers/ghc/8.8.4.nix @@ -142,7 +142,7 @@ let runtimeDeps = [ targetPackages.stdenv.cc.bintools - coreutils + coreutils # for cat ] # On darwin, we need unwrapped bintools as well (for otool) ++ lib.optionals (stdenv.targetPlatform.linker == "cctools") [ @@ -320,11 +320,11 @@ stdenv.mkDerivation (rec { # Install the bash completion file. install -D -m 444 utils/completion/ghc.bash $out/share/bash-completion/completions/${targetPrefix}ghc - # Patch scripts to include "readelf" and "cat" in $PATH. + # Patch scripts to include runtime dependencies in $PATH. for i in "$out/bin/"*; do test ! -h $i || continue egrep --quiet '^#!' <(head -n 1 $i) || continue - sed -i -e '2i export PATH="$PATH:${lib.makeBinPath runtimeDeps}"' $i + sed -i -e '2i export PATH="${lib.makeBinPath runtimeDeps}:$PATH"' $i done ''; diff --git a/pkgs/development/compilers/ghc/9.0.1.nix b/pkgs/development/compilers/ghc/9.0.1.nix index 005333a8d83e..3f2ea4dedca5 100644 --- a/pkgs/development/compilers/ghc/9.0.1.nix +++ b/pkgs/development/compilers/ghc/9.0.1.nix @@ -129,7 +129,7 @@ let runtimeDeps = [ targetPackages.stdenv.cc.bintools - coreutils + coreutils # for cat ] # On darwin, we need unwrapped bintools as well (for otool) ++ lib.optionals (stdenv.targetPlatform.linker == "cctools") [ @@ -286,11 +286,11 @@ stdenv.mkDerivation (rec { # Install the bash completion file. install -D -m 444 utils/completion/ghc.bash $out/share/bash-completion/completions/${targetPrefix}ghc - # Patch scripts to include "readelf" and "cat" in $PATH. + # Patch scripts to include runtime dependencies in $PATH. for i in "$out/bin/"*; do test ! -h $i || continue egrep --quiet '^#!' <(head -n 1 $i) || continue - sed -i -e '2i export PATH="$PATH:${lib.makeBinPath runtimeDeps}"' $i + sed -i -e '2i export PATH="${lib.makeBinPath runtimeDeps}:$PATH"' $i done ''; diff --git a/pkgs/development/compilers/ghc/9.2.1.nix b/pkgs/development/compilers/ghc/9.2.1.nix index 2ebbdc63ac93..d1c69e5c4633 100644 --- a/pkgs/development/compilers/ghc/9.2.1.nix +++ b/pkgs/development/compilers/ghc/9.2.1.nix @@ -128,7 +128,7 @@ let runtimeDeps = [ targetPackages.stdenv.cc.bintools - coreutils + coreutils # for cat ] # On darwin, we need unwrapped bintools as well (for otool) ++ lib.optionals (stdenv.targetPlatform.linker == "cctools") [ @@ -289,11 +289,11 @@ stdenv.mkDerivation (rec { # Install the bash completion file. install -D -m 444 utils/completion/ghc.bash $out/share/bash-completion/completions/${targetPrefix}ghc - # Patch scripts to include "readelf" and "cat" in $PATH. + # Patch scripts to include runtime dependencies in $PATH. for i in "$out/bin/"*; do test ! -h $i || continue egrep --quiet '^#!' <(head -n 1 $i) || continue - sed -i -e '2i export PATH="$PATH:${lib.makeBinPath runtimeDeps}"' $i + sed -i -e '2i export PATH="${lib.makeBinPath runtimeDeps}:$PATH"' $i done ''; diff --git a/pkgs/development/compilers/ghc/head.nix b/pkgs/development/compilers/ghc/head.nix index f50b3b76e15d..50bd9527093b 100644 --- a/pkgs/development/compilers/ghc/head.nix +++ b/pkgs/development/compilers/ghc/head.nix @@ -142,7 +142,7 @@ let runtimeDeps = [ targetPackages.stdenv.cc.bintools - coreutils + coreutils # for cat ] # On darwin, we need unwrapped bintools as well (for otool) ++ lib.optionals (stdenv.targetPlatform.linker == "cctools") [ @@ -309,11 +309,11 @@ stdenv.mkDerivation (rec { # Install the bash completion file. install -D -m 444 utils/completion/ghc.bash $out/share/bash-completion/completions/${targetPrefix}ghc - # Patch scripts to include "readelf" and "cat" in $PATH. + # Patch scripts to include runtime dependencies in $PATH. for i in "$out/bin/"*; do test ! -h $i || continue egrep --quiet '^#!' <(head -n 1 $i) || continue - sed -i -e '2i export PATH="$PATH:${lib.makeBinPath runtimeDeps}"' $i + sed -i -e '2i export PATH="${lib.makeBinPath runtimeDeps}:$PATH"' $i done ''; From f5c3b6523cab9861a343b1f49081205d799695c6 Mon Sep 17 00:00:00 2001 From: sternenseemann Date: Thu, 25 Nov 2021 13:58:06 +0100 Subject: [PATCH 20/43] haskell.compiler.*: move propagatedBuildInputs into runtimeDeps This has two main benefits: * GHC will work reliably outside of stdenv, even when using -fllvm since everything it'll call at runtime will be provided in PATH via the wrapper scripts. * LLVM will no longer leak into haskell packages' configure scripts. This was an issue with llvm-hs which fails to build if the LLVM version of the compiler since the propagatedBuildInputs of GHC take precedence over the nativeBuildInputs added in the derivation. --- pkgs/development/compilers/ghc/8.10.7.nix | 9 ++++++--- pkgs/development/compilers/ghc/8.8.4.nix | 9 ++++++--- pkgs/development/compilers/ghc/9.0.1.nix | 9 ++++++--- pkgs/development/compilers/ghc/9.2.1.nix | 9 ++++++--- pkgs/development/compilers/ghc/head.nix | 9 ++++++--- 5 files changed, 30 insertions(+), 15 deletions(-) diff --git a/pkgs/development/compilers/ghc/8.10.7.nix b/pkgs/development/compilers/ghc/8.10.7.nix index 9cf459f45167..f2f1bfc64e14 100644 --- a/pkgs/development/compilers/ghc/8.10.7.nix +++ b/pkgs/development/compilers/ghc/8.10.7.nix @@ -132,9 +132,15 @@ let useLdGold = targetPlatform.linker == "gold" || (targetPlatform.linker == "bfd" && (targetPackages.stdenv.cc.bintools.bintools.hasGold or false) && !targetPlatform.isMusl); + # Tools GHC will need to call at runtime. Some of these were handled using + # propagatedBuildInputs before, however this allowed for GHC environment and + # a derivations build environment to interfere, especially when GHC is built. runtimeDeps = [ + targetPackages.stdenv.cc targetPackages.stdenv.cc.bintools coreutils # for cat + ] ++ lib.optionals useLLVM [ + (lib.getBin llvmPackages.llvm) ] # On darwin, we need unwrapped bintools as well (for otool) ++ lib.optionals (stdenv.targetPlatform.linker == "cctools") [ @@ -290,9 +296,6 @@ stdenv.mkDerivation (rec { buildInputs = [ perl bash ] ++ (libDeps hostPlatform); - propagatedBuildInputs = [ targetPackages.stdenv.cc ] - ++ lib.optional useLLVM llvmPackages.llvm; - depsTargetTarget = map lib.getDev (libDeps targetPlatform); depsTargetTargetPropagated = map (lib.getOutput "out") (libDeps targetPlatform); diff --git a/pkgs/development/compilers/ghc/8.8.4.nix b/pkgs/development/compilers/ghc/8.8.4.nix index 069657808a35..44d8d33fecc4 100644 --- a/pkgs/development/compilers/ghc/8.8.4.nix +++ b/pkgs/development/compilers/ghc/8.8.4.nix @@ -140,9 +140,15 @@ let useLdGold = targetPlatform.linker == "gold" || (targetPlatform.linker == "bfd" && (targetPackages.stdenv.cc.bintools.bintools.hasGold or false) && !targetPlatform.isMusl); + # Tools GHC will need to call at runtime. Some of these were handled using + # propagatedBuildInputs before, however this allowed for GHC environment and + # a derivations build environment to interfere, especially when GHC is built. runtimeDeps = [ + targetPackages.stdenv.cc targetPackages.stdenv.cc.bintools coreutils # for cat + ] ++ lib.optionals useLLVM [ + (lib.getBin llvmPackages.llvm) ] # On darwin, we need unwrapped bintools as well (for otool) ++ lib.optionals (stdenv.targetPlatform.linker == "cctools") [ @@ -293,9 +299,6 @@ stdenv.mkDerivation (rec { buildInputs = [ perl bash ] ++ (libDeps hostPlatform); - propagatedBuildInputs = [ targetPackages.stdenv.cc ] - ++ lib.optional useLLVM llvmPackages.llvm; - depsTargetTarget = map lib.getDev (libDeps targetPlatform); depsTargetTargetPropagated = map (lib.getOutput "out") (libDeps targetPlatform); diff --git a/pkgs/development/compilers/ghc/9.0.1.nix b/pkgs/development/compilers/ghc/9.0.1.nix index 3f2ea4dedca5..a778fda31a73 100644 --- a/pkgs/development/compilers/ghc/9.0.1.nix +++ b/pkgs/development/compilers/ghc/9.0.1.nix @@ -127,9 +127,15 @@ let useLdGold = targetPlatform.linker == "gold" || (targetPlatform.linker == "bfd" && (targetPackages.stdenv.cc.bintools.bintools.hasGold or false) && !targetPlatform.isMusl); + # Tools GHC will need to call at runtime. Some of these were handled using + # propagatedBuildInputs before, however this allowed for GHC environment and + # a derivations build environment to interfere, especially when GHC is built. runtimeDeps = [ + targetPackages.stdenv.cc targetPackages.stdenv.cc.bintools coreutils # for cat + ] ++ lib.optionals useLLVM [ + (lib.getBin llvmPackages.llvm) ] # On darwin, we need unwrapped bintools as well (for otool) ++ lib.optionals (stdenv.targetPlatform.linker == "cctools") [ @@ -255,9 +261,6 @@ stdenv.mkDerivation (rec { buildInputs = [ perl bash ] ++ (libDeps hostPlatform); - propagatedBuildInputs = [ targetPackages.stdenv.cc ] - ++ lib.optional useLLVM llvmPackages.llvm; - depsTargetTarget = map lib.getDev (libDeps targetPlatform); depsTargetTargetPropagated = map (lib.getOutput "out") (libDeps targetPlatform); diff --git a/pkgs/development/compilers/ghc/9.2.1.nix b/pkgs/development/compilers/ghc/9.2.1.nix index d1c69e5c4633..5442a423bdd0 100644 --- a/pkgs/development/compilers/ghc/9.2.1.nix +++ b/pkgs/development/compilers/ghc/9.2.1.nix @@ -126,9 +126,15 @@ let # see #84670 and #49071 for more background. useLdGold = targetPlatform.linker == "gold" || (targetPlatform.linker == "bfd" && !targetPlatform.isMusl); + # Tools GHC will need to call at runtime. Some of these were handled using + # propagatedBuildInputs before, however this allowed for GHC environment and + # a derivations build environment to interfere, especially when GHC is built. runtimeDeps = [ + targetPackages.stdenv.cc targetPackages.stdenv.cc.bintools coreutils # for cat + ] ++ lib.optionals useLLVM [ + (lib.getBin llvmPackages.llvm) ] # On darwin, we need unwrapped bintools as well (for otool) ++ lib.optionals (stdenv.targetPlatform.linker == "cctools") [ @@ -258,9 +264,6 @@ stdenv.mkDerivation (rec { buildInputs = [ perl bash ] ++ (libDeps hostPlatform); - propagatedBuildInputs = [ targetPackages.stdenv.cc ] - ++ lib.optional useLLVM llvmPackages.llvm; - depsTargetTarget = map lib.getDev (libDeps targetPlatform); depsTargetTargetPropagated = map (lib.getOutput "out") (libDeps targetPlatform); diff --git a/pkgs/development/compilers/ghc/head.nix b/pkgs/development/compilers/ghc/head.nix index 50bd9527093b..40dbe131f9dd 100644 --- a/pkgs/development/compilers/ghc/head.nix +++ b/pkgs/development/compilers/ghc/head.nix @@ -140,9 +140,15 @@ let useLdGold = targetPlatform.linker == "gold" || (targetPlatform.linker == "bfd" && (targetPackages.stdenv.cc.bintools.bintools.hasGold or false) && !targetPlatform.isMusl); + # Tools GHC will need to call at runtime. Some of these were handled using + # propagatedBuildInputs before, however this allowed for GHC environment and + # a derivations build environment to interfere, especially when GHC is built. runtimeDeps = [ + targetPackages.stdenv.cc targetPackages.stdenv.cc.bintools coreutils # for cat + ] ++ lib.optionals useLLVM [ + (lib.getBin llvmPackages.llvm) ] # On darwin, we need unwrapped bintools as well (for otool) ++ lib.optionals (stdenv.targetPlatform.linker == "cctools") [ @@ -278,9 +284,6 @@ stdenv.mkDerivation (rec { buildInputs = [ perl bash ] ++ (libDeps hostPlatform); - propagatedBuildInputs = [ targetPackages.stdenv.cc ] - ++ lib.optional useLLVM llvmPackages.llvm; - depsTargetTarget = map lib.getDev (libDeps targetPlatform); depsTargetTargetPropagated = map (lib.getOutput "out") (libDeps targetPlatform); From a7c564596e195cf9aa46ad2762f78e4d9cc9789b Mon Sep 17 00:00:00 2001 From: sternenseemann Date: Thu, 25 Nov 2021 14:06:35 +0100 Subject: [PATCH 21/43] haskell.compiler.*: use `isScript` over grepping for `#!` --- pkgs/development/compilers/ghc/8.10.7.nix | 6 +++--- pkgs/development/compilers/ghc/8.8.4.nix | 6 +++--- pkgs/development/compilers/ghc/9.0.1.nix | 6 +++--- pkgs/development/compilers/ghc/9.2.1.nix | 6 +++--- pkgs/development/compilers/ghc/head.nix | 6 +++--- 5 files changed, 15 insertions(+), 15 deletions(-) diff --git a/pkgs/development/compilers/ghc/8.10.7.nix b/pkgs/development/compilers/ghc/8.10.7.nix index f2f1bfc64e14..bfcd53141fa0 100644 --- a/pkgs/development/compilers/ghc/8.10.7.nix +++ b/pkgs/development/compilers/ghc/8.10.7.nix @@ -326,9 +326,9 @@ stdenv.mkDerivation (rec { # Patch scripts to include runtime dependencies in $PATH. for i in "$out/bin/"*; do - test ! -h $i || continue - egrep --quiet '^#!' <(head -n 1 $i) || continue - sed -i -e '2i export PATH="${lib.makeBinPath runtimeDeps}:$PATH"' $i + test ! -h "$i" || continue + isScript "$i" || continue + sed -i -e '2i export PATH="${lib.makeBinPath runtimeDeps}:$PATH"' "$i" done ''; diff --git a/pkgs/development/compilers/ghc/8.8.4.nix b/pkgs/development/compilers/ghc/8.8.4.nix index 44d8d33fecc4..c3efc2f2a7ba 100644 --- a/pkgs/development/compilers/ghc/8.8.4.nix +++ b/pkgs/development/compilers/ghc/8.8.4.nix @@ -325,9 +325,9 @@ stdenv.mkDerivation (rec { # Patch scripts to include runtime dependencies in $PATH. for i in "$out/bin/"*; do - test ! -h $i || continue - egrep --quiet '^#!' <(head -n 1 $i) || continue - sed -i -e '2i export PATH="${lib.makeBinPath runtimeDeps}:$PATH"' $i + test ! -h "$i" || continue + isScript "$i" || continue + sed -i -e '2i export PATH="${lib.makeBinPath runtimeDeps}:$PATH"' "$i" done ''; diff --git a/pkgs/development/compilers/ghc/9.0.1.nix b/pkgs/development/compilers/ghc/9.0.1.nix index a778fda31a73..e7da05871070 100644 --- a/pkgs/development/compilers/ghc/9.0.1.nix +++ b/pkgs/development/compilers/ghc/9.0.1.nix @@ -291,9 +291,9 @@ stdenv.mkDerivation (rec { # Patch scripts to include runtime dependencies in $PATH. for i in "$out/bin/"*; do - test ! -h $i || continue - egrep --quiet '^#!' <(head -n 1 $i) || continue - sed -i -e '2i export PATH="${lib.makeBinPath runtimeDeps}:$PATH"' $i + test ! -h "$i" || continue + isScript "$i" || continue + sed -i -e '2i export PATH="${lib.makeBinPath runtimeDeps}:$PATH"' "$i" done ''; diff --git a/pkgs/development/compilers/ghc/9.2.1.nix b/pkgs/development/compilers/ghc/9.2.1.nix index 5442a423bdd0..78dbdb617e64 100644 --- a/pkgs/development/compilers/ghc/9.2.1.nix +++ b/pkgs/development/compilers/ghc/9.2.1.nix @@ -294,9 +294,9 @@ stdenv.mkDerivation (rec { # Patch scripts to include runtime dependencies in $PATH. for i in "$out/bin/"*; do - test ! -h $i || continue - egrep --quiet '^#!' <(head -n 1 $i) || continue - sed -i -e '2i export PATH="${lib.makeBinPath runtimeDeps}:$PATH"' $i + test ! -h "$i" || continue + isScript "$i" || continue + sed -i -e '2i export PATH="${lib.makeBinPath runtimeDeps}:$PATH"' "$i" done ''; diff --git a/pkgs/development/compilers/ghc/head.nix b/pkgs/development/compilers/ghc/head.nix index 40dbe131f9dd..053c43649f3f 100644 --- a/pkgs/development/compilers/ghc/head.nix +++ b/pkgs/development/compilers/ghc/head.nix @@ -314,9 +314,9 @@ stdenv.mkDerivation (rec { # Patch scripts to include runtime dependencies in $PATH. for i in "$out/bin/"*; do - test ! -h $i || continue - egrep --quiet '^#!' <(head -n 1 $i) || continue - sed -i -e '2i export PATH="${lib.makeBinPath runtimeDeps}:$PATH"' $i + test ! -h "$i" || continue + isScript "$i" || continue + sed -i -e '2i export PATH="${lib.makeBinPath runtimeDeps}:$PATH"' "$i" done ''; From 50f256f5efb8ec79a76c5de0c4d37d84643a98e8 Mon Sep 17 00:00:00 2001 From: sternenseemann Date: Thu, 25 Nov 2021 17:14:21 +0100 Subject: [PATCH 22/43] ghcWithPackages: don't wrap GHC with LLVM unnecessarily Since GHC now will have LLVM available when needed, we don't need to add it in the wrapper anymore. It can still be added if NCG is available, but -fllvm should be used (e. g. to work around an NCG bug). --- .../haskell-modules/with-packages-wrapper.nix | 14 ++++---------- 1 file changed, 4 insertions(+), 10 deletions(-) diff --git a/pkgs/development/haskell-modules/with-packages-wrapper.nix b/pkgs/development/haskell-modules/with-packages-wrapper.nix index f7bebbc4aa07..e5fe60a0ae5c 100644 --- a/pkgs/development/haskell-modules/with-packages-wrapper.nix +++ b/pkgs/development/haskell-modules/with-packages-wrapper.nix @@ -1,14 +1,8 @@ { lib, stdenv, ghc, llvmPackages, packages, symlinkJoin, makeWrapper -# Include LLVM by default if GHC doesn't have native code generation support -# See https://gitlab.haskell.org/ghc/ghc/-/wikis/platforms -, useLLVM ? !(lib.any lib.id ([ - stdenv.targetPlatform.isx86 - stdenv.targetPlatform.isPowerPC - stdenv.targetPlatform.isSparc - ] ++ lib.optionals (lib.versionAtLeast ghc.version "9.2") [ - (stdenv.targetPlatform.isAarch64 && stdenv.targetPlatform.isDarwin) - # TODO(@sternenseemann): Is armv7a supported for iOS? - ])) +# GHC will have LLVM available if necessary for the respective target, +# so useLLVM only needs to be changed if -fllvm is to be used for a +# platform that has NCG support +, useLLVM ? false , postBuild ? "" , ghcLibdir ? null # only used by ghcjs, when resolving plugins }: From ef081bf3056f3facd2a0b85b172c5c730a0404e8 Mon Sep 17 00:00:00 2001 From: sternenseemann Date: Thu, 25 Nov 2021 19:30:05 +0100 Subject: [PATCH 23/43] haskell.compiler.*: don't useLLVM if aarch64-darwin NCG is available aarch64-darwin NCG was added in 9.2.1 which makes it unnecessary to include LLVM in the wrapper. --- pkgs/development/compilers/ghc/9.2.1.nix | 3 ++- pkgs/development/compilers/ghc/head.nix | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/pkgs/development/compilers/ghc/9.2.1.nix b/pkgs/development/compilers/ghc/9.2.1.nix index 78dbdb617e64..2401a8900530 100644 --- a/pkgs/development/compilers/ghc/9.2.1.nix +++ b/pkgs/development/compilers/ghc/9.2.1.nix @@ -12,7 +12,8 @@ , # GHC can be built with system libffi or a bundled one. libffi ? null -, useLLVM ? !stdenv.targetPlatform.isx86 +, useLLVM ? !(stdenv.targetPlatform.isx86 + || (stdenv.targetPlatform.isAarch64 && stdenv.targetPlatform.isDarwin)) , # LLVM is conceptually a run-time-only depedendency, but for # non-x86, we need LLVM to bootstrap later stages, so it becomes a # build-time dependency too. diff --git a/pkgs/development/compilers/ghc/head.nix b/pkgs/development/compilers/ghc/head.nix index 053c43649f3f..5be02df13b4a 100644 --- a/pkgs/development/compilers/ghc/head.nix +++ b/pkgs/development/compilers/ghc/head.nix @@ -17,7 +17,8 @@ !stdenv.targetPlatform.isWindows , elfutils # for DWARF support -, useLLVM ? !stdenv.targetPlatform.isx86 || stdenv.targetPlatform.isiOS +, useLLVM ? !(stdenv.targetPlatform.isx86 + || (stdenv.targetPlatform.isAarch64 && stdenv.targetPlatform.isDarwin)) , # LLVM is conceptually a run-time-only depedendency, but for # non-x86, we need LLVM to bootstrap later stages, so it becomes a # build-time dependency too. From 558da925f33e1b4cb9469997175bf9bdd56586b0 Mon Sep 17 00:00:00 2001 From: sternenseemann Date: Wed, 24 Nov 2021 15:52:25 +0100 Subject: [PATCH 24/43] ghc: make sure top level exposed GHC is always host->target See the added comment in all-packages.nix for a more detailed explanation. This makes the top-level GHC different from haskellPackages.ghc (which is build->host and used for building the package set), but more consistent with gcc, gnat etc. Specifically, pkgsCross.${platform}.buildPackages.ghc will now be a cross-compiler instead of a native build->build compiler. Since this change has a slight chance of being disruptive, add a note to the changelog. --- .../from_md/release-notes/rl-2205.section.xml | 25 +++++++++++++++++-- .../manual/release-notes/rl-2205.section.md | 12 +++++++++ pkgs/top-level/all-packages.nix | 10 +++++++- 3 files changed, 44 insertions(+), 3 deletions(-) diff --git a/nixos/doc/manual/from_md/release-notes/rl-2205.section.xml b/nixos/doc/manual/from_md/release-notes/rl-2205.section.xml index 91c91dc0ab38..baefa0d369e5 100644 --- a/nixos/doc/manual/from_md/release-notes/rl-2205.section.xml +++ b/nixos/doc/manual/from_md/release-notes/rl-2205.section.xml @@ -24,8 +24,29 @@
Backward Incompatibilities - - + + + + pkgs.ghc now refers to + pkgs.targetPackages.haskellPackages.ghc. + This only makes a difference if you are + cross-compiling and will ensure that + pkgs.ghc always runs on the host platform + and compiles for the target platform (similar to + pkgs.gcc for example). + haskellPackages.ghc still behaves as + before, running on the build platform and compiling for the + host platform (similar to stdenv.cc). This + means you don’t have to adjust your derivations if you use + haskellPackages.callPackage, but when using + pkgs.callPackage and taking + ghc as an input, you should now use + buildPackages.ghc instead to ensure cross + compilation keeps working (or switch to + haskellPackages.callPackage). + + +
Other Notable Changes diff --git a/nixos/doc/manual/release-notes/rl-2205.section.md b/nixos/doc/manual/release-notes/rl-2205.section.md index b233d02fa568..a66e29bdb5f8 100644 --- a/nixos/doc/manual/release-notes/rl-2205.section.md +++ b/nixos/doc/manual/release-notes/rl-2205.section.md @@ -10,4 +10,16 @@ In addition to numerous new and upgraded packages, this release has the followin ## Backward Incompatibilities {#sec-release-22.05-incompatibilities} +* `pkgs.ghc` now refers to `pkgs.targetPackages.haskellPackages.ghc`. + This *only* makes a difference if you are cross-compiling and will + ensure that `pkgs.ghc` always runs on the host platform and compiles + for the target platform (similar to `pkgs.gcc` for example). + `haskellPackages.ghc` still behaves as before, running on the build + platform and compiling for the host platform (similar to `stdenv.cc`). + This means you don't have to adjust your derivations if you use + `haskellPackages.callPackage`, but when using `pkgs.callPackage` and + taking `ghc` as an input, you should now use `buildPackages.ghc` + instead to ensure cross compilation keeps working (or switch to + `haskellPackages.callPackage`). + ## Other Notable Changes {#sec-release-22.05-notable-changes} diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 7a85231790e0..f1c46938cf51 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -12066,7 +12066,15 @@ with pkgs; # current default compiler is”, if you bump this: haskellPackages = dontRecurseIntoAttrs haskell.packages.ghc8107; - inherit (haskellPackages) ghc; + # haskellPackages.ghc is build->host (it exposes the compiler used to build the + # set, similarly to stdenv.cc), but pkgs.ghc should be host->target to be more + # consistent with the gcc, gnat, clang etc. derivations + # + # We use targetPackages.haskellPackages.ghc if available since this also has + # the withPackages wrapper available. In the final cross-compiled package set + # however, targetPackages won't be populated, so we need to fall back to the + # plain, cross-compiled compiler (which is only theoretical at the moment). + ghc = targetPackages.haskellPackages.ghc or haskell.compiler.ghc8107; cabal-install = haskell.lib.compose.justStaticExecutables haskellPackages.cabal-install; From 17b8b5a4dc5a49d83d508cb66c6ac2f0bb9fa39b Mon Sep 17 00:00:00 2001 From: sternenseemann Date: Sat, 27 Nov 2021 12:09:31 +0100 Subject: [PATCH 25/43] haskell.compiler.*: pass runtime dependencies via configure script GHC can actually accept absolute paths for its runtime tools (except for touch) at configure time which are then saved in `$out/lib/ghc-${version}/settings`. This allows us to drop the wrapper entirely if we assume that a POSIX compliant touch is in PATH when we run GHC later. The touch problem can presumably be fixed by either patching the configure file of GHC (although we need to take care not to change the touch GHC uses during its compilation) or messing with the settings file after installation. The rationale for dropping the wrapper PATH entry completely is that it's always possible to invoke GHC via its library which will bypass the wrapper completely, leading to subtly different behavior. Binary GHCs are not touched in this commit, but ideally they'll get a similar treatment as well, so they are more robust, although we generally don't need to use them as a library. Note that GHC 8.8.4 doesn't care about install_name_tool or otool, so the respective environment variables are not set. --- pkgs/development/compilers/ghc/8.10.7.nix | 38 ++++++++++------------- pkgs/development/compilers/ghc/8.8.4.nix | 35 ++++++++------------- pkgs/development/compilers/ghc/9.0.1.nix | 38 ++++++++++------------- pkgs/development/compilers/ghc/9.2.1.nix | 38 ++++++++++------------- pkgs/development/compilers/ghc/head.nix | 38 ++++++++++------------- 5 files changed, 77 insertions(+), 110 deletions(-) diff --git a/pkgs/development/compilers/ghc/8.10.7.nix b/pkgs/development/compilers/ghc/8.10.7.nix index bfcd53141fa0..c8ea523be6a7 100644 --- a/pkgs/development/compilers/ghc/8.10.7.nix +++ b/pkgs/development/compilers/ghc/8.10.7.nix @@ -120,6 +120,8 @@ let ++ lib.optional (!enableIntegerSimple) gmp ++ lib.optional (platform.libc != "glibc" && !targetPlatform.isWindows) libiconv; + # TODO(@sternenseemann): is buildTarget LLVM unnecessary? + # GHC doesn't seem to have {LLC,OPT}_HOST toolsForTarget = [ pkgsBuildTarget.targetPackages.stdenv.cc ] ++ lib.optional useLLVM buildTargetLlvmPackages.llvm; @@ -132,21 +134,6 @@ let useLdGold = targetPlatform.linker == "gold" || (targetPlatform.linker == "bfd" && (targetPackages.stdenv.cc.bintools.bintools.hasGold or false) && !targetPlatform.isMusl); - # Tools GHC will need to call at runtime. Some of these were handled using - # propagatedBuildInputs before, however this allowed for GHC environment and - # a derivations build environment to interfere, especially when GHC is built. - runtimeDeps = [ - targetPackages.stdenv.cc - targetPackages.stdenv.cc.bintools - coreutils # for cat - ] ++ lib.optionals useLLVM [ - (lib.getBin llvmPackages.llvm) - ] - # On darwin, we need unwrapped bintools as well (for otool) - ++ lib.optionals (stdenv.targetPlatform.linker == "cctools") [ - targetPackages.stdenv.cc.bintools.bintools - ]; - # Makes debugging easier to see which variant is at play in `nix-store -q --tree`. variantSuffix = lib.concatStrings [ (lib.optionalString stdenv.hostPlatform.isMusl "-musl") @@ -202,6 +189,7 @@ stdenv.mkDerivation (rec { postPatch = "patchShebangs ."; # GHC is a bit confused on its cross terminology. + # TODO(@sternenseemann): investigate coreutils dependencies and pass absolute paths preConfigure = '' for env in $(env | grep '^TARGET_' | sed -E 's|\+?=.*||'); do export "''${env#TARGET_}=''${!env}" @@ -218,6 +206,19 @@ stdenv.mkDerivation (rec { export RANLIB="${targetCC.bintools.bintools}/bin/${targetCC.bintools.targetPrefix}ranlib" export READELF="${targetCC.bintools.bintools}/bin/${targetCC.bintools.targetPrefix}readelf" export STRIP="${targetCC.bintools.bintools}/bin/${targetCC.bintools.targetPrefix}strip" + '' + lib.optionalString (stdenv.targetPlatform.linker == "cctools") '' + export OTOOL="${targetCC.bintools.bintools}/bin/${targetCC.bintools.targetPrefix}otool" + export INSTALL_NAME_TOOL="${targetCC.bintools.bintools}/bin/${targetCC.bintools.targetPrefix}install_name_tool" + '' + lib.optionalString useLLVM '' + export LLC="${lib.getBin llvmPackages.llvm}/bin/llc" + export OPT="${lib.getBin llvmPackages.llvm}/bin/opt" + '' + lib.optionalString (targetCC.isClang || (useLLVM && stdenv.targetPlatform.isDarwin)) (let + # LLVM backend on Darwin needs clang, if we are already using clang, might as well set the environment variable. + # See also https://downloads.haskell.org/~ghc/latest/docs/html/users_guide/codegens.html#llvm-code-generator-fllvm + clang = if targetCC.isClang then targetCC else llvmPackages.clang; + in '' + export CLANG="${clang}/bin/${clang.targetPrefix}clang" + '') + '' echo -n "${buildMK}" > mk/build.mk sed -i -e 's|-isysroot /Developer/SDKs/MacOSX10.5.sdk||' configure @@ -323,13 +324,6 @@ stdenv.mkDerivation (rec { postInstall = '' # Install the bash completion file. install -D -m 444 utils/completion/ghc.bash $out/share/bash-completion/completions/${targetPrefix}ghc - - # Patch scripts to include runtime dependencies in $PATH. - for i in "$out/bin/"*; do - test ! -h "$i" || continue - isScript "$i" || continue - sed -i -e '2i export PATH="${lib.makeBinPath runtimeDeps}:$PATH"' "$i" - done ''; passthru = { diff --git a/pkgs/development/compilers/ghc/8.8.4.nix b/pkgs/development/compilers/ghc/8.8.4.nix index c3efc2f2a7ba..ad9a10d33fbc 100644 --- a/pkgs/development/compilers/ghc/8.8.4.nix +++ b/pkgs/development/compilers/ghc/8.8.4.nix @@ -128,6 +128,8 @@ let ++ lib.optional (!enableIntegerSimple) gmp ++ lib.optional (platform.libc != "glibc" && !targetPlatform.isWindows) libiconv; + # TODO(@sternenseemann): is buildTarget LLVM unnecessary? + # GHC doesn't seem to have {LLC,OPT}_HOST toolsForTarget = [ pkgsBuildTarget.targetPackages.stdenv.cc ] ++ lib.optional useLLVM buildTargetLlvmPackages.llvm; @@ -140,21 +142,6 @@ let useLdGold = targetPlatform.linker == "gold" || (targetPlatform.linker == "bfd" && (targetPackages.stdenv.cc.bintools.bintools.hasGold or false) && !targetPlatform.isMusl); - # Tools GHC will need to call at runtime. Some of these were handled using - # propagatedBuildInputs before, however this allowed for GHC environment and - # a derivations build environment to interfere, especially when GHC is built. - runtimeDeps = [ - targetPackages.stdenv.cc - targetPackages.stdenv.cc.bintools - coreutils # for cat - ] ++ lib.optionals useLLVM [ - (lib.getBin llvmPackages.llvm) - ] - # On darwin, we need unwrapped bintools as well (for otool) - ++ lib.optionals (stdenv.targetPlatform.linker == "cctools") [ - targetPackages.stdenv.cc.bintools.bintools - ]; - # Makes debugging easier to see which variant is at play in `nix-store -q --tree`. variantSuffix = lib.concatStrings [ (lib.optionalString stdenv.hostPlatform.isMusl "-musl") @@ -203,6 +190,7 @@ stdenv.mkDerivation (rec { postPatch = "patchShebangs ."; # GHC is a bit confused on its cross terminology. + # TODO(@sternenseemann): investigate coreutils dependencies and pass absolute paths preConfigure = # Aarch64 allow backward bootstrapping since earlier versions are unstable. # Same for musl, as earlier versions do not provide a musl bindist for bootstrapping. @@ -226,6 +214,16 @@ stdenv.mkDerivation (rec { export RANLIB="${targetCC.bintools.bintools}/bin/${targetCC.bintools.targetPrefix}ranlib" export READELF="${targetCC.bintools.bintools}/bin/${targetCC.bintools.targetPrefix}readelf" export STRIP="${targetCC.bintools.bintools}/bin/${targetCC.bintools.targetPrefix}strip" + '' + lib.optionalString useLLVM '' + export LLC="${lib.getBin llvmPackages.llvm}/bin/llc" + export OPT="${lib.getBin llvmPackages.llvm}/bin/opt" + '' + lib.optionalString (targetCC.isClang || (useLLVM && stdenv.targetPlatform.isDarwin)) (let + # LLVM backend on Darwin needs clang, if we are already using clang, might as well set the environment variable. + # See also https://downloads.haskell.org/~ghc/latest/docs/html/users_guide/codegens.html#llvm-code-generator-fllvm + clang = if targetCC.isClang then targetCC else llvmPackages.clang; + in '' + export CLANG="${clang}/bin/${clang.targetPrefix}clang" + '') + '' echo -n "${buildMK dontStrip}" > mk/build.mk sed -i -e 's|-isysroot /Developer/SDKs/MacOSX10.5.sdk||' configure @@ -322,13 +320,6 @@ stdenv.mkDerivation (rec { postInstall = '' # Install the bash completion file. install -D -m 444 utils/completion/ghc.bash $out/share/bash-completion/completions/${targetPrefix}ghc - - # Patch scripts to include runtime dependencies in $PATH. - for i in "$out/bin/"*; do - test ! -h "$i" || continue - isScript "$i" || continue - sed -i -e '2i export PATH="${lib.makeBinPath runtimeDeps}:$PATH"' "$i" - done ''; passthru = { diff --git a/pkgs/development/compilers/ghc/9.0.1.nix b/pkgs/development/compilers/ghc/9.0.1.nix index e7da05871070..35edd0d4199f 100644 --- a/pkgs/development/compilers/ghc/9.0.1.nix +++ b/pkgs/development/compilers/ghc/9.0.1.nix @@ -115,6 +115,8 @@ let ++ lib.optional (!enableIntegerSimple) gmp ++ lib.optional (platform.libc != "glibc" && !targetPlatform.isWindows) libiconv; + # TODO(@sternenseemann): is buildTarget LLVM unnecessary? + # GHC doesn't seem to have {LLC,OPT}_HOST toolsForTarget = [ pkgsBuildTarget.targetPackages.stdenv.cc ] ++ lib.optional useLLVM buildTargetLlvmPackages.llvm; @@ -127,21 +129,6 @@ let useLdGold = targetPlatform.linker == "gold" || (targetPlatform.linker == "bfd" && (targetPackages.stdenv.cc.bintools.bintools.hasGold or false) && !targetPlatform.isMusl); - # Tools GHC will need to call at runtime. Some of these were handled using - # propagatedBuildInputs before, however this allowed for GHC environment and - # a derivations build environment to interfere, especially when GHC is built. - runtimeDeps = [ - targetPackages.stdenv.cc - targetPackages.stdenv.cc.bintools - coreutils # for cat - ] ++ lib.optionals useLLVM [ - (lib.getBin llvmPackages.llvm) - ] - # On darwin, we need unwrapped bintools as well (for otool) - ++ lib.optionals (stdenv.targetPlatform.linker == "cctools") [ - targetPackages.stdenv.cc.bintools.bintools - ]; - # Makes debugging easier to see which variant is at play in `nix-store -q --tree`. variantSuffix = lib.concatStrings [ (lib.optionalString stdenv.hostPlatform.isMusl "-musl") @@ -168,6 +155,7 @@ stdenv.mkDerivation (rec { LANG = "en_US.UTF-8"; # GHC is a bit confused on its cross terminology. + # TODO(@sternenseemann): investigate coreutils dependencies and pass absolute paths preConfigure = '' for env in $(env | grep '^TARGET_' | sed -E 's|\+?=.*||'); do export "''${env#TARGET_}=''${!env}" @@ -184,6 +172,19 @@ stdenv.mkDerivation (rec { export RANLIB="${targetCC.bintools.bintools}/bin/${targetCC.bintools.targetPrefix}ranlib" export READELF="${targetCC.bintools.bintools}/bin/${targetCC.bintools.targetPrefix}readelf" export STRIP="${targetCC.bintools.bintools}/bin/${targetCC.bintools.targetPrefix}strip" + '' + lib.optionalString (stdenv.targetPlatform.linker == "cctools") '' + export OTOOL="${targetCC.bintools.bintools}/bin/${targetCC.bintools.targetPrefix}otool" + export INSTALL_NAME_TOOL="${targetCC.bintools.bintools}/bin/${targetCC.bintools.targetPrefix}install_name_tool" + '' + lib.optionalString useLLVM '' + export LLC="${lib.getBin llvmPackages.llvm}/bin/llc" + export OPT="${lib.getBin llvmPackages.llvm}/bin/opt" + '' + lib.optionalString (targetCC.isClang || (useLLVM && stdenv.targetPlatform.isDarwin)) (let + # LLVM backend on Darwin needs clang, if we are already using clang, might as well set the environment variable. + # See also https://downloads.haskell.org/~ghc/latest/docs/html/users_guide/codegens.html#llvm-code-generator-fllvm + clang = if targetCC.isClang then targetCC else llvmPackages.clang; + in '' + export CLANG="${clang}/bin/${clang.targetPrefix}clang" + '') + '' echo -n "${buildMK}" > mk/build.mk sed -i -e 's|-isysroot /Developer/SDKs/MacOSX10.5.sdk||' configure @@ -288,13 +289,6 @@ stdenv.mkDerivation (rec { postInstall = '' # Install the bash completion file. install -D -m 444 utils/completion/ghc.bash $out/share/bash-completion/completions/${targetPrefix}ghc - - # Patch scripts to include runtime dependencies in $PATH. - for i in "$out/bin/"*; do - test ! -h "$i" || continue - isScript "$i" || continue - sed -i -e '2i export PATH="${lib.makeBinPath runtimeDeps}:$PATH"' "$i" - done ''; passthru = { diff --git a/pkgs/development/compilers/ghc/9.2.1.nix b/pkgs/development/compilers/ghc/9.2.1.nix index 2401a8900530..e8422372282e 100644 --- a/pkgs/development/compilers/ghc/9.2.1.nix +++ b/pkgs/development/compilers/ghc/9.2.1.nix @@ -116,6 +116,8 @@ let ++ lib.optional (!enableIntegerSimple) gmp ++ lib.optional (platform.libc != "glibc" && !targetPlatform.isWindows) libiconv; + # TODO(@sternenseemann): is buildTarget LLVM unnecessary? + # GHC doesn't seem to have {LLC,OPT}_HOST toolsForTarget = [ pkgsBuildTarget.targetPackages.stdenv.cc ] ++ lib.optional useLLVM buildTargetLlvmPackages.llvm; @@ -127,21 +129,6 @@ let # see #84670 and #49071 for more background. useLdGold = targetPlatform.linker == "gold" || (targetPlatform.linker == "bfd" && !targetPlatform.isMusl); - # Tools GHC will need to call at runtime. Some of these were handled using - # propagatedBuildInputs before, however this allowed for GHC environment and - # a derivations build environment to interfere, especially when GHC is built. - runtimeDeps = [ - targetPackages.stdenv.cc - targetPackages.stdenv.cc.bintools - coreutils # for cat - ] ++ lib.optionals useLLVM [ - (lib.getBin llvmPackages.llvm) - ] - # On darwin, we need unwrapped bintools as well (for otool) - ++ lib.optionals (stdenv.targetPlatform.linker == "cctools") [ - targetPackages.stdenv.cc.bintools.bintools - ]; - # Makes debugging easier to see which variant is at play in `nix-store -q --tree`. variantSuffix = lib.concatStrings [ (lib.optionalString stdenv.hostPlatform.isMusl "-musl") @@ -168,6 +155,7 @@ stdenv.mkDerivation (rec { LANG = "en_US.UTF-8"; # GHC is a bit confused on its cross terminology. + # TODO(@sternenseemann): investigate coreutils dependencies and pass absolute paths preConfigure = '' for env in $(env | grep '^TARGET_' | sed -E 's|\+?=.*||'); do export "''${env#TARGET_}=''${!env}" @@ -184,6 +172,19 @@ stdenv.mkDerivation (rec { export RANLIB="${targetCC.bintools.bintools}/bin/${targetCC.bintools.targetPrefix}ranlib" export READELF="${targetCC.bintools.bintools}/bin/${targetCC.bintools.targetPrefix}readelf" export STRIP="${targetCC.bintools.bintools}/bin/${targetCC.bintools.targetPrefix}strip" + '' + lib.optionalString (stdenv.targetPlatform.linker == "cctools") '' + export OTOOL="${targetCC.bintools.bintools}/bin/${targetCC.bintools.targetPrefix}otool" + export INSTALL_NAME_TOOL="${targetCC.bintools.bintools}/bin/${targetCC.bintools.targetPrefix}install_name_tool" + '' + lib.optionalString useLLVM '' + export LLC="${lib.getBin llvmPackages.llvm}/bin/llc" + export OPT="${lib.getBin llvmPackages.llvm}/bin/opt" + '' + lib.optionalString (targetCC.isClang || (useLLVM && stdenv.targetPlatform.isDarwin)) (let + # LLVM backend on Darwin needs clang, if we are already using clang, might as well set the environment variable. + # See also https://downloads.haskell.org/~ghc/latest/docs/html/users_guide/codegens.html#llvm-code-generator-fllvm + clang = if targetCC.isClang then targetCC else llvmPackages.clang; + in '' + export CLANG="${clang}/bin/${clang.targetPrefix}clang" + '') + '' echo -n "${buildMK}" > mk/build.mk sed -i -e 's|-isysroot /Developer/SDKs/MacOSX10.5.sdk||' configure @@ -292,13 +293,6 @@ stdenv.mkDerivation (rec { postInstall = '' # Install the bash completion file. install -D -m 444 utils/completion/ghc.bash $out/share/bash-completion/completions/${targetPrefix}ghc - - # Patch scripts to include runtime dependencies in $PATH. - for i in "$out/bin/"*; do - test ! -h "$i" || continue - isScript "$i" || continue - sed -i -e '2i export PATH="${lib.makeBinPath runtimeDeps}:$PATH"' "$i" - done ''; passthru = { diff --git a/pkgs/development/compilers/ghc/head.nix b/pkgs/development/compilers/ghc/head.nix index 5be02df13b4a..df8ac642cddf 100644 --- a/pkgs/development/compilers/ghc/head.nix +++ b/pkgs/development/compilers/ghc/head.nix @@ -129,6 +129,8 @@ let ++ lib.optional (platform.libc != "glibc" && !targetPlatform.isWindows) libiconv ++ lib.optional enableDwarf elfutils; + # TODO(@sternenseemann): is buildTarget LLVM unnecessary? + # GHC doesn't seem to have {LLC,OPT}_HOST toolsForTarget = [ pkgsBuildTarget.targetPackages.stdenv.cc ] ++ lib.optional useLLVM buildTargetLlvmPackages.llvm; @@ -141,21 +143,6 @@ let useLdGold = targetPlatform.linker == "gold" || (targetPlatform.linker == "bfd" && (targetPackages.stdenv.cc.bintools.bintools.hasGold or false) && !targetPlatform.isMusl); - # Tools GHC will need to call at runtime. Some of these were handled using - # propagatedBuildInputs before, however this allowed for GHC environment and - # a derivations build environment to interfere, especially when GHC is built. - runtimeDeps = [ - targetPackages.stdenv.cc - targetPackages.stdenv.cc.bintools - coreutils # for cat - ] ++ lib.optionals useLLVM [ - (lib.getBin llvmPackages.llvm) - ] - # On darwin, we need unwrapped bintools as well (for otool) - ++ lib.optionals (stdenv.targetPlatform.linker == "cctools") [ - targetPackages.stdenv.cc.bintools.bintools - ]; - # Makes debugging easier to see which variant is at play in `nix-store -q --tree`. variantSuffix = lib.concatStrings [ (lib.optionalString stdenv.hostPlatform.isMusl "-musl") @@ -181,6 +168,7 @@ stdenv.mkDerivation (rec { postPatch = "patchShebangs ."; # GHC is a bit confused on its cross terminology. + # TODO(@sternenseemann): investigate coreutils dependencies and pass absolute paths preConfigure = '' for env in $(env | grep '^TARGET_' | sed -E 's|\+?=.*||'); do export "''${env#TARGET_}=''${!env}" @@ -198,6 +186,19 @@ stdenv.mkDerivation (rec { export RANLIB="${targetCC.bintools.bintools}/bin/${targetCC.bintools.targetPrefix}ranlib" export READELF="${targetCC.bintools.bintools}/bin/${targetCC.bintools.targetPrefix}readelf" export STRIP="${targetCC.bintools.bintools}/bin/${targetCC.bintools.targetPrefix}strip" + '' + lib.optionalString (stdenv.targetPlatform.linker == "cctools") '' + export OTOOL="${targetCC.bintools.bintools}/bin/${targetCC.bintools.targetPrefix}otool" + export INSTALL_NAME_TOOL="${targetCC.bintools.bintools}/bin/${targetCC.bintools.targetPrefix}install_name_tool" + '' + lib.optionalString useLLVM '' + export LLC="${lib.getBin llvmPackages.llvm}/bin/llc" + export OPT="${lib.getBin llvmPackages.llvm}/bin/opt" + '' + lib.optionalString (targetCC.isClang || (useLLVM && stdenv.targetPlatform.isDarwin)) (let + # LLVM backend on Darwin needs clang, if we are already using clang, might as well set the environment variable. + # See also https://downloads.haskell.org/~ghc/latest/docs/html/users_guide/codegens.html#llvm-code-generator-fllvm + clang = if targetCC.isClang then targetCC else llvmPackages.clang; + in '' + export CLANG="${clang}/bin/${clang.targetPrefix}clang" + '') + '' # otherwise haddock fails when generating the compiler docs export LANG=C.UTF-8 @@ -312,13 +313,6 @@ stdenv.mkDerivation (rec { postInstall = '' # Install the bash completion file. install -D -m 444 utils/completion/ghc.bash $out/share/bash-completion/completions/${targetPrefix}ghc - - # Patch scripts to include runtime dependencies in $PATH. - for i in "$out/bin/"*; do - test ! -h "$i" || continue - isScript "$i" || continue - sed -i -e '2i export PATH="${lib.makeBinPath runtimeDeps}:$PATH"' "$i" - done ''; passthru = { From 33c8bc71868a04e0ce91ab5f7bbba85f8fef9bae Mon Sep 17 00:00:00 2001 From: Eric Dallo Date: Sat, 27 Nov 2021 11:02:44 -0300 Subject: [PATCH 26/43] polylith: 0.2.12-alpha -> 0.2.13-alpha --- pkgs/development/tools/misc/polylith/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/development/tools/misc/polylith/default.nix b/pkgs/development/tools/misc/polylith/default.nix index 4397fd11a27b..a8330895e7c1 100644 --- a/pkgs/development/tools/misc/polylith/default.nix +++ b/pkgs/development/tools/misc/polylith/default.nix @@ -2,11 +2,11 @@ stdenv.mkDerivation rec { pname = "polylith"; - version = "0.2.12-alpha"; + version = "0.2.13-alpha"; src = fetchurl { url = "https://github.com/polyfy/polylith/releases/download/v${version}/poly-${version}.jar"; - sha256 = "1zsasyrrssj7kmvgfr63fa5hslw9gnlbp9bh05g72bfgzi99n8kg"; + sha256 = "sha256-iLN92qurc8+D0pt7Hwag+TFGoeFl9DvEeS67sKmmoSI="; }; dontUnpack = true; From b930e3fe52657cb58ebbf4fcb91030151fbd4f14 Mon Sep 17 00:00:00 2001 From: Lionello Lunesu Date: Mon, 1 Nov 2021 18:43:52 -0700 Subject: [PATCH 27/43] btrfs-snap: init at 1.7.3 --- pkgs/tools/filesystems/btrfs-snap/default.nix | 32 +++++++++++++++++++ pkgs/top-level/all-packages.nix | 2 ++ 2 files changed, 34 insertions(+) create mode 100644 pkgs/tools/filesystems/btrfs-snap/default.nix diff --git a/pkgs/tools/filesystems/btrfs-snap/default.nix b/pkgs/tools/filesystems/btrfs-snap/default.nix new file mode 100644 index 000000000000..e43380e6792e --- /dev/null +++ b/pkgs/tools/filesystems/btrfs-snap/default.nix @@ -0,0 +1,32 @@ +{ bash, btrfs-progs, coreutils, fetchFromGitHub, gnugrep, lib, makeWrapper, stdenvNoCC, util-linuxMinimal }: +stdenvNoCC.mkDerivation rec { + pname = "btrfs-snap"; + version = "1.7.3"; + src = fetchFromGitHub { + owner = "jf647"; + repo = pname; + rev = version; + sha256 = "sha256-SDzLjgNRuR9XpmcYCD9T10MLS+//+pWFGDiTAb8NiLQ="; + }; + buildInputs = [ bash ]; + nativeBuildInputs = [ makeWrapper ]; + dontConfigure = true; + dontBuild = true; + installPhase = '' + mkdir -p $out/bin + cp btrfs-snap $out/bin/ + wrapProgram $out/bin/btrfs-snap --prefix PATH : ${lib.makeBinPath [ + btrfs-progs # btrfs + coreutils # cut, date, head, ls, mkdir, readlink, stat, tail, touch, test, [ + gnugrep # grep + util-linuxMinimal # logger, mount + ]} + ''; + meta = with lib; { + description = "btrfs-snap creates and maintains the history of snapshots of btrfs filesystems."; + homepage = "https://github.com/jf647/btrfs-snap"; + license = licenses.gpl3Only; + maintainers = with maintainers; [ lionello ]; + platforms = platforms.linux; + }; +} diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index cf51b1df7af8..e594b0f83df9 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -2280,6 +2280,8 @@ with pkgs; btrfs-progs = callPackage ../tools/filesystems/btrfs-progs { }; + btrfs-snap = callPackage ../tools/filesystems/btrfs-snap { }; + btlejack = python3Packages.callPackage ../applications/radio/btlejack { }; btrbk = callPackage ../tools/backup/btrbk { From c192da17cc4d87460664d72c1a845647d4b6e46b Mon Sep 17 00:00:00 2001 From: Artturin Date: Thu, 25 Nov 2021 18:10:51 +0200 Subject: [PATCH 28/43] nixUnstable: 2.5pre20211007 -> 2.5pre20211126 --- pkgs/tools/package-management/nix/default.nix | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pkgs/tools/package-management/nix/default.nix b/pkgs/tools/package-management/nix/default.nix index f365348607aa..0a897d963084 100644 --- a/pkgs/tools/package-management/nix/default.nix +++ b/pkgs/tools/package-management/nix/default.nix @@ -256,13 +256,13 @@ in rec { nixUnstable = lib.lowPrio (callPackage common rec { pname = "nix"; version = "2.5${suffix}"; - suffix = "pre20211007_${lib.substring 0 7 src.rev}"; + suffix = "pre20211126_${lib.substring 0 7 src.rev}"; src = fetchFromGitHub { owner = "NixOS"; repo = "nix"; - rev = "844dd901a7debe8b03ec93a7f717b6c4038dc572"; - sha256 = "sha256-fe1B4lXkS6/UfpO0rJHwLC06zhOPrdSh4s9PmQ1JgPo="; + rev = "55275fcc5966cfad80fb6dc77b8d8939a2f1b8e0"; + sha256 = "sha256-jr85Z+0TA86mdsi3Y91wM3dFHWemmFHKdNwbx9rGz2U="; }; boehmgc = boehmgc_nixUnstable; From 95312f56b5846503c5629b87df413f386b46a2ef Mon Sep 17 00:00:00 2001 From: Vikram Narayanan Date: Sat, 27 Nov 2021 22:01:02 -0800 Subject: [PATCH 29/43] umap-learn: fix build --- pkgs/development/python-modules/umap-learn/default.nix | 2 ++ 1 file changed, 2 insertions(+) diff --git a/pkgs/development/python-modules/umap-learn/default.nix b/pkgs/development/python-modules/umap-learn/default.nix index fcf96a715f15..df635d856d94 100644 --- a/pkgs/development/python-modules/umap-learn/default.nix +++ b/pkgs/development/python-modules/umap-learn/default.nix @@ -9,6 +9,7 @@ , pynndescent , tensorflow , pytestCheckHook +, Keras }: buildPythonPackage rec { @@ -34,6 +35,7 @@ buildPythonPackage rec { nose tensorflow pytestCheckHook + Keras ]; preCheck = '' From 8f1a52ac33fb9a441713261c35cecab7b5331512 Mon Sep 17 00:00:00 2001 From: sternenseemann Date: Thu, 25 Nov 2021 19:58:55 +0100 Subject: [PATCH 30/43] haskell.compiler.*: disable useLLVM also for SPARC and PowerPC These targets also have NCG support, but they are tested less (in fact SPARC seems to be untested atm) and may have issues. In such cases being able to fallback to -fllvm without rebuilding the compiler could be useful. OTOH GHC will default to -fasm and the backends probably work well enough in most cases. --- pkgs/development/compilers/ghc/8.10.7.nix | 4 +++- pkgs/development/compilers/ghc/8.8.4.nix | 4 +++- pkgs/development/compilers/ghc/9.0.1.nix | 4 +++- pkgs/development/compilers/ghc/9.2.1.nix | 2 ++ pkgs/development/compilers/ghc/head.nix | 2 ++ 5 files changed, 13 insertions(+), 3 deletions(-) diff --git a/pkgs/development/compilers/ghc/8.10.7.nix b/pkgs/development/compilers/ghc/8.10.7.nix index c8ea523be6a7..5be64bebcd4d 100644 --- a/pkgs/development/compilers/ghc/8.10.7.nix +++ b/pkgs/development/compilers/ghc/8.10.7.nix @@ -11,7 +11,9 @@ , # GHC can be built with system libffi or a bundled one. libffi ? null -, useLLVM ? !stdenv.targetPlatform.isx86 +, useLLVM ? !(stdenv.targetPlatform.isx86 + || stdenv.targetPlatform.isPowerPC + || stdenv.targetPlatform.isSparc) , # LLVM is conceptually a run-time-only depedendency, but for # non-x86, we need LLVM to bootstrap later stages, so it becomes a # build-time dependency too. diff --git a/pkgs/development/compilers/ghc/8.8.4.nix b/pkgs/development/compilers/ghc/8.8.4.nix index ad9a10d33fbc..ffa2c473eec6 100644 --- a/pkgs/development/compilers/ghc/8.8.4.nix +++ b/pkgs/development/compilers/ghc/8.8.4.nix @@ -10,7 +10,9 @@ , # GHC can be built with system libffi or a bundled one. libffi ? null -, useLLVM ? !stdenv.targetPlatform.isx86 +, useLLVM ? !(stdenv.targetPlatform.isx86 + || stdenv.targetPlatform.isPowerPC + || stdenv.targetPlatform.isSparc) , # LLVM is conceptually a run-time-only depedendency, but for # non-x86, we need LLVM to bootstrap later stages, so it becomes a # build-time dependency too. diff --git a/pkgs/development/compilers/ghc/9.0.1.nix b/pkgs/development/compilers/ghc/9.0.1.nix index 35edd0d4199f..d377328692cb 100644 --- a/pkgs/development/compilers/ghc/9.0.1.nix +++ b/pkgs/development/compilers/ghc/9.0.1.nix @@ -12,7 +12,9 @@ , # GHC can be built with system libffi or a bundled one. libffi ? null -, useLLVM ? !stdenv.targetPlatform.isx86 +, useLLVM ? !(stdenv.targetPlatform.isx86 + || stdenv.targetPlatform.isPowerPC + || stdenv.targetPlatform.isSparc) , # LLVM is conceptually a run-time-only depedendency, but for # non-x86, we need LLVM to bootstrap later stages, so it becomes a # build-time dependency too. diff --git a/pkgs/development/compilers/ghc/9.2.1.nix b/pkgs/development/compilers/ghc/9.2.1.nix index e8422372282e..20062358db50 100644 --- a/pkgs/development/compilers/ghc/9.2.1.nix +++ b/pkgs/development/compilers/ghc/9.2.1.nix @@ -13,6 +13,8 @@ libffi ? null , useLLVM ? !(stdenv.targetPlatform.isx86 + || stdenv.targetPlatform.isPowerPC + || stdenv.targetPlatform.isSparc || (stdenv.targetPlatform.isAarch64 && stdenv.targetPlatform.isDarwin)) , # LLVM is conceptually a run-time-only depedendency, but for # non-x86, we need LLVM to bootstrap later stages, so it becomes a diff --git a/pkgs/development/compilers/ghc/head.nix b/pkgs/development/compilers/ghc/head.nix index df8ac642cddf..537b735b4a21 100644 --- a/pkgs/development/compilers/ghc/head.nix +++ b/pkgs/development/compilers/ghc/head.nix @@ -18,6 +18,8 @@ , elfutils # for DWARF support , useLLVM ? !(stdenv.targetPlatform.isx86 + || stdenv.targetPlatform.isPowerPC + || stdenv.targetPlatform.isSparc || (stdenv.targetPlatform.isAarch64 && stdenv.targetPlatform.isDarwin)) , # LLVM is conceptually a run-time-only depedendency, but for # non-x86, we need LLVM to bootstrap later stages, so it becomes a From 1e3b8e3fd835832864d8038d9d6bb906372a764e Mon Sep 17 00:00:00 2001 From: Robert Scott Date: Sun, 28 Nov 2021 17:40:08 +0000 Subject: [PATCH 31/43] python3Packages.pywal: use $TMPDIR in tests darwin hydra can fail to access /tmp --- .../python-modules/pywal/default.nix | 21 ++++++++++++------- 1 file changed, 13 insertions(+), 8 deletions(-) diff --git a/pkgs/development/python-modules/pywal/default.nix b/pkgs/development/python-modules/pywal/default.nix index ccc862f8aa47..2e09573d848c 100644 --- a/pkgs/development/python-modules/pywal/default.nix +++ b/pkgs/development/python-modules/pywal/default.nix @@ -9,24 +9,29 @@ buildPythonPackage rec { sha256 = "1drha9kshidw908k7h3gd9ws2bl64ms7bjcsa83pwb3hqa9bkspg"; }; - preCheck = '' - mkdir tmp - HOME=$PWD/tmp - ''; - patches = [ ./convert.patch ./feh.patch ]; - # Invalid syntax - disabled = !isPy3k; - postPatch = '' substituteInPlace pywal/backends/wal.py --subst-var-by convert "${imagemagick}/bin/convert" substituteInPlace pywal/wallpaper.py --subst-var-by feh "${feh}/bin/feh" ''; + # Invalid syntax + disabled = !isPy3k; + + preCheck = '' + mkdir tmp + HOME=$PWD/tmp + + for f in tests/test_export.py tests/test_util.py ; do + substituteInPlace "$f" \ + --replace '/tmp/' "$TMPDIR/" + done + ''; + meta = with lib; { description = "Generate and change colorschemes on the fly. A 'wal' rewrite in Python 3"; homepage = "https://github.com/dylanaraps/pywal"; From f6053b7c826d4927e1d9460027b15281b8211d79 Mon Sep 17 00:00:00 2001 From: "R. RyanTM" Date: Sun, 28 Nov 2021 10:01:15 -0800 Subject: [PATCH 32/43] verifpal: 0.26.0 -> 0.26.1 (#143282) --- pkgs/tools/security/verifpal/default.nix | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pkgs/tools/security/verifpal/default.nix b/pkgs/tools/security/verifpal/default.nix index 02f41477c7ef..821118f598c5 100644 --- a/pkgs/tools/security/verifpal/default.nix +++ b/pkgs/tools/security/verifpal/default.nix @@ -6,15 +6,15 @@ buildGoModule rec { pname = "verifpal"; - version = "0.26.0"; + version = "0.26.1"; src = fetchgit { url = "https://source.symbolic.software/verifpal/verifpal.git"; rev = "v${version}"; - sha256 = "1ag1fpgk4xa5041y6a0pchmh32j876bl0iqjb7lxxqg5nc76d3v1"; + sha256 = "sha256-y07RXv2QSyUJpGuFsLJ2sGNo4YzhoCYQr3PkUj4eIOY="; }; - vendorSha256 = "XHeXonzRDHXayge5G3apvDarbOfTiV+UQ+IqSbrLkCk="; + vendorSha256 = "sha256-gUpgnd/xiLqRNl1bPzVp+0GM/J5GEx0VhUfo6JsX8N8="; nativeBuildInputs = [ pigeon ]; From 6f05bc3791cd7d27cdc376548df4ce05d9a4ce6d Mon Sep 17 00:00:00 2001 From: Thiago Kenji Okada Date: Sat, 27 Nov 2021 16:05:34 -0300 Subject: [PATCH 33/43] libretro.pcsx2: init at unstable-2021-11-27 Thanks for @jnetod help. --- pkgs/misc/emulators/retroarch/cores.nix | 36 +++++++++++++++++++++++ pkgs/misc/emulators/retroarch/hashes.json | 7 +++++ pkgs/misc/emulators/retroarch/update.py | 1 + 3 files changed, 44 insertions(+) diff --git a/pkgs/misc/emulators/retroarch/cores.nix b/pkgs/misc/emulators/retroarch/cores.nix index c8a1b8983f32..44c43f0f3284 100644 --- a/pkgs/misc/emulators/retroarch/cores.nix +++ b/pkgs/misc/emulators/retroarch/cores.nix @@ -14,6 +14,7 @@ , hexdump , hidapi , icu +, libaio , libGL , libGLU , libevdev @@ -21,6 +22,7 @@ , libpcap , libpng , libvorbis +, libxml2 , libzip , makeWrapper , nasm @@ -36,6 +38,8 @@ , udev , which , xorg +, xxd +, xz , zlib }: @@ -669,6 +673,38 @@ in ''; }; + pcsx2 = mkLibRetroCore { + core = "pcsx2"; + version = "unstable-2021-11-27"; + description = "Port of PCSX2 to libretro"; + license = lib.licenses.gpl3Plus; + extraNativeBuildInputs = [ + cmake + gettext + pkg-config + ]; + extraBuildInputs = [ + libaio + libGL + libGLU + libpcap + libpng + libxml2 + xz + xxd + ]; + makefile = "Makefile"; + cmakeFlags = [ + "-DCMAKE_BUILD_TYPE=Release" + "-DLIBRETRO=ON" + ]; + postPatch = '' + # remove ccache + substituteInPlace CMakeLists.txt --replace "ccache" "" + ''; + postBuild = "cd /build/source/build/pcsx2"; + }; + pcsx_rearmed = mkLibRetroCore { core = "pcsx_rearmed"; description = "Port of PCSX ReARMed with GNU lightning to libretro"; diff --git a/pkgs/misc/emulators/retroarch/hashes.json b/pkgs/misc/emulators/retroarch/hashes.json index 9eab19b29ad1..3caf4ed9f7b8 100644 --- a/pkgs/misc/emulators/retroarch/hashes.json +++ b/pkgs/misc/emulators/retroarch/hashes.json @@ -377,6 +377,13 @@ "sha256": "rms+T8JOp/TJ/T5a5uLj8lu1LLz/GAsJZ7UbK42C9yU=", "fetchSubmodules": false }, + "pcsx2": { + "owner": "libretro", + "repo": "pcsx2", + "rev": "18e0685ed4f191796c8e923caf4f5e96a930057e", + "sha256": "V2eS741us2p+JC+ghmHjAtFeptB0UcBlwZuisZ8Co7M=", + "fetchSubmodules": false + }, "pcsx_rearmed": { "owner": "libretro", "repo": "pcsx_rearmed", diff --git a/pkgs/misc/emulators/retroarch/update.py b/pkgs/misc/emulators/retroarch/update.py index 3c1ea2b755b1..831709d89e7c 100755 --- a/pkgs/misc/emulators/retroarch/update.py +++ b/pkgs/misc/emulators/retroarch/update.py @@ -64,6 +64,7 @@ CORES = { "o2em": {"repo": "libretro-o2em"}, "opera": {"repo": "opera-libretro"}, "parallel-n64": {"repo": "parallel-n64"}, + "pcsx2": {"repo": "pcsx2"}, "pcsx_rearmed": {"repo": "pcsx_rearmed"}, "picodrive": {"repo": "picodrive", "fetch_submodules": True}, "play": {"repo": "Play-", "owner": "jpd002", "fetch_submodules": True}, From 7ff536edd6a8fff222889229dce7d2673f0ab463 Mon Sep 17 00:00:00 2001 From: Thiago Kenji Okada Date: Sun, 28 Nov 2021 14:18:22 -0300 Subject: [PATCH 34/43] libretro: remove "-DCMAKE_BUILD_TYPE=Release" --- pkgs/misc/emulators/retroarch/cores.nix | 3 --- 1 file changed, 3 deletions(-) diff --git a/pkgs/misc/emulators/retroarch/cores.nix b/pkgs/misc/emulators/retroarch/cores.nix index 44c43f0f3284..dd7f723d3c73 100644 --- a/pkgs/misc/emulators/retroarch/cores.nix +++ b/pkgs/misc/emulators/retroarch/cores.nix @@ -367,7 +367,6 @@ in ] ++ (with xorg; [ libSM libX11 libXi libpthreadstubs libxcb xcbutil libXext libXrandr libXinerama libXxf86vm ]); makefile = "Makefile"; cmakeFlags = [ - "-DCMAKE_BUILD_TYPE=Release" "-DLIBRETRO=ON" "-DLIBRETRO_STATIC=1" "-DENABLE_QT=OFF" @@ -695,7 +694,6 @@ in ]; makefile = "Makefile"; cmakeFlags = [ - "-DCMAKE_BUILD_TYPE=Release" "-DLIBRETRO=ON" ]; postPatch = '' @@ -846,7 +844,6 @@ in extraNativeBuildInputs = [ cmake ]; makefile = "Makefile"; cmakeFlags = [ - "-DCMAKE_BUILD_TYPE=Release" "-DBUILD_LIBRETRO_CORE=ON" ]; postPatch = "mkdir -p src/duckstation-libretro"; From 5c589d83edadc493b0c99a663f1433cf9c8f2b80 Mon Sep 17 00:00:00 2001 From: Thiago Kenji Okada Date: Sun, 28 Nov 2021 14:50:21 -0300 Subject: [PATCH 35/43] libretro: fix core platforms --- pkgs/misc/emulators/retroarch/cores.nix | 9 +++++---- pkgs/misc/emulators/retroarch/default.nix | 2 +- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/pkgs/misc/emulators/retroarch/cores.nix b/pkgs/misc/emulators/retroarch/cores.nix index dd7f723d3c73..b09af281166b 100644 --- a/pkgs/misc/emulators/retroarch/cores.nix +++ b/pkgs/misc/emulators/retroarch/cores.nix @@ -59,6 +59,7 @@ let , src ? null , broken ? false , version ? "unstable-2021-11-22" + , platforms ? retroarch.meta.platforms , ... }@args: lib.makeOverridable stdenv.mkDerivation ( @@ -109,10 +110,9 @@ let }; meta = with lib; { - inherit broken description license; + inherit broken description license platforms; homepage = "https://www.libretro.com/"; maintainers = with maintainers; [ edwtjo hrdinka MP2E thiagokokada ]; - platforms = platforms.unix; }; }) // builtins.removeAttrs args [ "core" "src" "description" "license" "makeFlags" ] ); @@ -193,7 +193,7 @@ in description = "Port of Mednafen's Saturn core to libretro"; license = lib.licenses.gpl2Only; makefile = "Makefile"; - meta.platforms = [ "x86_64-linux" "aarch64-linux" ]; + platforms = [ "x86_64-linux" "aarch64-linux" ]; }; beetle-snes = mkLibRetroCore { @@ -423,7 +423,7 @@ in extraBuildInputs = [ libGL libGLU ]; makefile = "Makefile"; makeFlags = lib.optional stdenv.hostPlatform.isAarch64 [ "platform=arm64" ]; - meta.platforms = [ "aarch64-linux" "x86_64-linux" ]; + platforms = [ "aarch64-linux" "x86_64-linux" ]; }; fmsx = mkLibRetroCore { @@ -701,6 +701,7 @@ in substituteInPlace CMakeLists.txt --replace "ccache" "" ''; postBuild = "cd /build/source/build/pcsx2"; + platforms = lib.platforms.x86; }; pcsx_rearmed = mkLibRetroCore { diff --git a/pkgs/misc/emulators/retroarch/default.nix b/pkgs/misc/emulators/retroarch/default.nix index 5a294277c80c..6bf5f219cd78 100644 --- a/pkgs/misc/emulators/retroarch/default.nix +++ b/pkgs/misc/emulators/retroarch/default.nix @@ -110,7 +110,7 @@ stdenv.mkDerivation rec { homepage = "https://libretro.com"; description = "Multi-platform emulator frontend for libretro cores"; license = licenses.gpl3Plus; - platforms = platforms.all; + platforms = platforms.unix; maintainers = with maintainers; [ MP2E edwtjo matthewbauer kolbycrouch thiagokokada ]; # FIXME: exits with error on macOS: # No Info.plist file in application bundle or no NSPrincipalClass in the Info.plist file, exiting From 37af67a84a6210c65ce7e61efcad9bf96e3dbc50 Mon Sep 17 00:00:00 2001 From: Markus Kowalewski Date: Sun, 28 Nov 2021 20:09:52 +0100 Subject: [PATCH 36/43] rdma-core: 37.1 -> 38.0 --- pkgs/os-specific/linux/rdma-core/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/os-specific/linux/rdma-core/default.nix b/pkgs/os-specific/linux/rdma-core/default.nix index b930e966a275..878f563631e9 100644 --- a/pkgs/os-specific/linux/rdma-core/default.nix +++ b/pkgs/os-specific/linux/rdma-core/default.nix @@ -5,13 +5,13 @@ stdenv.mkDerivation rec { pname = "rdma-core"; - version = "37.1"; + version = "38.0"; src = fetchFromGitHub { owner = "linux-rdma"; repo = "rdma-core"; rev = "v${version}"; - sha256 = "19s59id4m0zkkm4hqa36f2xnah4rs4z207kxzn4zdg2x1d06j9jg"; + sha256 = "1z9yrkqdknzidg4g1g5rqrs7i0325nmzzw0nf2ki1nzlfwqxy9qv"; }; nativeBuildInputs = [ cmake pkg-config pandoc docutils ]; From 32067bb1597fdbf762a4b55c81e7788a5c2149cd Mon Sep 17 00:00:00 2001 From: Vikram Narayanan Date: Sun, 28 Nov 2021 11:17:24 -0800 Subject: [PATCH 37/43] neard: fix build --- pkgs/servers/neard/default.nix | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/pkgs/servers/neard/default.nix b/pkgs/servers/neard/default.nix index 77c6f8839f71..9e9ccb9700ee 100644 --- a/pkgs/servers/neard/default.nix +++ b/pkgs/servers/neard/default.nix @@ -1,4 +1,4 @@ -{ lib, stdenv, fetchurl, autoreconfHook, pkg-config, systemd, glib, dbus, libnl, python2Packages }: +{ lib, stdenv, fetchurl, autoreconfHook, pkg-config, systemd, glib, dbus, libnl, python3Packages }: stdenv.mkDerivation rec { pname = "neard"; @@ -9,9 +9,9 @@ stdenv.mkDerivation rec { sha256 = "0bpdmyxvd3z54p95apz4bjb5jp8hbc04sicjapcryjwa8mh6pbil"; }; - nativeBuildInputs = [ autoreconfHook pkg-config python2Packages.wrapPython ]; - buildInputs = [ systemd glib dbus libnl ] ++ (with python2Packages; [ python ]); - pythonPath = with python2Packages; [ pygobject2 dbus-python pygtk ]; + nativeBuildInputs = [ autoreconfHook pkg-config python3Packages.wrapPython ]; + buildInputs = [ systemd glib dbus libnl ] ++ (with python3Packages; [ python ]); + pythonPath = with python3Packages; [ pygobject3 dbus-python ]; strictDeps = true; From d18a44ab6dff396fd3cdd439406933c3369cb2eb Mon Sep 17 00:00:00 2001 From: figsoda Date: Sun, 28 Nov 2021 14:32:43 -0500 Subject: [PATCH 38/43] ttyper: 0.3.0 -> 0.3.1 --- pkgs/applications/misc/ttyper/default.nix | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pkgs/applications/misc/ttyper/default.nix b/pkgs/applications/misc/ttyper/default.nix index c3001c3337cd..442c2a91682f 100644 --- a/pkgs/applications/misc/ttyper/default.nix +++ b/pkgs/applications/misc/ttyper/default.nix @@ -2,16 +2,16 @@ rustPlatform.buildRustPackage rec { pname = "ttyper"; - version = "0.3.0"; + version = "0.3.1"; src = fetchFromGitHub { owner = "max-niederman"; repo = pname; rev = "v${version}"; - sha256 = "sha256-9vcoK2mFEivTSZE3KoQRHUr3AfQ/aN5eWP//Jagw3gU="; + sha256 = "sha256-lluBxYZQWygX9aujNK251bDilNNErVNr4WDoyqSPTiQ="; }; - cargoSha256 = "sha256-VzO32b5oAoXR/Ei9up00XRM63I5kuG68TeX4KBCXIdo="; + cargoSha256 = "sha256-GQNNl8/Y/jHDBGJQ7LWNpgbOgWaV/3UAMgYLJFJmQ3Y="; meta = with lib; { description = "Terminal-based typing test"; From d26a0b8d9f520fc3d8c19fcb6efb877587270024 Mon Sep 17 00:00:00 2001 From: figsoda Date: Sun, 28 Nov 2021 14:38:33 -0500 Subject: [PATCH 39/43] cargo-sort: 1.0.5 -> 1.0.6 --- pkgs/development/tools/rust/cargo-sort/default.nix | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/pkgs/development/tools/rust/cargo-sort/default.nix b/pkgs/development/tools/rust/cargo-sort/default.nix index 9ab6d7e2b03a..4c0d722f266d 100644 --- a/pkgs/development/tools/rust/cargo-sort/default.nix +++ b/pkgs/development/tools/rust/cargo-sort/default.nix @@ -2,20 +2,21 @@ rustPlatform.buildRustPackage rec { pname = "cargo-sort"; - version = "1.0.5"; + version = "1.0.6"; src = fetchFromGitHub { owner = "devinr528"; repo = pname; rev = "v${version}"; - sha256 = "146aawikyjcxbj0dpnqia31xmplpwkl9w1gv7d9a5jvz8whvxrff"; + sha256 = "sha256-4BQdZsnK3Wv7A3I/yCrnPALac2/sSopRPVh/57vvmGw="; }; - cargoSha256 = "0xm37f285vmd674k5j72pcjg6zpmxlf46d9vppi9s3qaw0hsslpf"; + cargoSha256 = "sha256-JM9HdPEZA9c8NGeu9qRwj0jGUsMltsOUG6itNbXZ3Ts="; meta = with lib; { description = "A tool to check that your Cargo.toml dependencies are sorted alphabetically"; homepage = "https://github.com/devinr528/cargo-sort"; + changelog = "https://github.com/devinr528/cargo-sort/blob/v${version}/changelog.md"; license = with licenses; [ mit /* or */ asl20 ]; maintainers = with maintainers; [ figsoda ]; }; From cda6d383462cce9e5d6f1848480c3322c4dff92b Mon Sep 17 00:00:00 2001 From: figsoda Date: Sun, 28 Nov 2021 14:45:48 -0500 Subject: [PATCH 40/43] statix: 0.4.0 -> 0.4.1 --- pkgs/tools/nix/statix/default.nix | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pkgs/tools/nix/statix/default.nix b/pkgs/tools/nix/statix/default.nix index bb17d8df275d..d5fd2fd092b2 100644 --- a/pkgs/tools/nix/statix/default.nix +++ b/pkgs/tools/nix/statix/default.nix @@ -4,16 +4,16 @@ rustPlatform.buildRustPackage rec { pname = "statix"; # also update version of the vim plugin in pkgs/misc/vim-plugins/overrides.nix # the version can be found in flake.nix of the source code - version = "0.4.0"; + version = "0.4.1"; src = fetchFromGitHub { owner = "nerdypepper"; repo = pname; rev = "v${version}"; - sha256 = "sha256-wqkhtAOO6pKLjUUnDbVFwzm6mbXhP/4iJU7ZKtDKrE8="; + sha256 = "sha256-xFdHC7LulhDBWsbCcWeH90sR4iUhzQrShiW69/KHk0U="; }; - cargoSha256 = "sha256-e20POz9ZvuT0S+YG+9x7hcudhXQpOR4rVSFJbz76OI0="; + cargoSha256 = "sha256-dzDgHROlwsqwQ6pk7lrwP0eV69595l0HvF7jHSe3N/g="; buildFeatures = lib.optional withJson "json"; From 1c8513dfe4af5220d7a6d3c259471b502d2be84e Mon Sep 17 00:00:00 2001 From: figsoda Date: Sun, 28 Nov 2021 15:09:30 -0500 Subject: [PATCH 41/43] difftastic: 0.11.0 -> 0.12.0 --- pkgs/tools/text/difftastic/default.nix | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/pkgs/tools/text/difftastic/default.nix b/pkgs/tools/text/difftastic/default.nix index f8ceec253a63..ee86bcd635e3 100644 --- a/pkgs/tools/text/difftastic/default.nix +++ b/pkgs/tools/text/difftastic/default.nix @@ -2,16 +2,16 @@ rustPlatform.buildRustPackage rec { pname = "difftastic"; - version = "0.11.0"; + version = "0.12.0"; src = fetchFromGitHub { owner = "wilfred"; repo = pname; rev = version; - sha256 = "sha256-Arg1n5WFCNGHZay56BvLrPDAvvUKVurVNEKgTzHgIzI="; + sha256 = "sha256-A6Z3g6fbYBynyN4OhRrZNO0ZghvT3XnIahdUQ8SE8tU="; }; - cargoSha256 = "sha256-ArIyIAxVgGmI+MdkVBo0xihDdw3RlRiPLJOhPcC1KLw="; + cargoSha256 = "sha256-6/JwrPymtpj/CXqx3Pe43v+MJTNONArU2WEo/zgJhT4="; postPatch = '' pushd vendor @@ -30,5 +30,6 @@ rustPlatform.buildRustPackage rec { changelog = "https://github.com/Wilfred/difftastic/raw/${version}/CHANGELOG.md"; license = licenses.mit; maintainers = with maintainers; [ ethancedwards8 figsoda ]; + mainProgram = "difft"; }; } From 81fb8b76317c509098fbcccf4f7ca086603f2201 Mon Sep 17 00:00:00 2001 From: figsoda Date: Sun, 28 Nov 2021 15:19:30 -0500 Subject: [PATCH 42/43] pipe-rename: 1.4.0 -> 1.4.1 --- pkgs/tools/misc/pipe-rename/default.nix | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pkgs/tools/misc/pipe-rename/default.nix b/pkgs/tools/misc/pipe-rename/default.nix index 15468773e422..060f3a3e23c0 100644 --- a/pkgs/tools/misc/pipe-rename/default.nix +++ b/pkgs/tools/misc/pipe-rename/default.nix @@ -2,14 +2,14 @@ rustPlatform.buildRustPackage rec { pname = "pipe-rename"; - version = "1.4.0"; + version = "1.4.1"; src = fetchCrate { inherit pname version; - sha256 = "sha256-AMBdDsn3jS2dXUnEDKZILUlLHS9FIECZhc3EjxLoOZU="; + sha256 = "sha256-3Jl/G1QqcChwkI5n1zQLBgGxT2CYdh3XdMHkF+V5SG4="; }; - cargoSha256 = "sha256-ulNyTRRFtHQ7+sRaKczLiDPIKG2TIcbbsD9x1di2ypw="; + cargoSha256 = "sha256-y5BsdkHrjJHNO66MQTbvA6kKx6tLP7jNk5UmAmslz14="; checkInputs = [ python3 ]; From 0a9dd29c98c6dd720bfb9e5e6d8a3b551fc71d94 Mon Sep 17 00:00:00 2001 From: Vikram Narayanan Date: Sun, 28 Nov 2021 11:04:05 -0800 Subject: [PATCH 43/43] netatalk: fix build --- pkgs/tools/filesystems/netatalk/default.nix | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/pkgs/tools/filesystems/netatalk/default.nix b/pkgs/tools/filesystems/netatalk/default.nix index 258b25c3693c..e5e873b9ac56 100644 --- a/pkgs/tools/filesystems/netatalk/default.nix +++ b/pkgs/tools/filesystems/netatalk/default.nix @@ -1,6 +1,6 @@ -{ fetchurl, lib, stdenv, autoreconfHook, pkg-config, perl, python +{ fetchurl, lib, stdenv, autoreconfHook, pkg-config, perl, python3 , db, libgcrypt, avahi, libiconv, pam, openssl, acl -, ed, libtirpc, libevent +, ed, libtirpc, libevent, fetchpatch }: stdenv.mkDerivation rec { @@ -15,9 +15,14 @@ stdenv.mkDerivation rec { patches = [ ./no-suid.patch ./omitLocalstatedirCreation.patch + (fetchpatch { + name = "make-afpstats-python3-compatible.patch"; + url = "https://github.com/Netatalk/Netatalk/commit/916b515705cf7ba28dc53d13202811c6e1fe6a9e.patch"; + sha256 = "sha256-DAABpYjQPJLsQBhmtP30gA357w0Qn+AsnFgAeyDC/Rg="; + }) ]; - nativeBuildInputs = [ autoreconfHook pkg-config perl python python.pkgs.wrapPython ]; + nativeBuildInputs = [ autoreconfHook pkg-config perl python3 python3.pkgs.wrapPython ]; buildInputs = [ db libgcrypt avahi libiconv pam openssl acl libevent ]; @@ -46,7 +51,7 @@ stdenv.mkDerivation rec { ''; postInstall = '' - buildPythonPath ${python.pkgs.dbus-python} + buildPythonPath ${python3.pkgs.dbus-python} patchPythonScript $out/bin/afpstats '';