From c1e7bdadb04110ace5edc86be53e825b08cf4f15 Mon Sep 17 00:00:00 2001 From: Wolfgang Walther Date: Sun, 6 Apr 2025 11:33:20 +0200 Subject: [PATCH 1/4] maintainers/scripts/haskell/regenerate-hackage-packages.sh: run nixfmt without --fast as well --- maintainers/scripts/haskell/regenerate-hackage-packages.sh | 2 +- .../configuration-hackage2nix/transitive-broken.yaml | 1 - pkgs/development/haskell-modules/hackage-packages.nix | 1 - 3 files changed, 1 insertion(+), 3 deletions(-) diff --git a/maintainers/scripts/haskell/regenerate-hackage-packages.sh b/maintainers/scripts/haskell/regenerate-hackage-packages.sh index 2f8d7ec3cbcf..e7652540ab8b 100755 --- a/maintainers/scripts/haskell/regenerate-hackage-packages.sh +++ b/maintainers/scripts/haskell/regenerate-hackage-packages.sh @@ -89,7 +89,6 @@ compiler_config="$(nix-build -A haskellPackages.cabal2nix-unstable.compilerConfi echo "Running hackage2nix to regenerate pkgs/development/haskell-modules/hackage-packages.nix …" run_hackage2nix -nixfmt pkgs/development/haskell-modules/hackage-packages.nix if [[ "$REGENERATE_TRANSITIVE" -eq 1 ]]; then @@ -103,6 +102,7 @@ run_hackage2nix fi +nixfmt pkgs/development/haskell-modules/hackage-packages.nix if [[ "$DO_COMMIT" -eq 1 ]]; then git add pkgs/development/haskell-modules/configuration-hackage2nix/transitive-broken.yaml diff --git a/pkgs/development/haskell-modules/configuration-hackage2nix/transitive-broken.yaml b/pkgs/development/haskell-modules/configuration-hackage2nix/transitive-broken.yaml index 43edcf60d6f4..35ed7cc9536d 100644 --- a/pkgs/development/haskell-modules/configuration-hackage2nix/transitive-broken.yaml +++ b/pkgs/development/haskell-modules/configuration-hackage2nix/transitive-broken.yaml @@ -1578,7 +1578,6 @@ dont-distribute-packages: - haskell-docs - haskell-eigen-util - haskell-ftp - - haskell-language-server - haskell-lsp - haskell-lsp-client - haskell-pdf-presenter diff --git a/pkgs/development/haskell-modules/hackage-packages.nix b/pkgs/development/haskell-modules/hackage-packages.nix index cf386b296546..694bff171344 100644 --- a/pkgs/development/haskell-modules/hackage-packages.nix +++ b/pkgs/development/haskell-modules/hackage-packages.nix @@ -304443,7 +304443,6 @@ self: { doHaddock = false; description = "LSP server for GHC"; license = lib.licenses.asl20; - hydraPlatforms = lib.platforms.none; maintainers = [ lib.maintainers.maralorn ]; } ) { }; From 1aeac40bfb5b0cf4ef75020768cca685d9c5cb42 Mon Sep 17 00:00:00 2001 From: Wolfgang Walther Date: Sun, 6 Apr 2025 11:18:47 +0200 Subject: [PATCH 2/4] haskellPackages.cabal2nix-unstable: 2025-03-03 -> 2025-04-01 --- pkgs/development/haskell-modules/cabal2nix-unstable.nix | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/pkgs/development/haskell-modules/cabal2nix-unstable.nix b/pkgs/development/haskell-modules/cabal2nix-unstable.nix index 538f9795cab3..3c8c37039743 100644 --- a/pkgs/development/haskell-modules/cabal2nix-unstable.nix +++ b/pkgs/development/haskell-modules/cabal2nix-unstable.nix @@ -2,6 +2,7 @@ { mkDerivation, aeson, + ansi-terminal, ansi-wl-pprint, base, bytestring, @@ -34,16 +35,17 @@ }: mkDerivation { pname = "cabal2nix"; - version = "unstable-2025-03-03"; + version = "unstable-2025-04-01"; src = fetchzip { - url = "https://github.com/NixOS/cabal2nix/archive/001aa9757c178c7d3069bc828cfea41b550c26ef.tar.gz"; - sha256 = "1f5kxhbr78h4d0i4lhfkqijc783jlrpfrv7gq2x37c94p213agg4"; + url = "https://github.com/NixOS/cabal2nix/archive/9dacfdb1ddb22f8e24c984541724784016d5231b.tar.gz"; + sha256 = "1hyfmkhicy2ha9ax0vb4ml11f6z7k9mqydm5s1g06b1z64jf4y7r"; }; postUnpack = "sourceRoot+=/cabal2nix; echo source root reset to $sourceRoot"; isLibrary = true; isExecutable = true; libraryHaskellDepends = [ aeson + ansi-terminal ansi-wl-pprint base bytestring From ae9206cad9f79b82517d2ce0602acd8d6ff85bff Mon Sep 17 00:00:00 2001 From: Wolfgang Walther Date: Sun, 6 Apr 2025 11:30:49 +0200 Subject: [PATCH 3/4] haskellPackages: regenerate package set based on current config This commit has been generated by maintainers/scripts/haskell/regenerate-hackage-packages.sh --- .../haskell-modules/hackage-packages.nix | 24 +++++++++---------- 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/pkgs/development/haskell-modules/hackage-packages.nix b/pkgs/development/haskell-modules/hackage-packages.nix index 694bff171344..857464ae4abd 100644 --- a/pkgs/development/haskell-modules/hackage-packages.nix +++ b/pkgs/development/haskell-modules/hackage-packages.nix @@ -17783,10 +17783,10 @@ self: { Cabal, convertible, HDBC, + libpq, mtl, old-time, parsec, - postgresql, time, utf8-string, }: @@ -17811,11 +17811,11 @@ self: { time utf8-string ]; - librarySystemDepends = [ postgresql ]; + librarySystemDepends = [ libpq ]; description = "PostgreSQL driver for HDBC"; license = lib.licenses.bsd3; } - ) { inherit (pkgs) postgresql; }; + ) { inherit (pkgs) libpq; }; "HDBC-postgresql-hstore" = callPackage ( { @@ -307785,8 +307785,8 @@ self: { haskelldb-hdbc, HDBC, HDBC-postgresql, + libpq, mtl, - postgresql, }: mkDerivation { pname = "haskelldb-hdbc-postgresql"; @@ -307802,13 +307802,13 @@ self: { HDBC-postgresql mtl ]; - executableSystemDepends = [ postgresql ]; + executableSystemDepends = [ libpq ]; description = "HaskellDB support for the HDBC PostgreSQL driver"; license = lib.licenses.bsd3; hydraPlatforms = lib.platforms.none; mainProgram = "DBDirect-hdbc-postgresql"; } - ) { inherit (pkgs) postgresql; }; + ) { inherit (pkgs) libpq; }; "haskelldb-hdbc-sqlite3" = callPackage ( { @@ -357352,8 +357352,8 @@ self: { mkDerivation, base, hsql, + libpq, old-time, - postgresql, }: mkDerivation { pname = "hsql-postgresql"; @@ -357364,12 +357364,12 @@ self: { hsql old-time ]; - librarySystemDepends = [ postgresql ]; + librarySystemDepends = [ libpq ]; description = "A Haskell Interface to PostgreSQL via the PQ library"; license = lib.licenses.bsd3; hydraPlatforms = lib.platforms.none; } - ) { inherit (pkgs) postgresql; }; + ) { inherit (pkgs) libpq; }; "hsql-sqlite3" = callPackage ( { @@ -417917,7 +417917,7 @@ self: { mkDerivation, base, bytestring, - postgresql, + libpq, unix, }: mkDerivation { @@ -417929,13 +417929,13 @@ self: { bytestring unix ]; - librarySystemDepends = [ postgresql ]; + librarySystemDepends = [ libpq ]; description = "libpq binding for Haskell"; license = lib.licenses.bsd3; hydraPlatforms = lib.platforms.none; broken = true; } - ) { inherit (pkgs) postgresql; }; + ) { inherit (pkgs) libpq; }; "libraft" = callPackage ( { From 2ec5fbd5f232a1fd35527ed59911a483e6a0a3c0 Mon Sep 17 00:00:00 2001 From: Wolfgang Walther Date: Sun, 6 Apr 2025 11:24:26 +0200 Subject: [PATCH 4/4] haskellPackages.postgresql-libpq-pkgconfig: use libpq v17 in pkgsStatic The libpq build in pkgsStatic has been fixed on staging in 9f3bea8dca5d7133f23adc76544e9c2555ea8277. --- .../development/haskell-modules/configuration-nix.nix | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) diff --git a/pkgs/development/haskell-modules/configuration-nix.nix b/pkgs/development/haskell-modules/configuration-nix.nix index 15565a3f4398..13a384cc0886 100644 --- a/pkgs/development/haskell-modules/configuration-nix.nix +++ b/pkgs/development/haskell-modules/configuration-nix.nix @@ -1654,16 +1654,7 @@ builtins.intersectAttrs super { librarySystemDepends = (drv.librarySystemDepends or [ ]) ++ [ pkgs.libpq ]; }) super.postgresql-libpq-configure; - postgresql-libpq-pkgconfig = - addPkgconfigDepend - # Building postgresql-libpq with PG17 in pkgsStatic works fine, but downstream can't link against it with: - # > /nix/store/7ir63m9sbqzflf3yfynn45i109w6a5iz-x86_64-unknown-linux-musl-binutils-2.43.1/bin/x86_64-unknown-linux-musl-ld: - # /nix/store/vj7fwxbyvs15zrjbb9vafxbwmc05hl70-postgresql-static-x86_64-unknown-linux-musl-17.2-dev/lib/libpq.a(fe-connect.o): - # in function `PQsetClientEncoding': - # > (.text.PQsetClientEncoding+0xdf): undefined reference to `pg_encoding_to_char' - # Falling back to v16 to work around it. - (if pkgs.stdenv.hostPlatform.isStatic then pkgs.postgresql_16 else pkgs.libpq) - super.postgresql-libpq-pkgconfig; + postgresql-libpq-pkgconfig = addPkgconfigDepend pkgs.libpq super.postgresql-libpq-pkgconfig; # Test failure is related to a GHC implementation detail of primitives and doesn't # cause actual problems in dependent packages, see https://github.com/lehins/pvar/issues/4