From c41681c9ed14e0f3c2363cf772385dc892b875b8 Mon Sep 17 00:00:00 2001 From: erics118 <52634785+erics118@users.noreply.github.com> Date: Thu, 4 Jun 2026 17:36:21 -0400 Subject: [PATCH] hadolint: add back justStaticExecutables and fix Paths_ references on aarch64-darwin closure goes from 4.3 Gib to 127.8 Mib removes outdated `disableCabalFlag "static"`, as such a flag is no longer defined --- .../haskell-modules/configuration-darwin.nix | 7 +++++++ pkgs/development/haskell-modules/configuration-nix.nix | 4 ---- pkgs/top-level/all-packages.nix | 10 +--------- 3 files changed, 8 insertions(+), 13 deletions(-) diff --git a/pkgs/development/haskell-modules/configuration-darwin.nix b/pkgs/development/haskell-modules/configuration-darwin.nix index 487db708c48d..bdab68723322 100644 --- a/pkgs/development/haskell-modules/configuration-darwin.nix +++ b/pkgs/development/haskell-modules/configuration-darwin.nix @@ -418,6 +418,13 @@ self: super: ${old.postInstall or ""} ''; }) super.happy; + hadolint = overrideCabal (old: { + postInstall = '' + remove-references-to -t ${self.ShellCheck} "$out/bin/hadolint" + + ${old.postInstall or ""} + ''; + }) super.hadolint; # https://github.com/fpco/unliftio/issues/87 unliftio = dontCheck super.unliftio; diff --git a/pkgs/development/haskell-modules/configuration-nix.nix b/pkgs/development/haskell-modules/configuration-nix.nix index eae4e1c104f6..87ee6ea7c63c 100644 --- a/pkgs/development/haskell-modules/configuration-nix.nix +++ b/pkgs/development/haskell-modules/configuration-nix.nix @@ -1641,10 +1641,6 @@ builtins.intersectAttrs super { # there are three very heavy test suites that need external repos, one requires network access hevm = dontCheck super.hevm; - # hadolint enables static linking by default in the cabal file, so we have to explicitly disable it. - # https://github.com/hadolint/hadolint/commit/e1305042c62d52c2af4d77cdce5d62f6a0a3ce7b - hadolint = disableCabalFlag "static" super.hadolint; - # Test suite tries to execute the build product "doctest-driver-gen", but it's not in $PATH. doctest-driver-gen = dontCheck super.doctest-driver-gen; diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 6e67f3134d8c..c24083da2fc9 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -5493,15 +5493,7 @@ with pkgs; griffe = with python3Packages; toPythonApplication griffe; - hadolint = - # TODO: Erroneous references to GHC on aarch64-darwin: https://github.com/NixOS/nixpkgs/issues/318013 - ( - if stdenv.hostPlatform.isDarwin && stdenv.hostPlatform.isAarch64 then - lib.id - else - haskell.lib.compose.justStaticExecutables - ) - haskellPackages.hadolint; + hadolint = haskell.lib.compose.justStaticExecutables haskellPackages.hadolint; iaca_2_1 = callPackage ../development/tools/iaca/2.1.nix { }; iaca_3_0 = callPackage ../development/tools/iaca/3.0.nix { };