From f3767cdfa1f67a8d053a5537565f4e07b55e2768 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rg=20Thalheim?= Date: Sun, 22 Sep 2024 16:48:23 +0200 Subject: [PATCH 1/8] flake.nix: switch to nixpkgs 24.11 (cherry picked from commit cd002ae6dda7be6e339d7e573ee122b5cdc50861) --- flake.lock | 20 ++++++++++---------- flake.nix | 3 ++- 2 files changed, 12 insertions(+), 11 deletions(-) diff --git a/flake.lock b/flake.lock index b5d0b881c5c..10957359ab4 100644 --- a/flake.lock +++ b/flake.lock @@ -23,11 +23,11 @@ ] }, "locked": { - "lastModified": 1719994518, - "narHash": "sha256-pQMhCCHyQGRzdfAkdJ4cIWiw+JNuWsTX7f0ZYSyz0VY=", + "lastModified": 1733312601, + "narHash": "sha256-4pDvzqnegAfRkPwO3wmwBhVi/Sye1mzps0zHWYnP88c=", "owner": "hercules-ci", "repo": "flake-parts", - "rev": "9227223f6d922fee3c7b190b2cc238a99527bbb7", + "rev": "205b12d8b7cd4802fbcb8e8ef6a0f1408781a4f9", "type": "github" }, "original": { @@ -48,11 +48,11 @@ ] }, "locked": { - "lastModified": 1721042469, - "narHash": "sha256-6FPUl7HVtvRHCCBQne7Ylp4p+dpP3P/OYuzjztZ4s70=", + "lastModified": 1734279981, + "narHash": "sha256-NdaCraHPp8iYMWzdXAt5Nv6sA3MUzlCiGiR586TCwo0=", "owner": "cachix", "repo": "git-hooks.nix", - "rev": "f451c19376071a90d8c58ab1a953c6e9840527fd", + "rev": "aa9f40c906904ebd83da78e7f328cd8aeaeae785", "type": "github" }, "original": { @@ -80,16 +80,16 @@ }, "nixpkgs": { "locked": { - "lastModified": 1723688146, - "narHash": "sha256-sqLwJcHYeWLOeP/XoLwAtYjr01TISlkOfz+NG82pbdg=", + "lastModified": 1734359947, + "narHash": "sha256-1Noao/H+N8nFB4Beoy8fgwrcOQLVm9o4zKW1ODaqK9E=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "c3d4ac725177c030b1e289015989da2ad9d56af0", + "rev": "48d12d5e70ee91fe8481378e540433a7303dbf6a", "type": "github" }, "original": { "owner": "NixOS", - "ref": "nixos-24.05", + "ref": "release-24.11", "repo": "nixpkgs", "type": "github" } diff --git a/flake.nix b/flake.nix index 5b973917264..02916e6133a 100644 --- a/flake.nix +++ b/flake.nix @@ -1,7 +1,8 @@ { description = "The purely functional package manager"; - inputs.nixpkgs.url = "github:NixOS/nixpkgs/nixos-24.05"; + inputs.nixpkgs.url = "github:NixOS/nixpkgs/release-24.11"; + inputs.nixpkgs-regression.url = "github:NixOS/nixpkgs/215d4d0fd80ca5163643b03a33fde804a29cc1e2"; inputs.nixpkgs-23-11.url = "github:NixOS/nixpkgs/a62e6edd6d5e1fa0329b8653c801147986f8d446"; inputs.flake-compat = { url = "github:edolstra/flake-compat"; flake = false; }; From 994f0261186a01585b12583bd3bf4ccbf209dfae Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rg=20Thalheim?= Date: Sun, 22 Sep 2024 16:51:29 +0200 Subject: [PATCH 2/8] use libgit2 from nixpkgs (cherry picked from commit 9131905185129034aa12839809ffd8f843107940) --- flake.lock | 24 +++--------------------- flake.nix | 4 +--- packaging/dependencies.nix | 2 -- 3 files changed, 4 insertions(+), 26 deletions(-) diff --git a/flake.lock b/flake.lock index 10957359ab4..ce484a67a2a 100644 --- a/flake.lock +++ b/flake.lock @@ -3,11 +3,11 @@ "flake-compat": { "flake": false, "locked": { - "lastModified": 1696426674, - "narHash": "sha256-kvjfFW7WAETZlt09AgDn1MrtKzP7t90Vf7vypd3OL1U=", + "lastModified": 1733328505, + "narHash": "sha256-NeCCThCEP3eCl2l/+27kNNK7QrwZB1IJCrXfrbv5oqU=", "owner": "edolstra", "repo": "flake-compat", - "rev": "0f9255e01c2351cc7d116c072cb317785dd33b33", + "rev": "ff81ac966bb2cae68946d5ed5fc4994f96d0ffec", "type": "github" }, "original": { @@ -61,23 +61,6 @@ "type": "github" } }, - "libgit2": { - "flake": false, - "locked": { - "lastModified": 1715853528, - "narHash": "sha256-J2rCxTecyLbbDdsyBWn9w7r3pbKRMkI9E7RvRgAqBdY=", - "owner": "libgit2", - "repo": "libgit2", - "rev": "36f7e21ad757a3dacc58cf7944329da6bc1d6e96", - "type": "github" - }, - "original": { - "owner": "libgit2", - "ref": "v1.8.1", - "repo": "libgit2", - "type": "github" - } - }, "nixpkgs": { "locked": { "lastModified": 1734359947, @@ -131,7 +114,6 @@ "flake-compat": "flake-compat", "flake-parts": "flake-parts", "git-hooks-nix": "git-hooks-nix", - "libgit2": "libgit2", "nixpkgs": "nixpkgs", "nixpkgs-23-11": "nixpkgs-23-11", "nixpkgs-regression": "nixpkgs-regression" diff --git a/flake.nix b/flake.nix index 02916e6133a..38c0702336f 100644 --- a/flake.nix +++ b/flake.nix @@ -6,7 +6,6 @@ inputs.nixpkgs-regression.url = "github:NixOS/nixpkgs/215d4d0fd80ca5163643b03a33fde804a29cc1e2"; inputs.nixpkgs-23-11.url = "github:NixOS/nixpkgs/a62e6edd6d5e1fa0329b8653c801147986f8d446"; inputs.flake-compat = { url = "github:edolstra/flake-compat"; flake = false; }; - inputs.libgit2 = { url = "github:libgit2/libgit2/v1.8.1"; flake = false; }; # dev tooling inputs.flake-parts.url = "github:hercules-ci/flake-parts"; @@ -19,7 +18,7 @@ inputs.git-hooks-nix.inputs.flake-compat.follows = ""; inputs.git-hooks-nix.inputs.gitignore.follows = ""; - outputs = inputs@{ self, nixpkgs, nixpkgs-regression, libgit2, ... }: + outputs = inputs@{ self, nixpkgs, nixpkgs-regression, ... }: let @@ -146,7 +145,6 @@ if prev.stdenv.hostPlatform.system == "i686-linux" then (prev.pre-commit.override (o: { dotnet-sdk = ""; })).overridePythonAttrs (o: { doCheck = false; }) else prev.pre-commit; - }; in { diff --git a/packaging/dependencies.nix b/packaging/dependencies.nix index 13766f2c040..a73c6c66a13 100644 --- a/packaging/dependencies.nix +++ b/packaging/dependencies.nix @@ -137,8 +137,6 @@ scope: { }); libgit2 = pkgs.libgit2.overrideAttrs (attrs: { - src = inputs.libgit2; - version = inputs.libgit2.lastModifiedDate; cmakeFlags = attrs.cmakeFlags or [] ++ [ "-DUSE_SSH=exec" ]; nativeBuildInputs = attrs.nativeBuildInputs or [] From 0a5a29999f8bd3e78493f4a2b591f3c49fb1973e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rg=20Thalheim?= Date: Sun, 22 Sep 2024 16:53:06 +0200 Subject: [PATCH 3/8] remove upstreamed busybox-sandbox-shell (cherry picked from commit 1a8bd84f558c44feff234652669e1474a78289fb) --- packaging/dependencies.nix | 24 ------------------------ 1 file changed, 24 deletions(-) diff --git a/packaging/dependencies.nix b/packaging/dependencies.nix index a73c6c66a13..5d1c9f1117d 100644 --- a/packaging/dependencies.nix +++ b/packaging/dependencies.nix @@ -164,30 +164,6 @@ scope: { ]; }); - busybox-sandbox-shell = pkgs.busybox-sandbox-shell or (pkgs.busybox.override { - useMusl = true; - enableStatic = true; - enableMinimal = true; - extraConfig = '' - CONFIG_FEATURE_FANCY_ECHO y - CONFIG_FEATURE_SH_MATH y - CONFIG_FEATURE_SH_MATH_64 y - - CONFIG_ASH y - CONFIG_ASH_OPTIMIZE_FOR_SIZE y - - CONFIG_ASH_ALIAS y - CONFIG_ASH_BASH_COMPAT y - CONFIG_ASH_CMDCMD y - CONFIG_ASH_ECHO y - CONFIG_ASH_GETOPTS y - CONFIG_ASH_INTERNAL_GLOB y - CONFIG_ASH_JOB_CONTROL y - CONFIG_ASH_PRINTF y - CONFIG_ASH_TEST y - ''; - }); - # TODO change in Nixpkgs, Windows works fine. First commit of # https://github.com/NixOS/nixpkgs/pull/322977 backported will fix. toml11 = pkgs.toml11.overrideAttrs (old: { From 2b9a1782301a43fa74e409cf761873986b0c084e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rg=20Thalheim?= Date: Sun, 22 Sep 2024 16:53:50 +0200 Subject: [PATCH 4/8] remove upstreamed libseccomp (cherry picked from commit 81b6b79a5641aaa29244be29bc506e86de51c87e) --- packaging/dependencies.nix | 8 -------- 1 file changed, 8 deletions(-) diff --git a/packaging/dependencies.nix b/packaging/dependencies.nix index 5d1c9f1117d..35f7d91fcee 100644 --- a/packaging/dependencies.nix +++ b/packaging/dependencies.nix @@ -111,14 +111,6 @@ scope: { requiredSystemFeatures = [ ]; }; - libseccomp = pkgs.libseccomp.overrideAttrs (_: rec { - version = "2.5.5"; - src = pkgs.fetchurl { - url = "https://github.com/seccomp/libseccomp/releases/download/v${version}/libseccomp-${version}.tar.gz"; - hash = "sha256-JIosik2bmFiqa69ScSw0r+/PnJ6Ut23OAsHJqiX7M3U="; - }; - }); - boehmgc = pkgs.boehmgc.override { enableLargeConfig = true; }; From 8431c92eb8822d07ed3350f60aec406c27e10f42 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rg=20Thalheim?= Date: Sun, 22 Sep 2024 16:56:01 +0200 Subject: [PATCH 5/8] remove upstreamed toml11 package override (cherry picked from commit b5ad051b6c705fe9a6fe442371d9f19257d68724) --- packaging/dependencies.nix | 6 ------ 1 file changed, 6 deletions(-) diff --git a/packaging/dependencies.nix b/packaging/dependencies.nix index 35f7d91fcee..109dbae27e4 100644 --- a/packaging/dependencies.nix +++ b/packaging/dependencies.nix @@ -156,12 +156,6 @@ scope: { ]; }); - # TODO change in Nixpkgs, Windows works fine. First commit of - # https://github.com/NixOS/nixpkgs/pull/322977 backported will fix. - toml11 = pkgs.toml11.overrideAttrs (old: { - meta.platforms = lib.platforms.all; - }); - inherit resolvePath filesetToSource; mkMesonDerivation = From 9e23ffd6a86c9ff9d0aba912e6b8a9f290d797c3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rg=20Thalheim?= Date: Wed, 25 Sep 2024 14:13:33 +0200 Subject: [PATCH 6/8] netbsd: disable cross-compilation Cross-compilation of curl is broken in nixpkgs. Therefore we disable it until nixpkgs fixes the underlying issues. (cherry picked from commit cf0ba0d20ebdf190141ddc1a114a4a1cf1988bd5) --- flake.nix | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/flake.nix b/flake.nix index 38c0702336f..225c4e8ad41 100644 --- a/flake.nix +++ b/flake.nix @@ -36,7 +36,8 @@ "armv6l-unknown-linux-gnueabihf" "armv7l-unknown-linux-gnueabihf" "riscv64-unknown-linux-gnu" - "x86_64-unknown-netbsd" + # Disabled because of https://github.com/NixOS/nixpkgs/issues/344423 + # "x86_64-unknown-netbsd" "x86_64-unknown-freebsd" "x86_64-w64-mingw32" ]; From b5f0879d4e274f0004f7c7b5f5ceb877231d77a5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rg=20Thalheim?= Date: Tue, 3 Dec 2024 15:51:29 +0100 Subject: [PATCH 7/8] switch to lowdown-unsandboxed package This is needed for macos support as the sandboxed version of lowdown doesn't work in the nix sandbox. (cherry picked from commit 2512619cb6b7b5fad7c5024a985996e6c875dfe1) --- doc/manual/package.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/doc/manual/package.nix b/doc/manual/package.nix index 2e6fcede3f7..f8133f2e1dd 100644 --- a/doc/manual/package.nix +++ b/doc/manual/package.nix @@ -3,7 +3,7 @@ , meson , ninja -, lowdown +, lowdown-unsandboxed , mdbook , mdbook-linkcheck , jq @@ -42,7 +42,7 @@ mkMesonDerivation (finalAttrs: { passthru.externalNativeBuildInputs = [ meson ninja - (lib.getBin lowdown) + (lib.getBin lowdown-unsandboxed) mdbook mdbook-linkcheck jq From b32f6047ce6a5b1c7908d19b43b1378ea6d1f18b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rg=20Thalheim?= Date: Mon, 9 Dec 2024 16:03:36 +0100 Subject: [PATCH 8/8] tests/nixos: disable nixos-option (cherry picked from commit 20ee83fffde3d5892cf012dedeacaf11ce45cf7c) # Conflicts: # tests/nixos/default.nix --- tests/nixos/default.nix | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/tests/nixos/default.nix b/tests/nixos/default.nix index 624bd03ebf9..27bd19f2edc 100644 --- a/tests/nixos/default.nix +++ b/tests/nixos/default.nix @@ -23,6 +23,14 @@ let nix.checkAllErrors = false; # TODO: decide which packaging stage to use. `nix-cli` is efficient, but not the same as the user-facing `everything.nix` package (`default`). Perhaps a good compromise is `everything.nix` + `noTests` defined above? nix.package = nixpkgsFor.${system}.native.nixComponents.nix-cli; +<<<<<<< HEAD +======= + + # Evaluate VMs faster + documentation.enable = false; + # this links against nix and might break with our git version. + system.tools.nixos-option.enable = false; +>>>>>>> 20ee83fff (tests/nixos: disable nixos-option) }; _module.args.nixpkgs = nixpkgs; _module.args.system = system;