From cc477cd32bad97e53182611bf50c2f08cb635f65 Mon Sep 17 00:00:00 2001 From: sternenseemann Date: Thu, 31 Jul 2025 16:27:47 +0200 Subject: [PATCH 1/3] nix-serve-ng: 1.0.0-unstable-2024-12-02 -> 1.0.1-unstable-2025-05-28 --- pkgs/development/haskell-modules/configuration-nix.nix | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/pkgs/development/haskell-modules/configuration-nix.nix b/pkgs/development/haskell-modules/configuration-nix.nix index 115f247a1c4f..599fe365151e 100644 --- a/pkgs/development/haskell-modules/configuration-nix.nix +++ b/pkgs/development/haskell-modules/configuration-nix.nix @@ -344,10 +344,10 @@ builtins.intersectAttrs super { src = pkgs.fetchFromGitHub { repo = "nix-serve-ng"; owner = "aristanetworks"; - rev = "6e8d82a451fccbaa4714da8f7a3db5907bdfa96d"; - hash = "sha256-Ht5wD/n2I/tQWNgYIdmi3UQbm1FNwp9m9JmDjZEd6ng="; + rev = "1d21f73a2d563ffbb924a4244c29b35e898caefe"; + hash = "sha256-N6c3NozYqAGwmjf+k5GHOZzlcquDntrJwsZQ7O2sqtQ="; }; - version = "1.0.0-unstable-2024-12-02"; + version = "1.0.1-unstable-2025-05-28"; #editedCabalFile = null; # Doesn't declare boost dependency pkg-configDepends = (old.pkg-configDepends or [ ]) ++ [ pkgs.boost.dev ]; @@ -356,7 +356,7 @@ builtins.intersectAttrs super { broken = pkgs.stdenv.hostPlatform.system == "aarch64-darwin"; }) super.nix-serve-ng).override { - nix = pkgs.nixVersions.nix_2_24; + nix = pkgs.nixVersions.nix_2_28; }; # These packages try to access the network. From 07deefb3fa36c3ca1669ea4ff3dffc00f536a088 Mon Sep 17 00:00:00 2001 From: sternenseemann Date: Thu, 31 Jul 2025 16:30:57 +0200 Subject: [PATCH 2/3] nix-serve-ng: use overrideSrc This deals correctly deals with Hackage revisions for us if need be. --- .../haskell-modules/configuration-nix.nix | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/pkgs/development/haskell-modules/configuration-nix.nix b/pkgs/development/haskell-modules/configuration-nix.nix index 599fe365151e..423c66650f76 100644 --- a/pkgs/development/haskell-modules/configuration-nix.nix +++ b/pkgs/development/haskell-modules/configuration-nix.nix @@ -339,8 +339,9 @@ builtins.intersectAttrs super { # Add necessary reference to gtk3 package gi-dbusmenugtk3 = addPkgconfigDepend pkgs.gtk3 super.gi-dbusmenugtk3; - nix-serve-ng = - (overrideCabal (old: { + nix-serve-ng = lib.pipe (super.nix-serve-ng.override { nix = pkgs.nixVersions.nix_2_28; }) [ + # nix-serve-ng isn't regularly released to Hackage + (overrideSrc { src = pkgs.fetchFromGitHub { repo = "nix-serve-ng"; owner = "aristanetworks"; @@ -348,16 +349,16 @@ builtins.intersectAttrs super { hash = "sha256-N6c3NozYqAGwmjf+k5GHOZzlcquDntrJwsZQ7O2sqtQ="; }; version = "1.0.1-unstable-2025-05-28"; - #editedCabalFile = null; + }) + + (overrideCabal (old: { # Doesn't declare boost dependency pkg-configDepends = (old.pkg-configDepends or [ ]) ++ [ pkgs.boost.dev ]; # error: output '/nix/store/hv6lzj1nlshn8q5lirzgys8f4vgym4hg-nix-serve-ng-1.0.0-unstable-2024-12-02' is not allowed to refer to the following paths: # /nix/store/qza2y18fwkq1wzi02qywf691r42r5jfy-ghc-9.6.6 broken = pkgs.stdenv.hostPlatform.system == "aarch64-darwin"; - }) super.nix-serve-ng).override - { - nix = pkgs.nixVersions.nix_2_28; - }; + })) + ]; # These packages try to access the network. amqp = dontCheck super.amqp; From 8ebda4530f47b13debc49f02153debda93082b9e Mon Sep 17 00:00:00 2001 From: sternenseemann Date: Thu, 31 Jul 2025 16:46:29 +0200 Subject: [PATCH 3/3] nix-serve-ng: unbreak on aarch64-darwin The source of the failure is justStaticExecutables, the easiest workaround is to not do it for now. --- pkgs/development/haskell-modules/configuration-nix.nix | 3 --- pkgs/top-level/all-packages.nix | 8 +++++++- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/pkgs/development/haskell-modules/configuration-nix.nix b/pkgs/development/haskell-modules/configuration-nix.nix index 423c66650f76..affc6b8b7dc1 100644 --- a/pkgs/development/haskell-modules/configuration-nix.nix +++ b/pkgs/development/haskell-modules/configuration-nix.nix @@ -354,9 +354,6 @@ builtins.intersectAttrs super { (overrideCabal (old: { # Doesn't declare boost dependency pkg-configDepends = (old.pkg-configDepends or [ ]) ++ [ pkgs.boost.dev ]; - # error: output '/nix/store/hv6lzj1nlshn8q5lirzgys8f4vgym4hg-nix-serve-ng-1.0.0-unstable-2024-12-02' is not allowed to refer to the following paths: - # /nix/store/qza2y18fwkq1wzi02qywf691r42r5jfy-ghc-9.6.6 - broken = pkgs.stdenv.hostPlatform.system == "aarch64-darwin"; })) ]; diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index e5f6ca7bd24b..57d6eabf8e42 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -16073,7 +16073,13 @@ with pkgs; nix-tree = haskell.lib.compose.justStaticExecutables (haskellPackages.nix-tree); - nix-serve-ng = haskell.lib.compose.justStaticExecutables haskellPackages.nix-serve-ng; + nix-serve-ng = + # FIXME: manually eliminate incorrect references on aarch64-darwin, + # see https://github.com/NixOS/nixpkgs/issues/318013 + if stdenv.hostPlatform.isDarwin && stdenv.hostPlatform.isAarch64 then + haskellPackages.nix-serve-ng + else + haskell.lib.compose.justStaticExecutables haskellPackages.nix-serve-ng; nix-visualize = python3.pkgs.callPackage ../tools/package-management/nix-visualize { };