From 1110e5fe642a5120c74066d53ed0cb23cceef43c Mon Sep 17 00:00:00 2001 From: Robert Hensing Date: Wed, 12 Jun 2024 16:31:01 +0200 Subject: [PATCH 1/6] haskell-modules: Add replacements-by-name (cherry picked from commit 3ff89d8f12b0f2b3ef4cfb9873df6c76a1d9c761) --- .../haskell-modules/non-hackage-packages.nix | 15 +++++++++++++++ .../replacements-by-name/README.md | 7 +++++++ 2 files changed, 22 insertions(+) create mode 100644 pkgs/development/haskell-modules/replacements-by-name/README.md diff --git a/pkgs/development/haskell-modules/non-hackage-packages.nix b/pkgs/development/haskell-modules/non-hackage-packages.nix index c5cfbcec0313b..6e9bd5f4ff4e6 100644 --- a/pkgs/development/haskell-modules/non-hackage-packages.nix +++ b/pkgs/development/haskell-modules/non-hackage-packages.nix @@ -1,5 +1,19 @@ { pkgs, haskellLib }: +let + inherit (pkgs) lib; + inherit (lib.strings) hasSuffix removeSuffix; + + pathsByName = + lib.concatMapAttrs + (name: type: + lib.optionalAttrs (type == "regular" && hasSuffix ".nix" name) { + ${removeSuffix ".nix" name} = ./replacements-by-name + "/${name}"; + } + ) + (builtins.readDir ./replacements-by-name); +in + # EXTRA HASKELL PACKAGES NOT ON HACKAGE # # This file should only contain packages that are not in ./hackage-packages.nix. @@ -44,3 +58,4 @@ self: super: { hercules-ci-optparse-applicative = self.callPackage ../misc/haskell/hercules-ci-optparse-applicative.nix {}; } +// lib.mapAttrs (_name: path: self.callPackage path {}) pathsByName diff --git a/pkgs/development/haskell-modules/replacements-by-name/README.md b/pkgs/development/haskell-modules/replacements-by-name/README.md new file mode 100644 index 0000000000000..ce9f2bfd2f753 --- /dev/null +++ b/pkgs/development/haskell-modules/replacements-by-name/README.md @@ -0,0 +1,7 @@ +# haskell-modules/replacements-by-name + +This directory is scanned, and all `.nix` files are called in order to replace their respective packages in the `haskellPackages` set. +They're loaded after `hackage-packages.nix` but before any overrides are applied. +See [non-hackage-packages.nix](../non-hackage-packages.nix) for the implementation. + +This is used for selective backports of updates, as the hackage package set won't be updated in its entirety. From e62e4c5dd8c2608ddfecb7fe4a4690784d91899d Mon Sep 17 00:00:00 2001 From: Robert Hensing Date: Tue, 19 Nov 2024 11:45:57 +0100 Subject: [PATCH 2/6] haskellPackages.hercules-ci-cnix-store: 0.3.6.0 -> 0.3.6.1 --- .../hercules-ci-cnix-store.nix | 26 +++++++++++++++++++ 1 file changed, 26 insertions(+) create mode 100644 pkgs/development/haskell-modules/replacements-by-name/hercules-ci-cnix-store.nix diff --git a/pkgs/development/haskell-modules/replacements-by-name/hercules-ci-cnix-store.nix b/pkgs/development/haskell-modules/replacements-by-name/hercules-ci-cnix-store.nix new file mode 100644 index 0000000000000..dfa342a786501 --- /dev/null +++ b/pkgs/development/haskell-modules/replacements-by-name/hercules-ci-cnix-store.nix @@ -0,0 +1,26 @@ +{ mkDerivation, base, boost, bytestring, Cabal +, cabal-pkg-config-version-hook, conduit, containers, exceptions +, hspec, hspec-discover, inline-c, inline-c-cpp, lib, nix +, protolude, template-haskell, temporary, text, unix, unliftio-core +, vector +}: +mkDerivation { + pname = "hercules-ci-cnix-store"; + version = "0.3.6.1"; + sha256 = "35e3d21f9bbc1c83187af22a2532d227fc42a5cf3cf683a86be7bb7180f10d5e"; + setupHaskellDepends = [ base Cabal cabal-pkg-config-version-hook ]; + libraryHaskellDepends = [ + base bytestring conduit containers inline-c inline-c-cpp protolude + template-haskell unix unliftio-core vector + ]; + librarySystemDepends = [ boost ]; + libraryPkgconfigDepends = [ nix ]; + testHaskellDepends = [ + base bytestring containers exceptions hspec inline-c inline-c-cpp + protolude temporary text + ]; + testToolDepends = [ hspec-discover ]; + homepage = "https://docs.hercules-ci.com"; + description = "Haskell bindings for Nix's libstore"; + license = lib.licenses.asl20; +} From 5092b77f735380542a919fe99f3d14ad11fee047 Mon Sep 17 00:00:00 2001 From: Robert Hensing Date: Tue, 19 Nov 2024 11:46:52 +0100 Subject: [PATCH 3/6] haskellPackages.hercules-ci-cnix-expr: 0.3.6.4 -> 0.3.6.5 --- .../hercules-ci-cnix-expr.nix | 29 +++++++++++++++++++ 1 file changed, 29 insertions(+) create mode 100644 pkgs/development/haskell-modules/replacements-by-name/hercules-ci-cnix-expr.nix diff --git a/pkgs/development/haskell-modules/replacements-by-name/hercules-ci-cnix-expr.nix b/pkgs/development/haskell-modules/replacements-by-name/hercules-ci-cnix-expr.nix new file mode 100644 index 0000000000000..fea1850de2ce3 --- /dev/null +++ b/pkgs/development/haskell-modules/replacements-by-name/hercules-ci-cnix-expr.nix @@ -0,0 +1,29 @@ +{ mkDerivation, aeson, base, boost, bytestring, Cabal +, cabal-pkg-config-version-hook, conduit, containers, directory +, exceptions, filepath, hercules-ci-cnix-store, hspec +, hspec-discover, inline-c, inline-c-cpp, lib, nix, process +, protolude, QuickCheck, scientific, temporary, text, unliftio +, unordered-containers, vector +}: +mkDerivation { + pname = "hercules-ci-cnix-expr"; + version = "0.3.6.5"; + sha256 = "0adbd451815bb6ea7388c0477fe6e114e0ba019819027709855e7834aedcb6df"; + setupHaskellDepends = [ base Cabal cabal-pkg-config-version-hook ]; + libraryHaskellDepends = [ + aeson base bytestring conduit containers directory exceptions + filepath hercules-ci-cnix-store inline-c inline-c-cpp protolude + scientific text unliftio unordered-containers vector + ]; + librarySystemDepends = [ boost ]; + libraryPkgconfigDepends = [ nix ]; + testHaskellDepends = [ + aeson base bytestring containers filepath hercules-ci-cnix-store + hspec process protolude QuickCheck scientific temporary text + unordered-containers vector + ]; + testToolDepends = [ hspec-discover ]; + homepage = "https://docs.hercules-ci.com"; + description = "Bindings for the Nix evaluator"; + license = lib.licenses.asl20; +} From ee93a4f541cd0e931ec4e1ed7c8c36ad4594f120 Mon Sep 17 00:00:00 2001 From: Robert Hensing Date: Tue, 19 Nov 2024 11:47:22 +0100 Subject: [PATCH 4/6] haskellPackages.hercules-ci-agent: 0.10.4 -> 0.10.5 --- .../hercules-ci-agent.nix | 66 +++++++++++++++++++ 1 file changed, 66 insertions(+) create mode 100644 pkgs/development/haskell-modules/replacements-by-name/hercules-ci-agent.nix diff --git a/pkgs/development/haskell-modules/replacements-by-name/hercules-ci-agent.nix b/pkgs/development/haskell-modules/replacements-by-name/hercules-ci-agent.nix new file mode 100644 index 0000000000000..bae316e32d217 --- /dev/null +++ b/pkgs/development/haskell-modules/replacements-by-name/hercules-ci-agent.nix @@ -0,0 +1,66 @@ +{ mkDerivation, aeson, async, attoparsec, base, base64-bytestring +, bifunctors, binary, binary-conduit, boost, bytestring, Cabal +, cabal-pkg-config-version-hook, cachix, cachix-api, conduit +, conduit-extra, containers, directory, dlist, exceptions +, file-embed, filepath, hercules-ci-api, hercules-ci-api-agent +, hercules-ci-api-core, hercules-ci-cnix-expr +, hercules-ci-cnix-store, hostname, hspec, hspec-discover +, http-client, http-client-tls, http-conduit, HUnit, inline-c +, inline-c-cpp, katip, lens, lens-aeson, lib, lifted-async +, lifted-base, monad-control, mtl, network, network-uri, nix +, optparse-applicative, process, process-extras, profunctors +, protolude, QuickCheck, safe-exceptions, scientific, servant +, servant-auth-client, servant-client, servant-client-core, stm +, tagged, temporary, text, time, tls, tomland, transformers +, transformers-base, unbounded-delays, unix, unliftio +, unliftio-core, unordered-containers, uuid, vector, websockets +, wuss +}: +mkDerivation { + pname = "hercules-ci-agent"; + version = "0.10.5"; + sha256 = "ab1c2370dbfdca7d7b67cb1985648edabf40d99f01b88a98d6961a2706c0e591"; + isLibrary = true; + isExecutable = true; + setupHaskellDepends = [ base Cabal cabal-pkg-config-version-hook ]; + libraryHaskellDepends = [ + aeson async base binary binary-conduit bytestring conduit + containers directory dlist exceptions file-embed filepath + hercules-ci-api-agent hercules-ci-api-core hercules-ci-cnix-expr + hercules-ci-cnix-store katip lens lens-aeson lifted-async + lifted-base monad-control mtl network network-uri process + process-extras protolude safe-exceptions stm tagged temporary text + time tls transformers transformers-base unbounded-delays unix + unliftio unliftio-core uuid vector websockets wuss + ]; + executableHaskellDepends = [ + aeson async attoparsec base base64-bytestring bifunctors binary + binary-conduit bytestring cachix cachix-api conduit conduit-extra + containers directory dlist exceptions filepath hercules-ci-api + hercules-ci-api-agent hercules-ci-api-core hercules-ci-cnix-expr + hercules-ci-cnix-store hostname http-client http-client-tls + http-conduit inline-c inline-c-cpp katip lens lens-aeson + lifted-async lifted-base monad-control mtl network network-uri + optparse-applicative process process-extras profunctors protolude + safe-exceptions scientific servant servant-auth-client + servant-client servant-client-core stm temporary text time tomland + transformers transformers-base unix unliftio unliftio-core + unordered-containers uuid vector websockets wuss + ]; + executableSystemDepends = [ boost ]; + executablePkgconfigDepends = [ nix ]; + testHaskellDepends = [ + aeson async attoparsec base bifunctors binary binary-conduit + bytestring conduit containers exceptions filepath + hercules-ci-api-agent hercules-ci-api-core hercules-ci-cnix-store + hspec HUnit katip lens lens-aeson lifted-async lifted-base + monad-control mtl process profunctors protolude QuickCheck + safe-exceptions scientific stm tagged temporary text tomland + transformers transformers-base unliftio-core unordered-containers + uuid vector + ]; + testToolDepends = [ hspec-discover ]; + homepage = "https://docs.hercules-ci.com"; + description = "Runs Continuous Integration tasks on your machines"; + license = lib.licenses.asl20; +} From 19b4b39db4b02959e59e7975f64518d05c5e998f Mon Sep 17 00:00:00 2001 From: Robert Hensing Date: Tue, 19 Nov 2024 12:00:01 +0100 Subject: [PATCH 5/6] hercules-ci-cnix-store/nix: 2.18 -> 2.24 --- pkgs/development/haskell-modules/configuration-nix.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkgs/development/haskell-modules/configuration-nix.nix b/pkgs/development/haskell-modules/configuration-nix.nix index 7a85abfba34ed..374f22aeec00c 100644 --- a/pkgs/development/haskell-modules/configuration-nix.nix +++ b/pkgs/development/haskell-modules/configuration-nix.nix @@ -1181,7 +1181,7 @@ self: super: builtins.intersectAttrs super { hercules-ci-cnix-store = overrideCabal (old: { passthru = old.passthru or { } // { - nixPackage = pkgs.nixVersions.nix_2_19; + nixPackage = pkgs.nixVersions.nix_2_24; }; }) (super.hercules-ci-cnix-store.override { From 9314da7ee8d2aedfb15193b8c489da51efe52bb5 Mon Sep 17 00:00:00 2001 From: Robert Hensing Date: Tue, 19 Nov 2024 12:15:46 +0100 Subject: [PATCH 6/6] Format --- .../hercules-ci-agent.nix | 281 +++++++++++++++--- .../hercules-ci-cnix-expr.nix | 79 ++++- .../hercules-ci-cnix-store.nix | 59 +++- 3 files changed, 350 insertions(+), 69 deletions(-) diff --git a/pkgs/development/haskell-modules/replacements-by-name/hercules-ci-agent.nix b/pkgs/development/haskell-modules/replacements-by-name/hercules-ci-agent.nix index bae316e32d217..cd605465d0606 100644 --- a/pkgs/development/haskell-modules/replacements-by-name/hercules-ci-agent.nix +++ b/pkgs/development/haskell-modules/replacements-by-name/hercules-ci-agent.nix @@ -1,20 +1,82 @@ -{ mkDerivation, aeson, async, attoparsec, base, base64-bytestring -, bifunctors, binary, binary-conduit, boost, bytestring, Cabal -, cabal-pkg-config-version-hook, cachix, cachix-api, conduit -, conduit-extra, containers, directory, dlist, exceptions -, file-embed, filepath, hercules-ci-api, hercules-ci-api-agent -, hercules-ci-api-core, hercules-ci-cnix-expr -, hercules-ci-cnix-store, hostname, hspec, hspec-discover -, http-client, http-client-tls, http-conduit, HUnit, inline-c -, inline-c-cpp, katip, lens, lens-aeson, lib, lifted-async -, lifted-base, monad-control, mtl, network, network-uri, nix -, optparse-applicative, process, process-extras, profunctors -, protolude, QuickCheck, safe-exceptions, scientific, servant -, servant-auth-client, servant-client, servant-client-core, stm -, tagged, temporary, text, time, tls, tomland, transformers -, transformers-base, unbounded-delays, unix, unliftio -, unliftio-core, unordered-containers, uuid, vector, websockets -, wuss +{ + mkDerivation, + aeson, + async, + attoparsec, + base, + base64-bytestring, + bifunctors, + binary, + binary-conduit, + boost, + bytestring, + Cabal, + cabal-pkg-config-version-hook, + cachix, + cachix-api, + conduit, + conduit-extra, + containers, + directory, + dlist, + exceptions, + file-embed, + filepath, + hercules-ci-api, + hercules-ci-api-agent, + hercules-ci-api-core, + hercules-ci-cnix-expr, + hercules-ci-cnix-store, + hostname, + hspec, + hspec-discover, + http-client, + http-client-tls, + http-conduit, + HUnit, + inline-c, + inline-c-cpp, + katip, + lens, + lens-aeson, + lib, + lifted-async, + lifted-base, + monad-control, + mtl, + network, + network-uri, + nix, + optparse-applicative, + process, + process-extras, + profunctors, + protolude, + QuickCheck, + safe-exceptions, + scientific, + servant, + servant-auth-client, + servant-client, + servant-client-core, + stm, + tagged, + temporary, + text, + time, + tls, + tomland, + transformers, + transformers-base, + unbounded-delays, + unix, + unliftio, + unliftio-core, + unordered-containers, + uuid, + vector, + websockets, + wuss, }: mkDerivation { pname = "hercules-ci-agent"; @@ -22,42 +84,169 @@ mkDerivation { sha256 = "ab1c2370dbfdca7d7b67cb1985648edabf40d99f01b88a98d6961a2706c0e591"; isLibrary = true; isExecutable = true; - setupHaskellDepends = [ base Cabal cabal-pkg-config-version-hook ]; + setupHaskellDepends = [ + base + Cabal + cabal-pkg-config-version-hook + ]; libraryHaskellDepends = [ - aeson async base binary binary-conduit bytestring conduit - containers directory dlist exceptions file-embed filepath - hercules-ci-api-agent hercules-ci-api-core hercules-ci-cnix-expr - hercules-ci-cnix-store katip lens lens-aeson lifted-async - lifted-base monad-control mtl network network-uri process - process-extras protolude safe-exceptions stm tagged temporary text - time tls transformers transformers-base unbounded-delays unix - unliftio unliftio-core uuid vector websockets wuss + aeson + async + base + binary + binary-conduit + bytestring + conduit + containers + directory + dlist + exceptions + file-embed + filepath + hercules-ci-api-agent + hercules-ci-api-core + hercules-ci-cnix-expr + hercules-ci-cnix-store + katip + lens + lens-aeson + lifted-async + lifted-base + monad-control + mtl + network + network-uri + process + process-extras + protolude + safe-exceptions + stm + tagged + temporary + text + time + tls + transformers + transformers-base + unbounded-delays + unix + unliftio + unliftio-core + uuid + vector + websockets + wuss ]; executableHaskellDepends = [ - aeson async attoparsec base base64-bytestring bifunctors binary - binary-conduit bytestring cachix cachix-api conduit conduit-extra - containers directory dlist exceptions filepath hercules-ci-api - hercules-ci-api-agent hercules-ci-api-core hercules-ci-cnix-expr - hercules-ci-cnix-store hostname http-client http-client-tls - http-conduit inline-c inline-c-cpp katip lens lens-aeson - lifted-async lifted-base monad-control mtl network network-uri - optparse-applicative process process-extras profunctors protolude - safe-exceptions scientific servant servant-auth-client - servant-client servant-client-core stm temporary text time tomland - transformers transformers-base unix unliftio unliftio-core - unordered-containers uuid vector websockets wuss + aeson + async + attoparsec + base + base64-bytestring + bifunctors + binary + binary-conduit + bytestring + cachix + cachix-api + conduit + conduit-extra + containers + directory + dlist + exceptions + filepath + hercules-ci-api + hercules-ci-api-agent + hercules-ci-api-core + hercules-ci-cnix-expr + hercules-ci-cnix-store + hostname + http-client + http-client-tls + http-conduit + inline-c + inline-c-cpp + katip + lens + lens-aeson + lifted-async + lifted-base + monad-control + mtl + network + network-uri + optparse-applicative + process + process-extras + profunctors + protolude + safe-exceptions + scientific + servant + servant-auth-client + servant-client + servant-client-core + stm + temporary + text + time + tomland + transformers + transformers-base + unix + unliftio + unliftio-core + unordered-containers + uuid + vector + websockets + wuss ]; executableSystemDepends = [ boost ]; executablePkgconfigDepends = [ nix ]; testHaskellDepends = [ - aeson async attoparsec base bifunctors binary binary-conduit - bytestring conduit containers exceptions filepath - hercules-ci-api-agent hercules-ci-api-core hercules-ci-cnix-store - hspec HUnit katip lens lens-aeson lifted-async lifted-base - monad-control mtl process profunctors protolude QuickCheck - safe-exceptions scientific stm tagged temporary text tomland - transformers transformers-base unliftio-core unordered-containers - uuid vector + aeson + async + attoparsec + base + bifunctors + binary + binary-conduit + bytestring + conduit + containers + exceptions + filepath + hercules-ci-api-agent + hercules-ci-api-core + hercules-ci-cnix-store + hspec + HUnit + katip + lens + lens-aeson + lifted-async + lifted-base + monad-control + mtl + process + profunctors + protolude + QuickCheck + safe-exceptions + scientific + stm + tagged + temporary + text + tomland + transformers + transformers-base + unliftio-core + unordered-containers + uuid + vector ]; testToolDepends = [ hspec-discover ]; homepage = "https://docs.hercules-ci.com"; diff --git a/pkgs/development/haskell-modules/replacements-by-name/hercules-ci-cnix-expr.nix b/pkgs/development/haskell-modules/replacements-by-name/hercules-ci-cnix-expr.nix index fea1850de2ce3..902521b22a60c 100644 --- a/pkgs/development/haskell-modules/replacements-by-name/hercules-ci-cnix-expr.nix +++ b/pkgs/development/haskell-modules/replacements-by-name/hercules-ci-cnix-expr.nix @@ -1,26 +1,79 @@ -{ mkDerivation, aeson, base, boost, bytestring, Cabal -, cabal-pkg-config-version-hook, conduit, containers, directory -, exceptions, filepath, hercules-ci-cnix-store, hspec -, hspec-discover, inline-c, inline-c-cpp, lib, nix, process -, protolude, QuickCheck, scientific, temporary, text, unliftio -, unordered-containers, vector +{ + mkDerivation, + aeson, + base, + boost, + bytestring, + Cabal, + cabal-pkg-config-version-hook, + conduit, + containers, + directory, + exceptions, + filepath, + hercules-ci-cnix-store, + hspec, + hspec-discover, + inline-c, + inline-c-cpp, + lib, + nix, + process, + protolude, + QuickCheck, + scientific, + temporary, + text, + unliftio, + unordered-containers, + vector, }: mkDerivation { pname = "hercules-ci-cnix-expr"; version = "0.3.6.5"; sha256 = "0adbd451815bb6ea7388c0477fe6e114e0ba019819027709855e7834aedcb6df"; - setupHaskellDepends = [ base Cabal cabal-pkg-config-version-hook ]; + setupHaskellDepends = [ + base + Cabal + cabal-pkg-config-version-hook + ]; libraryHaskellDepends = [ - aeson base bytestring conduit containers directory exceptions - filepath hercules-ci-cnix-store inline-c inline-c-cpp protolude - scientific text unliftio unordered-containers vector + aeson + base + bytestring + conduit + containers + directory + exceptions + filepath + hercules-ci-cnix-store + inline-c + inline-c-cpp + protolude + scientific + text + unliftio + unordered-containers + vector ]; librarySystemDepends = [ boost ]; libraryPkgconfigDepends = [ nix ]; testHaskellDepends = [ - aeson base bytestring containers filepath hercules-ci-cnix-store - hspec process protolude QuickCheck scientific temporary text - unordered-containers vector + aeson + base + bytestring + containers + filepath + hercules-ci-cnix-store + hspec + process + protolude + QuickCheck + scientific + temporary + text + unordered-containers + vector ]; testToolDepends = [ hspec-discover ]; homepage = "https://docs.hercules-ci.com"; diff --git a/pkgs/development/haskell-modules/replacements-by-name/hercules-ci-cnix-store.nix b/pkgs/development/haskell-modules/replacements-by-name/hercules-ci-cnix-store.nix index dfa342a786501..3ded910b3eda5 100644 --- a/pkgs/development/haskell-modules/replacements-by-name/hercules-ci-cnix-store.nix +++ b/pkgs/development/haskell-modules/replacements-by-name/hercules-ci-cnix-store.nix @@ -1,23 +1,62 @@ -{ mkDerivation, base, boost, bytestring, Cabal -, cabal-pkg-config-version-hook, conduit, containers, exceptions -, hspec, hspec-discover, inline-c, inline-c-cpp, lib, nix -, protolude, template-haskell, temporary, text, unix, unliftio-core -, vector +{ + mkDerivation, + base, + boost, + bytestring, + Cabal, + cabal-pkg-config-version-hook, + conduit, + containers, + exceptions, + hspec, + hspec-discover, + inline-c, + inline-c-cpp, + lib, + nix, + protolude, + template-haskell, + temporary, + text, + unix, + unliftio-core, + vector, }: mkDerivation { pname = "hercules-ci-cnix-store"; version = "0.3.6.1"; sha256 = "35e3d21f9bbc1c83187af22a2532d227fc42a5cf3cf683a86be7bb7180f10d5e"; - setupHaskellDepends = [ base Cabal cabal-pkg-config-version-hook ]; + setupHaskellDepends = [ + base + Cabal + cabal-pkg-config-version-hook + ]; libraryHaskellDepends = [ - base bytestring conduit containers inline-c inline-c-cpp protolude - template-haskell unix unliftio-core vector + base + bytestring + conduit + containers + inline-c + inline-c-cpp + protolude + template-haskell + unix + unliftio-core + vector ]; librarySystemDepends = [ boost ]; libraryPkgconfigDepends = [ nix ]; testHaskellDepends = [ - base bytestring containers exceptions hspec inline-c inline-c-cpp - protolude temporary text + base + bytestring + containers + exceptions + hspec + inline-c + inline-c-cpp + protolude + temporary + text ]; testToolDepends = [ hspec-discover ]; homepage = "https://docs.hercules-ci.com";