From 1516a75687501f31aa91824c2e4183dcb281bc4d Mon Sep 17 00:00:00 2001 From: rnhmjoj Date: Wed, 5 Jun 2024 12:42:11 +0200 Subject: [PATCH 01/24] haskellPackages.leveldb-haskell: unbreak --- .../haskell-modules/configuration-common.nix | 14 ++++++++++---- .../configuration-hackage2nix/broken.yaml | 1 - 2 files changed, 10 insertions(+), 5 deletions(-) diff --git a/pkgs/development/haskell-modules/configuration-common.nix b/pkgs/development/haskell-modules/configuration-common.nix index 552e5309cdb6e..c88ffdd329bb5 100644 --- a/pkgs/development/haskell-modules/configuration-common.nix +++ b/pkgs/development/haskell-modules/configuration-common.nix @@ -220,10 +220,16 @@ self: super: { fused-effects-random = doJailbreak super.fused-effects-random; fused-effects-readline = doJailbreak super.fused-effects-readline; - # fix tests failure for base≥4.15 (https://github.com/kim/leveldb-haskell/pull/41) - leveldb-haskell = appendPatch (fetchpatch { - url = "https://github.com/kim/leveldb-haskell/commit/f5249081f589233890ddb1945ec548ca9fb717cf.patch"; - sha256 = "14gllipl28lqry73c5dnclsskzk1bsrrgazibl4lkl8z98j2csjb"; + leveldb-haskell = overrideCabal (drv: { + version = "2024-05-05-unstable"; + # Fix tests on mtl ≥ 2.3 + # https://github.com/kim/leveldb-haskell/pull/42 + src = pkgs.fetchFromGitHub { + owner = "kim"; + repo = "leveldb-haskell"; + rev = "3a505f3a7de0f5d14463538d7c2c9a9881a60eb9"; + sha256 = "sha256-okUn5ZuWcj8vPr0GWXvO1LygNCrDfttkDaUoOt+FLA0="; + }; }) super.leveldb-haskell; # Arion's test suite needs a Nixpkgs, which is cumbersome to do from Nixpkgs diff --git a/pkgs/development/haskell-modules/configuration-hackage2nix/broken.yaml b/pkgs/development/haskell-modules/configuration-hackage2nix/broken.yaml index fe1e0b579ba38..d9741609b2aee 100644 --- a/pkgs/development/haskell-modules/configuration-hackage2nix/broken.yaml +++ b/pkgs/development/haskell-modules/configuration-hackage2nix/broken.yaml @@ -3448,7 +3448,6 @@ broken-packages: - lenz-template # failure in job https://hydra.nixos.org/build/233206822 at 2023-09-02 - less-arbitrary # failure in job https://hydra.nixos.org/build/233231412 at 2023-09-02 - Level0 # failure in job https://hydra.nixos.org/build/233220758 at 2023-09-02 - - leveldb-haskell # failure in job https://hydra.nixos.org/build/252739424 at 2024-03-16 - level-monad # failure in job https://hydra.nixos.org/build/233257036 at 2023-09-02 - levmar # failure in job https://hydra.nixos.org/build/233254731 at 2023-09-02 - lfst # failure in job https://hydra.nixos.org/build/233240622 at 2023-09-02 From 9106eb8ad99147c1bc5830a903479672d2bd8cdf Mon Sep 17 00:00:00 2001 From: rnhmjoj Date: Wed, 5 Jun 2024 12:49:45 +0200 Subject: [PATCH 02/24] haskellPackages.selda: unbreak --- pkgs/development/haskell-modules/configuration-common.nix | 6 +++--- .../haskell-modules/configuration-hackage2nix/broken.yaml | 1 - 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/pkgs/development/haskell-modules/configuration-common.nix b/pkgs/development/haskell-modules/configuration-common.nix index c88ffdd329bb5..5252b2e6c1a07 100644 --- a/pkgs/development/haskell-modules/configuration-common.nix +++ b/pkgs/development/haskell-modules/configuration-common.nix @@ -963,12 +963,12 @@ self: super: { # See https://github.com/valderman/selda/issues/187 inherit (let mkSeldaPackage = name: overrideCabal (drv: { - version = "2023-02-05-unstable"; + version = "2024-05-05-unstable"; src = pkgs.fetchFromGitHub { owner = "valderman"; repo = "selda"; - rev = "ab9619db13b93867d1a244441bb4de03d3e1dadb"; - hash = "sha256-P0nqAYzbeTyEEgzMij/3mKcs++/p/Wgc7Y6bDudXt2U="; + rev = "50c3ba5c5da72bb758a4112363ba2fe1c0e968ea"; + hash = "sha256-LEAJsSsDL0mmVHntnI16fH8m5DmePfcU0hFw9ErqTgQ="; } + "/${name}"; }) super.${name}; in diff --git a/pkgs/development/haskell-modules/configuration-hackage2nix/broken.yaml b/pkgs/development/haskell-modules/configuration-hackage2nix/broken.yaml index d9741609b2aee..49153fe02b732 100644 --- a/pkgs/development/haskell-modules/configuration-hackage2nix/broken.yaml +++ b/pkgs/development/haskell-modules/configuration-hackage2nix/broken.yaml @@ -5243,7 +5243,6 @@ broken-packages: - secure-sockets # failure in job https://hydra.nixos.org/build/233254170 at 2023-09-02 - secureUDP # failure in job https://hydra.nixos.org/build/233215410 at 2023-09-02 - SegmentTree # failure in job https://hydra.nixos.org/build/233216161 at 2023-09-02 - - selda # failure in job https://hydra.nixos.org/build/252735635 at 2024-03-16 - selda-postgresql # failure in job https://hydra.nixos.org/build/245539286 at 2024-01-02 - selectors # failure in job https://hydra.nixos.org/build/233227433 at 2023-09-02 - selenium # failure in job https://hydra.nixos.org/build/233214276 at 2023-09-02 From 4636757b18c6c3496f74d5908b871ba56c8273f6 Mon Sep 17 00:00:00 2001 From: rnhmjoj Date: Wed, 5 Jun 2024 12:46:17 +0200 Subject: [PATCH 03/24] haskellPackages.scat: unbreak --- .../development/haskell-modules/configuration-common.nix | 9 ++++----- .../configuration-hackage2nix/broken.yaml | 1 - 2 files changed, 4 insertions(+), 6 deletions(-) diff --git a/pkgs/development/haskell-modules/configuration-common.nix b/pkgs/development/haskell-modules/configuration-common.nix index 5252b2e6c1a07..20db1716580fd 100644 --- a/pkgs/development/haskell-modules/configuration-common.nix +++ b/pkgs/development/haskell-modules/configuration-common.nix @@ -1359,18 +1359,17 @@ self: super: { ''; }) super.PortMidi; - # Fix for base >= 4.11 scat = overrideCabal (drv: { patches = [ - # Fix build with base >= 4.11 + # Fix build with base >= 4.11 (https://github.com/redelmann/scat/pull/6) (fetchpatch { url = "https://github.com/redelmann/scat/commit/429f22944b7634b8789cb3805292bcc2b23e3e9f.diff"; hash = "sha256-FLr1KfBaSYzI6MiZIBY1CkgAb5sThvvgjrSAN8EV0h4="; }) - # Fix build with vector >= 0.13 + # Fix build with vector >= 0.13, mtl >= 2.3 (https://github.com/redelmann/scat/pull/8) (fetchpatch { - url = "https://github.com/redelmann/scat/commit/e21cc9c17b5b605b5bc0aacad66d44bbe0beb8c4.diff"; - hash = "sha256-MifHb2EKZx8skOcs+2t54CzxAS4PaEC0OTEfq4yVXzk="; + url = "https://github.com/redelmann/scat/compare/e8e064f7e6a152fe25a6ccd743573a16974239d0..c6a3636548d628f32d8edc73a333188ce24141a7.patch"; + hash = "sha256-BU4MUn/TnZHpZBlX1vDHE7QZva5yhlLTb8zwpx7UScI"; }) ]; }) super.scat; diff --git a/pkgs/development/haskell-modules/configuration-hackage2nix/broken.yaml b/pkgs/development/haskell-modules/configuration-hackage2nix/broken.yaml index 49153fe02b732..63db507320559 100644 --- a/pkgs/development/haskell-modules/configuration-hackage2nix/broken.yaml +++ b/pkgs/development/haskell-modules/configuration-hackage2nix/broken.yaml @@ -5187,7 +5187,6 @@ broken-packages: - scale # failure in job https://hydra.nixos.org/build/233222189 at 2023-09-02 - scaleimage # failure in job https://hydra.nixos.org/build/233240688 at 2023-09-02 - scalendar # failure in job https://hydra.nixos.org/build/233206581 at 2023-09-02 - - scat # failure in job https://hydra.nixos.org/build/252730427 at 2024-03-16 - scc # failure in job https://hydra.nixos.org/build/233247446 at 2023-09-02 - scgi # failure in job https://hydra.nixos.org/build/233247314 at 2023-09-02 - schedevr # failure in job https://hydra.nixos.org/build/233240124 at 2023-09-02 From 6457cf0c0141933ed396d2544b8f52202d5d6803 Mon Sep 17 00:00:00 2001 From: Tom Sydney Kerckhove Date: Tue, 4 Jun 2024 13:52:30 +0200 Subject: [PATCH 04/24] haskell.compiler.ghc96: hadrian patch fix for fully_static --- pkgs/development/compilers/ghc/common-hadrian.nix | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/pkgs/development/compilers/ghc/common-hadrian.nix b/pkgs/development/compilers/ghc/common-hadrian.nix index 2ebb552ec6097..4c74d81e67c96 100644 --- a/pkgs/development/compilers/ghc/common-hadrian.nix +++ b/pkgs/development/compilers/ghc/common-hadrian.nix @@ -13,6 +13,7 @@ , pkgsBuildTarget , pkgsHostTarget , targetPackages +, fetchpatch # build-tools , bootPkgs @@ -170,6 +171,13 @@ then ./docs-sphinx-7-ghc98.patch else ./docs-sphinx-7.patch ) ] + ++ lib.optionals (lib.versionAtLeast version "9.6" && lib.versionOlder version "9.8") [ + (fetchpatch { + name = "fix-fully_static.patch"; + url = "https://gitlab.haskell.org/ghc/ghc/-/commit/1bb24432ff77e11a0340a7d8586e151e15bba2a1.diff"; + hash = "sha256-MpvTmFFsNiPDoOp9BhZyWeapeibQ77zgEV+xzZ1UAXs="; + }) + ] ++ lib.optionals (stdenv.targetPlatform.isDarwin && stdenv.targetPlatform.isAarch64) [ # Prevent the paths module from emitting symbols that we don't use # when building with separate outputs. @@ -555,10 +563,6 @@ stdenv.mkDerivation ({ ] ++ lib.teams.haskell.members; timeout = 24 * 3600; inherit (ghc.meta) license platforms; - # https://github.com/NixOS/nixpkgs/issues/208959 - broken = - (lib.versionAtLeast version "9.6" && lib.versionOlder version "9.8") - && stdenv.targetPlatform.isStatic; }; dontStrip = targetPlatform.useAndroidPrebuilt || targetPlatform.isWasm; From 3fab5ebff01f5b9094ab96d207438ad1e271e0b1 Mon Sep 17 00:00:00 2001 From: Alexandre Esteves Date: Fri, 31 May 2024 23:39:59 +0100 Subject: [PATCH 05/24] haskellPackages.lens-sop: fix build --- .../haskell-modules/configuration-common.nix | 12 ------------ .../configuration-hackage2nix/broken.yaml | 1 - .../configuration-hackage2nix/transitive-broken.yaml | 1 - .../development/haskell-modules/hackage-packages.nix | 3 --- 4 files changed, 17 deletions(-) diff --git a/pkgs/development/haskell-modules/configuration-common.nix b/pkgs/development/haskell-modules/configuration-common.nix index cefce06d8431d..187fb2c5041e4 100644 --- a/pkgs/development/haskell-modules/configuration-common.nix +++ b/pkgs/development/haskell-modules/configuration-common.nix @@ -2647,18 +2647,6 @@ self: super: { # https://github.com/ngless-toolkit/ngless/issues/152 NGLess = dontCheck super.NGLess; - # Raise version bounds: https://github.com/well-typed/lens-sop/pull/4 - lens-sop = appendPatches [ - (fetchpatch { - url = "https://github.com/well-typed/lens-sop/commit/d8657f27c12191a7c0a91701c0fcd9a590e0090e.patch"; - sha256 = "sha256-9ODfbOb6Bs3EVTY9b7cUvkNmqzzZPWUmgmlAneaN3Tw="; - }) - (fetchpatch { - url = "https://github.com/well-typed/lens-sop/commit/b7ecffdeb836d19373871659e2f8cd24da6f7312.patch"; - sha256 = "sha256-hDUQ2fW9Qyom65YvtW9bsbz7XtueRmdsAbAB42D+gu4="; - }) - ] super.lens-sop; - # Raise version bounds: https://github.com/kosmikus/records-sop/pull/15 records-sop = appendPatch (fetchpatch { url = "https://github.com/kosmikus/records-sop/commit/fb149f453a816ff14d0cb20b3ea56b80ff49d9f1.patch"; diff --git a/pkgs/development/haskell-modules/configuration-hackage2nix/broken.yaml b/pkgs/development/haskell-modules/configuration-hackage2nix/broken.yaml index fe1e0b579ba38..0f9a395bb8888 100644 --- a/pkgs/development/haskell-modules/configuration-hackage2nix/broken.yaml +++ b/pkgs/development/haskell-modules/configuration-hackage2nix/broken.yaml @@ -3436,7 +3436,6 @@ broken-packages: - lens-process # failure in job https://hydra.nixos.org/build/233242948 at 2023-09-02 - lensref # failure in job https://hydra.nixos.org/build/233205479 at 2023-09-02 - lens-simple # failure in job https://hydra.nixos.org/build/233245452 at 2023-09-02 - - lens-sop # failure in job https://hydra.nixos.org/build/259961739 at 2024-05-19 - lens-tell # failure in job https://hydra.nixos.org/build/233234619 at 2023-09-02 - lens-text-encoding # failure in job https://hydra.nixos.org/build/233222713 at 2023-09-02 - lens-th-rewrite # failure in job https://hydra.nixos.org/build/233201025 at 2023-09-02 diff --git a/pkgs/development/haskell-modules/configuration-hackage2nix/transitive-broken.yaml b/pkgs/development/haskell-modules/configuration-hackage2nix/transitive-broken.yaml index b048efbfb5455..6848451f3acac 100644 --- a/pkgs/development/haskell-modules/configuration-hackage2nix/transitive-broken.yaml +++ b/pkgs/development/haskell-modules/configuration-hackage2nix/transitive-broken.yaml @@ -2424,7 +2424,6 @@ dont-distribute-packages: - json-query - json-rpc-client - json-schema - - json-sop - json-spec-elm - json-spec-elm-servant - json-spec-openapi diff --git a/pkgs/development/haskell-modules/hackage-packages.nix b/pkgs/development/haskell-modules/hackage-packages.nix index 23f3c5c2b4332..df67fccfa595d 100644 --- a/pkgs/development/haskell-modules/hackage-packages.nix +++ b/pkgs/development/haskell-modules/hackage-packages.nix @@ -179537,7 +179537,6 @@ self: { ]; description = "Generics JSON (de)serialization using generics-sop"; license = lib.licenses.bsd3; - hydraPlatforms = lib.platforms.none; maintainers = [ lib.maintainers.alexfmpe ]; }) {}; @@ -189161,9 +189160,7 @@ self: { ]; description = "Computing lenses generically using generics-sop"; license = lib.licenses.bsd3; - hydraPlatforms = lib.platforms.none; maintainers = [ lib.maintainers.alexfmpe ]; - broken = true; }) {}; "lens-tell" = callPackage From fb516932c7bc35d583127976382597b1b7e597ca Mon Sep 17 00:00:00 2001 From: Seth Speaks Date: Sat, 1 Jun 2024 01:15:09 -0700 Subject: [PATCH 06/24] fix Spock-core haskellPackage --- pkgs/development/haskell-modules/configuration-common.nix | 8 ++++++++ .../haskell-modules/configuration-hackage2nix/broken.yaml | 1 - .../configuration-hackage2nix/transitive-broken.yaml | 5 ----- pkgs/development/haskell-modules/hackage-packages.nix | 7 ------- 4 files changed, 8 insertions(+), 13 deletions(-) diff --git a/pkgs/development/haskell-modules/configuration-common.nix b/pkgs/development/haskell-modules/configuration-common.nix index 187fb2c5041e4..04307c48c3133 100644 --- a/pkgs/development/haskell-modules/configuration-common.nix +++ b/pkgs/development/haskell-modules/configuration-common.nix @@ -1691,6 +1691,14 @@ self: super: { # Test suite fails to compile https://github.com/agrafix/Spock/issues/177 Spock = dontCheck super.Spock; + Spock-core = appendPatches [ + (fetchpatch { + url = "https://github.com/agrafix/Spock/commit/d0b51fa60a83bfa5c1b5fc8fced18001e7321701.patch"; + sha256 = "sha256-l9voiczOOdYVBP/BNEUvqARb21t0Rp2kpsNbRFUWSLg="; + stripLen = 1; + }) + ] (doJailbreak super.Spock-core); + # https://github.com/strake/filtrable.hs/issues/6 filtrable = doJailbreak super.filtrable; diff --git a/pkgs/development/haskell-modules/configuration-hackage2nix/broken.yaml b/pkgs/development/haskell-modules/configuration-hackage2nix/broken.yaml index 0f9a395bb8888..55f534267cd9e 100644 --- a/pkgs/development/haskell-modules/configuration-hackage2nix/broken.yaml +++ b/pkgs/development/haskell-modules/configuration-hackage2nix/broken.yaml @@ -5606,7 +5606,6 @@ broken-packages: - splot # failure in job https://hydra.nixos.org/build/252715661 at 2024-03-16 - Spock-api-ghcjs # failure in job https://hydra.nixos.org/build/233246163 at 2023-09-02 - Spock-auth # failure in job https://hydra.nixos.org/build/233212125 at 2023-09-02 - - Spock-core # failure in job https://hydra.nixos.org/build/252720122 at 2024-03-16 - spoonutil # failure in job https://hydra.nixos.org/build/233257645 at 2023-09-02 - spotify # failure in job https://hydra.nixos.org/build/233254990 at 2023-09-02 - spoty # failure in job https://hydra.nixos.org/build/233233863 at 2023-09-02 diff --git a/pkgs/development/haskell-modules/configuration-hackage2nix/transitive-broken.yaml b/pkgs/development/haskell-modules/configuration-hackage2nix/transitive-broken.yaml index 6848451f3acac..0976a60db5784 100644 --- a/pkgs/development/haskell-modules/configuration-hackage2nix/transitive-broken.yaml +++ b/pkgs/development/haskell-modules/configuration-hackage2nix/transitive-broken.yaml @@ -378,11 +378,6 @@ dont-distribute-packages: - SourceGraph - SpacePrivateers - SpinCounter - - Spock - - Spock-api-server - - Spock-digestive - - Spock-lucid - - Spock-worker - StockholmAlignment - Strafunski-Sdf2Haskell - SybWidget diff --git a/pkgs/development/haskell-modules/hackage-packages.nix b/pkgs/development/haskell-modules/hackage-packages.nix index df67fccfa595d..a5460504136b1 100644 --- a/pkgs/development/haskell-modules/hackage-packages.nix +++ b/pkgs/development/haskell-modules/hackage-packages.nix @@ -20331,7 +20331,6 @@ self: { ]; description = "Another Haskell web framework for rapid development"; license = lib.licenses.bsd3; - hydraPlatforms = lib.platforms.none; }) {}; "Spock-api" = callPackage @@ -20371,7 +20370,6 @@ self: { libraryHaskellDepends = [ base hvect mtl Spock-api Spock-core ]; description = "Another Haskell web framework for rapid development"; license = lib.licenses.bsd3; - hydraPlatforms = lib.platforms.none; }) {}; "Spock-auth" = callPackage @@ -20415,8 +20413,6 @@ self: { ]; description = "Another Haskell web framework for rapid development"; license = lib.licenses.bsd3; - hydraPlatforms = lib.platforms.none; - broken = true; }) {}; "Spock-digestive" = callPackage @@ -20433,7 +20429,6 @@ self: { ]; description = "Digestive functors support for Spock"; license = lib.licenses.mit; - hydraPlatforms = lib.platforms.none; }) {}; "Spock-lucid" = callPackage @@ -20445,7 +20440,6 @@ self: { libraryHaskellDepends = [ base lucid Spock transformers ]; description = "Lucid support for Spock"; license = lib.licenses.bsd3; - hydraPlatforms = lib.platforms.none; }) {}; "Spock-worker" = callPackage @@ -20463,7 +20457,6 @@ self: { testHaskellDepends = [ base containers HTF stm vector ]; description = "Background workers for Spock"; license = lib.licenses.mit; - hydraPlatforms = lib.platforms.none; }) {}; "SpreadsheetML" = callPackage From e160c2afdd6cb9966c5f4d2e4ec9768259a9c17c Mon Sep 17 00:00:00 2001 From: Wolfgang Walther Date: Tue, 4 Jun 2024 17:53:33 +0200 Subject: [PATCH 07/24] haskellPackages: build with RTS -A64M options Those flags were not actually passed to GHC before, but to Setup.hs. They were introduced in #86948. The related twitch live stream uses the build of git-annex as a measurement. I get the following numbers when building git-annex with doCheck = false: - for current master: 1:40 wall clock / 340s user - without any -A64M argument: 1:40 wall clock / 340s user - with this fix: 1:13 wall clock / 280s user The idea was good, but the settings were never active. More testing revealed that this seems to work on darwin just as well, so we're removing the isLinux condition, too. --- pkgs/development/haskell-modules/generic-builder.nix | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/pkgs/development/haskell-modules/generic-builder.nix b/pkgs/development/haskell-modules/generic-builder.nix index 3e74c61d25a7f..72c8389529dcc 100644 --- a/pkgs/development/haskell-modules/generic-builder.nix +++ b/pkgs/development/haskell-modules/generic-builder.nix @@ -235,7 +235,7 @@ let ] ++ optional (allPkgconfigDepends != []) "--with-pkg-config=${pkg-config.targetPrefix}pkg-config"; - parallelBuildingFlags = "-j$NIX_BUILD_CORES" + optionalString stdenv.isLinux " +RTS -A64M -RTS"; + makeGhcOptions = opts: lib.concatStringsSep " " (map (opt: "--ghc-option=${opt}") opts); buildFlagsString = optionalString (buildFlags != []) (" " + concatStringsSep " " buildFlags); @@ -253,8 +253,8 @@ let "--package-db=$packageConfDir" (optionalString (enableSharedExecutables && stdenv.isLinux) "--ghc-option=-optl=-Wl,-rpath=$out/${ghcLibdir}/${pname}-${version}") (optionalString (enableSharedExecutables && stdenv.isDarwin) "--ghc-option=-optl=-Wl,-headerpad_max_install_names") - (optionalString enableParallelBuilding "--ghc-options=${parallelBuildingFlags}") - (optionalString useCpphs "--with-cpphs=${cpphs}/bin/cpphs --ghc-options=-cpp --ghc-options=-pgmP${cpphs}/bin/cpphs --ghc-options=-optP--cpp") + (optionalString enableParallelBuilding (makeGhcOptions [ "-j$NIX_BUILD_CORES" "+RTS" "-A64M" "-RTS" ])) + (optionalString useCpphs ("--with-cpphs=${cpphs}/bin/cpphs " + (makeGhcOptions [ "-cpp" "-pgmP${cpphs}/bin/cpphs" "-optP--cpp" ]))) (enableFeature enableLibraryProfiling "library-profiling") (optionalString (enableExecutableProfiling || enableLibraryProfiling) "--profiling-detail=${profilingDetail}") (enableFeature enableExecutableProfiling "profiling") @@ -277,16 +277,14 @@ let ) ++ optionals enableSeparateBinOutput [ "--bindir=${binDir}" ] ++ optionals (doHaddockInterfaces && isLibrary) [ - "--ghc-options=-haddock" + "--ghc-option=-haddock" ]; postPhases = optional doInstallIntermediates "installIntermediatesPhase"; setupCompileFlags = [ (optionalString (!coreSetup) "-package-db=$setupPackageConfDir") - (optionalString enableParallelBuilding parallelBuildingFlags) "-threaded" # https://github.com/haskell/cabal/issues/2398 - "-rtsopts" # allow us to pass RTS flags to the generated Setup executable ]; isHaskellPkg = x: x ? isHaskellLibrary; From 702d636d789428464d4be337381ab13937b4e0b9 Mon Sep 17 00:00:00 2001 From: sternenseemann Date: Tue, 11 Jun 2024 15:01:38 +0200 Subject: [PATCH 08/24] haskell.compiler.ghc948: fix expression file name This is a left over to do from #308776. Rebasing existing PR (prior to #308776) would need to be rebased on a change before the commit included in this PR. --- pkgs/development/compilers/ghc/{9.4.8.fixme.nix => 9.4.8.nix} | 0 pkgs/top-level/haskell-packages.nix | 2 +- 2 files changed, 1 insertion(+), 1 deletion(-) rename pkgs/development/compilers/ghc/{9.4.8.fixme.nix => 9.4.8.nix} (100%) diff --git a/pkgs/development/compilers/ghc/9.4.8.fixme.nix b/pkgs/development/compilers/ghc/9.4.8.nix similarity index 100% rename from pkgs/development/compilers/ghc/9.4.8.fixme.nix rename to pkgs/development/compilers/ghc/9.4.8.nix diff --git a/pkgs/top-level/haskell-packages.nix b/pkgs/top-level/haskell-packages.nix index 75f0e54d697cb..562c4d7328243 100644 --- a/pkgs/top-level/haskell-packages.nix +++ b/pkgs/top-level/haskell-packages.nix @@ -229,7 +229,7 @@ in { buildTargetLlvmPackages = pkgsBuildTarget.llvmPackages_12; llvmPackages = pkgs.llvmPackages_12; }; - ghc948 = callPackage ../development/compilers/ghc/9.4.8.fixme.nix { + ghc948 = callPackage ../development/compilers/ghc/9.4.8.nix { bootPkgs = # Building with 9.2 is broken due to # https://gitlab.haskell.org/ghc/ghc/-/issues/21914 From 8ebd50f67a350d7c779971d02925bed6fad4e18b Mon Sep 17 00:00:00 2001 From: sternenseemann Date: Tue, 11 Jun 2024 13:37:33 +0200 Subject: [PATCH 09/24] haskell.compiler.*: calculate tool path using common function This refactor should simplify the code a little bit and make future changes easier. I. e. for cross compiling GHC we'll have to update the tools in the GHC settings file and calculate the host->target tool paths for later use. Having a ready function for this will make this a lot easier. --- pkgs/development/compilers/ghc/8.10.7.nix | 77 ++++++++++++------- .../compilers/ghc/common-hadrian.nix | 77 ++++++++++++------- .../ghc/common-make-native-bignum.nix | 77 ++++++++++++------- 3 files changed, 147 insertions(+), 84 deletions(-) diff --git a/pkgs/development/compilers/ghc/8.10.7.nix b/pkgs/development/compilers/ghc/8.10.7.nix index cf867408dd315..c8669a2761f82 100644 --- a/pkgs/development/compilers/ghc/8.10.7.nix +++ b/pkgs/development/compilers/ghc/8.10.7.nix @@ -131,23 +131,44 @@ let targetCC = builtins.head toolsForTarget; - # Sometimes we have to dispatch between the bintools wrapper and the unwrapped - # derivation for certain tools depending on the platform. - bintoolsFor = { - # GHC needs install_name_tool on all darwin platforms. On aarch64-darwin it is - # part of the bintools wrapper (due to codesigning requirements), but not on - # x86_64-darwin. - install_name_tool = - if stdenv.targetPlatform.isAarch64 - then targetCC.bintools - else targetCC.bintools.bintools; - # Same goes for strip. - strip = - # TODO(@sternenseemann): also use wrapper if linker == "bfd" or "gold" - if stdenv.targetPlatform.isAarch64 && stdenv.targetPlatform.isDarwin - then targetCC.bintools - else targetCC.bintools.bintools; - }; + # toolPath calculates the absolute path to the name tool associated with a + # given `stdenv.cc` derivation, i.e. it picks the correct derivation to take + # the tool from (cc, cc.bintools, cc.bintools.bintools) and adds the correct + # subpath of the tool. + toolPath = name: cc: + let + tools = { + "cc" = cc; + "c++" = cc; + as = cc.bintools.bintools; + + ar = cc.bintools.bintools; + ranlib = cc.bintools.bintools; + nm = cc.bintools.bintools; + readelf = cc.bintools.bintools; + + ld = cc.bintools; + "ld.gold" = cc.bintools; + + otool = cc.bintools.bintools; + + # GHC needs install_name_tool on all darwin platforms. On aarch64-darwin it is + # part of the bintools wrapper (due to codesigning requirements), but not on + # x86_64-darwin. We decide based on target platform to have consistent tools + # across all GHC stages. + install_name_tool = + if stdenv.targetPlatform.isAarch64 + then cc.bintools + else cc.bintools.bintools; + # Same goes for strip. + strip = + # TODO(@sternenseemann): also use wrapper if linker == "bfd" or "gold" + if stdenv.targetPlatform.isAarch64 && stdenv.targetPlatform.isDarwin + then cc.bintools + else cc.bintools.bintools; + }.${name}; + in + "${tools}/bin/${tools.targetPrefix}${name}"; # Use gold either following the default, or to avoid the BFD linker due to some bugs / perf issues. # But we cannot avoid BFD when using musl libc due to https://sourceware.org/bugzilla/show_bug.cgi?id=23856 @@ -255,19 +276,19 @@ stdenv.mkDerivation (rec { done # GHC is a bit confused on its cross terminology, as these would normally be # the *host* tools. - export CC="${targetCC}/bin/${targetCC.targetPrefix}cc" - export CXX="${targetCC}/bin/${targetCC.targetPrefix}c++" + export CC="${toolPath "cc" targetCC}" + export CXX="${toolPath "c++" targetCC}" # Use gold to work around https://sourceware.org/bugzilla/show_bug.cgi?id=16177 - export LD="${targetCC.bintools}/bin/${targetCC.bintools.targetPrefix}ld${lib.optionalString useLdGold ".gold"}" - export AS="${targetCC.bintools.bintools}/bin/${targetCC.bintools.targetPrefix}as" - export AR="${targetCC.bintools.bintools}/bin/${targetCC.bintools.targetPrefix}ar" - export NM="${targetCC.bintools.bintools}/bin/${targetCC.bintools.targetPrefix}nm" - export RANLIB="${targetCC.bintools.bintools}/bin/${targetCC.bintools.targetPrefix}ranlib" - export READELF="${targetCC.bintools.bintools}/bin/${targetCC.bintools.targetPrefix}readelf" - export STRIP="${bintoolsFor.strip}/bin/${bintoolsFor.strip.targetPrefix}strip" + export LD="${toolPath "ld${lib.optionalString useLdGold ".gold"}" targetCC}" + export AS="${toolPath "as" targetCC}" + export AR="${toolPath "ar" targetCC}" + export NM="${toolPath "nm" targetCC}" + export RANLIB="${toolPath "ranlib" targetCC}" + export READELF="${toolPath "readelf" targetCC}" + export STRIP="${toolPath "strip" targetCC}" '' + lib.optionalString (stdenv.targetPlatform.linker == "cctools") '' - export OTOOL="${targetCC.bintools.bintools}/bin/${targetCC.bintools.targetPrefix}otool" - export INSTALL_NAME_TOOL="${bintoolsFor.install_name_tool}/bin/${bintoolsFor.install_name_tool.targetPrefix}install_name_tool" + export OTOOL="${toolPath "otool" targetCC}" + export INSTALL_NAME_TOOL="${toolPath "install_name_tool" targetCC}" '' + lib.optionalString useLLVM '' export LLC="${lib.getBin buildTargetLlvmPackages.llvm}/bin/llc" export OPT="${lib.getBin buildTargetLlvmPackages.llvm}/bin/opt" diff --git a/pkgs/development/compilers/ghc/common-hadrian.nix b/pkgs/development/compilers/ghc/common-hadrian.nix index 7cd3f7659fe4f..b5fef30332f7f 100644 --- a/pkgs/development/compilers/ghc/common-hadrian.nix +++ b/pkgs/development/compilers/ghc/common-hadrian.nix @@ -267,23 +267,44 @@ let targetCC = builtins.head toolsForTarget; - # Sometimes we have to dispatch between the bintools wrapper and the unwrapped - # derivation for certain tools depending on the platform. - bintoolsFor = { - # GHC needs install_name_tool on all darwin platforms. On aarch64-darwin it is - # part of the bintools wrapper (due to codesigning requirements), but not on - # x86_64-darwin. - install_name_tool = - if stdenv.targetPlatform.isAarch64 - then targetCC.bintools - else targetCC.bintools.bintools; - # Same goes for strip. - strip = - # TODO(@sternenseemann): also use wrapper if linker == "bfd" or "gold" - if stdenv.targetPlatform.isAarch64 && stdenv.targetPlatform.isDarwin - then targetCC.bintools - else targetCC.bintools.bintools; - }; + # toolPath calculates the absolute path to the name tool associated with a + # given `stdenv.cc` derivation, i.e. it picks the correct derivation to take + # the tool from (cc, cc.bintools, cc.bintools.bintools) and adds the correct + # subpath of the tool. + toolPath = name: cc: + let + tools = { + "cc" = cc; + "c++" = cc; + as = cc.bintools.bintools; + + ar = cc.bintools.bintools; + ranlib = cc.bintools.bintools; + nm = cc.bintools.bintools; + readelf = cc.bintools.bintools; + + ld = cc.bintools; + "ld.gold" = cc.bintools; + + otool = cc.bintools.bintools; + + # GHC needs install_name_tool on all darwin platforms. On aarch64-darwin it is + # part of the bintools wrapper (due to codesigning requirements), but not on + # x86_64-darwin. We decide based on target platform to have consistent tools + # across all GHC stages. + install_name_tool = + if stdenv.targetPlatform.isAarch64 + then cc.bintools + else cc.bintools.bintools; + # Same goes for strip. + strip = + # TODO(@sternenseemann): also use wrapper if linker == "bfd" or "gold" + if stdenv.targetPlatform.isAarch64 && stdenv.targetPlatform.isDarwin + then cc.bintools + else cc.bintools.bintools; + }.${name}; + in + "${tools}/bin/${tools.targetPrefix}${name}"; # Use gold either following the default, or to avoid the BFD linker due to some bugs / perf issues. # But we cannot avoid BFD when using musl libc due to https://sourceware.org/bugzilla/show_bug.cgi?id=23856 @@ -329,19 +350,19 @@ stdenv.mkDerivation ({ done # GHC is a bit confused on its cross terminology, as these would normally be # the *host* tools. - export CC="${targetCC}/bin/${targetCC.targetPrefix}cc" - export CXX="${targetCC}/bin/${targetCC.targetPrefix}c++" + export CC="${toolPath "cc" targetCC}" + export CXX="${toolPath "c++" targetCC}" # Use gold to work around https://sourceware.org/bugzilla/show_bug.cgi?id=16177 - export LD="${targetCC.bintools}/bin/${targetCC.bintools.targetPrefix}ld${lib.optionalString useLdGold ".gold"}" - export AS="${targetCC.bintools.bintools}/bin/${targetCC.bintools.targetPrefix}as" - export AR="${targetCC.bintools.bintools}/bin/${targetCC.bintools.targetPrefix}ar" - export NM="${targetCC.bintools.bintools}/bin/${targetCC.bintools.targetPrefix}nm" - export RANLIB="${targetCC.bintools.bintools}/bin/${targetCC.bintools.targetPrefix}ranlib" - export READELF="${targetCC.bintools.bintools}/bin/${targetCC.bintools.targetPrefix}readelf" - export STRIP="${bintoolsFor.strip}/bin/${bintoolsFor.strip.targetPrefix}strip" + export LD="${toolPath "ld${lib.optionalString useLdGold ".gold"}" targetCC}" + export AS="${toolPath "as" targetCC}" + export AR="${toolPath "ar" targetCC}" + export NM="${toolPath "nm" targetCC}" + export RANLIB="${toolPath "ranlib" targetCC}" + export READELF="${toolPath "readelf" targetCC}" + export STRIP="${toolPath "strip" targetCC}" '' + lib.optionalString (stdenv.targetPlatform.linker == "cctools") '' - export OTOOL="${targetCC.bintools.bintools}/bin/${targetCC.bintools.targetPrefix}otool" - export INSTALL_NAME_TOOL="${bintoolsFor.install_name_tool}/bin/${bintoolsFor.install_name_tool.targetPrefix}install_name_tool" + export OTOOL="${toolPath "otool" targetCC}" + export INSTALL_NAME_TOOL="${toolPath "install_name_tool" targetCC}" '' + lib.optionalString useLLVM '' export LLC="${lib.getBin buildTargetLlvmPackages.llvm}/bin/llc" export OPT="${lib.getBin buildTargetLlvmPackages.llvm}/bin/opt" diff --git a/pkgs/development/compilers/ghc/common-make-native-bignum.nix b/pkgs/development/compilers/ghc/common-make-native-bignum.nix index 6142c76f64078..79fced444f562 100644 --- a/pkgs/development/compilers/ghc/common-make-native-bignum.nix +++ b/pkgs/development/compilers/ghc/common-make-native-bignum.nix @@ -136,23 +136,44 @@ let targetCC = builtins.head toolsForTarget; - # Sometimes we have to dispatch between the bintools wrapper and the unwrapped - # derivation for certain tools depending on the platform. - bintoolsFor = { - # GHC needs install_name_tool on all darwin platforms. On aarch64-darwin it is - # part of the bintools wrapper (due to codesigning requirements), but not on - # x86_64-darwin. - install_name_tool = - if stdenv.targetPlatform.isAarch64 - then targetCC.bintools - else targetCC.bintools.bintools; - # Same goes for strip. - strip = - # TODO(@sternenseemann): also use wrapper if linker == "bfd" or "gold" - if stdenv.targetPlatform.isAarch64 && stdenv.targetPlatform.isDarwin - then targetCC.bintools - else targetCC.bintools.bintools; - }; + # toolPath calculates the absolute path to the name tool associated with a + # given `stdenv.cc` derivation, i.e. it picks the correct derivation to take + # the tool from (cc, cc.bintools, cc.bintools.bintools) and adds the correct + # subpath of the tool. + toolPath = name: cc: + let + tools = { + "cc" = cc; + "c++" = cc; + as = cc.bintools.bintools; + + ar = cc.bintools.bintools; + ranlib = cc.bintools.bintools; + nm = cc.bintools.bintools; + readelf = cc.bintools.bintools; + + ld = cc.bintools; + "ld.gold" = cc.bintools; + + otool = cc.bintools.bintools; + + # GHC needs install_name_tool on all darwin platforms. On aarch64-darwin it is + # part of the bintools wrapper (due to codesigning requirements), but not on + # x86_64-darwin. We decide based on target platform to have consistent tools + # across all GHC stages. + install_name_tool = + if stdenv.targetPlatform.isAarch64 + then cc.bintools + else cc.bintools.bintools; + # Same goes for strip. + strip = + # TODO(@sternenseemann): also use wrapper if linker == "bfd" or "gold" + if stdenv.targetPlatform.isAarch64 && stdenv.targetPlatform.isDarwin + then cc.bintools + else cc.bintools.bintools; + }.${name}; + in + "${tools}/bin/${tools.targetPrefix}${name}"; # Use gold either following the default, or to avoid the BFD linker due to some bugs / perf issues. # But we cannot avoid BFD when using musl libc due to https://sourceware.org/bugzilla/show_bug.cgi?id=23856 @@ -265,19 +286,19 @@ stdenv.mkDerivation (rec { done # GHC is a bit confused on its cross terminology, as these would normally be # the *host* tools. - export CC="${targetCC}/bin/${targetCC.targetPrefix}cc" - export CXX="${targetCC}/bin/${targetCC.targetPrefix}c++" + export CC="${toolPath "cc" targetCC}" + export CXX="${toolPath "c++" targetCC}" # Use gold to work around https://sourceware.org/bugzilla/show_bug.cgi?id=16177 - export LD="${targetCC.bintools}/bin/${targetCC.bintools.targetPrefix}ld${lib.optionalString useLdGold ".gold"}" - export AS="${targetCC.bintools.bintools}/bin/${targetCC.bintools.targetPrefix}as" - export AR="${targetCC.bintools.bintools}/bin/${targetCC.bintools.targetPrefix}ar" - export NM="${targetCC.bintools.bintools}/bin/${targetCC.bintools.targetPrefix}nm" - export RANLIB="${targetCC.bintools.bintools}/bin/${targetCC.bintools.targetPrefix}ranlib" - export READELF="${targetCC.bintools.bintools}/bin/${targetCC.bintools.targetPrefix}readelf" - export STRIP="${bintoolsFor.strip}/bin/${bintoolsFor.strip.targetPrefix}strip" + export LD="${toolPath "ld${lib.optionalString useLdGold ".gold"}" targetCC}" + export AS="${toolPath "as" targetCC}" + export AR="${toolPath "ar" targetCC}" + export NM="${toolPath "nm" targetCC}" + export RANLIB="${toolPath "ranlib" targetCC}" + export READELF="${toolPath "readelf" targetCC}" + export STRIP="${toolPath "strip" targetCC}" '' + lib.optionalString (stdenv.targetPlatform.linker == "cctools") '' - export OTOOL="${targetCC.bintools.bintools}/bin/${targetCC.bintools.targetPrefix}otool" - export INSTALL_NAME_TOOL="${bintoolsFor.install_name_tool}/bin/${bintoolsFor.install_name_tool.targetPrefix}install_name_tool" + export OTOOL="${toolPath "otool" targetCC}" + export INSTALL_NAME_TOOL="${toolPath "install_name_tool" targetCC}" '' + lib.optionalString useLLVM '' export LLC="${lib.getBin buildTargetLlvmPackages.llvm}/bin/llc" export OPT="${lib.getBin buildTargetLlvmPackages.llvm}/bin/opt" From 504729eeb4d21f792534c616521c182139a5e877 Mon Sep 17 00:00:00 2001 From: Silvan Mosberger Date: Fri, 14 Jun 2024 21:03:29 +0200 Subject: [PATCH 10/24] haskellPackages.set-extra: Unmark broken 1.4.2 fixed [1] the previous build failure [2] [1]: https://github.com/ddssff/set-extra/commit/f41b2a5e80238bf181375c0cbbed61a89ad48970 [2]: https://hydra.nixos.org/build/252738545/nixlog/2 --- .../haskell-modules/configuration-hackage2nix/broken.yaml | 1 - pkgs/development/haskell-modules/hackage-packages.nix | 2 -- 2 files changed, 3 deletions(-) diff --git a/pkgs/development/haskell-modules/configuration-hackage2nix/broken.yaml b/pkgs/development/haskell-modules/configuration-hackage2nix/broken.yaml index 02729804ac97b..96cfd34f70ade 100644 --- a/pkgs/development/haskell-modules/configuration-hackage2nix/broken.yaml +++ b/pkgs/development/haskell-modules/configuration-hackage2nix/broken.yaml @@ -5340,7 +5340,6 @@ broken-packages: - sessions # failure in job https://hydra.nixos.org/build/233214614 at 2023-09-02 - sessiontypes # failure in job https://hydra.nixos.org/build/233224975 at 2023-09-02 - setdown # failure in job https://hydra.nixos.org/build/241521053 at 2023-12-03 - - set-extra # failure in job https://hydra.nixos.org/build/252738545 at 2024-03-16 - setgame # failure in job https://hydra.nixos.org/build/233218664 at 2023-09-02 - set-of # failure in job https://hydra.nixos.org/build/233202960 at 2023-09-02 - setoid # failure in job https://hydra.nixos.org/build/233213744 at 2023-09-02 diff --git a/pkgs/development/haskell-modules/hackage-packages.nix b/pkgs/development/haskell-modules/hackage-packages.nix index 1b67efe86b389..dc9df4d3aba81 100644 --- a/pkgs/development/haskell-modules/hackage-packages.nix +++ b/pkgs/development/haskell-modules/hackage-packages.nix @@ -274935,8 +274935,6 @@ self: { libraryHaskellDepends = [ base containers mtl syb ]; description = "Functions that could be added to Data.Set."; license = lib.licenses.bsd3; - hydraPlatforms = lib.platforms.none; - broken = true; }) {}; "set-monad" = callPackage From ceebde5c627cdfb9c495b3f1c47c30f2747546a9 Mon Sep 17 00:00:00 2001 From: Marc Scholten Date: Fri, 14 Jun 2024 12:53:30 -0700 Subject: [PATCH 11/24] haskellPackages.push-notify-apn: unbroken I took over maintainership of this package a while ago and fixed the build errors in the latest hackage release --- .../haskell-modules/configuration-hackage2nix/broken.yaml | 1 - pkgs/development/haskell-modules/hackage-packages.nix | 2 -- 2 files changed, 3 deletions(-) diff --git a/pkgs/development/haskell-modules/configuration-hackage2nix/broken.yaml b/pkgs/development/haskell-modules/configuration-hackage2nix/broken.yaml index 02729804ac97b..ff68a3bb56a0f 100644 --- a/pkgs/development/haskell-modules/configuration-hackage2nix/broken.yaml +++ b/pkgs/development/haskell-modules/configuration-hackage2nix/broken.yaml @@ -4811,7 +4811,6 @@ broken-packages: - pusher-ws # failure in job https://hydra.nixos.org/build/233204133 at 2023-09-02 - pushme # failure in job https://hydra.nixos.org/build/233212481 at 2023-09-02 - push-notifications # failure in job https://hydra.nixos.org/build/233199364 at 2023-09-02 - - push-notify-apn # failure in job https://hydra.nixos.org/build/260189652 at 2024-05-19 - pushover # failure in job https://hydra.nixos.org/build/252739908 at 2024-03-16 - putlenses # failure in job https://hydra.nixos.org/build/233197372 at 2023-09-02 - puzzle-draw # failure in job https://hydra.nixos.org/build/233204953 at 2023-09-02 diff --git a/pkgs/development/haskell-modules/hackage-packages.nix b/pkgs/development/haskell-modules/hackage-packages.nix index 1b67efe86b389..b0cd7ec4eae8c 100644 --- a/pkgs/development/haskell-modules/hackage-packages.nix +++ b/pkgs/development/haskell-modules/hackage-packages.nix @@ -249267,9 +249267,7 @@ self: { testHaskellDepends = [ aeson base hspec ]; description = "Send push notifications to mobile iOS devices"; license = lib.licenses.bsd3; - hydraPlatforms = lib.platforms.none; mainProgram = "sendapn"; - broken = true; }) {}; "push-notify-ccs" = callPackage From cadb3d1df5cc2a98cc62a98a1622ab13af6fb9eb Mon Sep 17 00:00:00 2001 From: Alexandre Esteves Date: Fri, 14 Jun 2024 20:13:43 +0100 Subject: [PATCH 12/24] haskellPackages.ghcjs-dom: build on js backend of ghc 9.8 --- .../haskell-modules/configuration-common.nix | 6 ----- ...-ghcjs.nix => configuration-ghcjs-8.x.nix} | 0 .../configuration-ghcjs-9.x.nix | 22 +++++++++++++++++++ .../configuration-hackage2nix/broken.yaml | 1 - .../configuration-hackage2nix/main.yaml | 2 ++ pkgs/development/haskell-modules/default.nix | 6 ++++- .../haskell-modules/generic-builder.nix | 17 ++++++++------ .../haskell-modules/hackage-packages.nix | 4 ++-- pkgs/top-level/haskell-packages.nix | 2 +- 9 files changed, 42 insertions(+), 18 deletions(-) rename pkgs/development/haskell-modules/{configuration-ghcjs.nix => configuration-ghcjs-8.x.nix} (100%) create mode 100644 pkgs/development/haskell-modules/configuration-ghcjs-9.x.nix diff --git a/pkgs/development/haskell-modules/configuration-common.nix b/pkgs/development/haskell-modules/configuration-common.nix index b73d72d99a3ae..3d402d3d1be64 100644 --- a/pkgs/development/haskell-modules/configuration-common.nix +++ b/pkgs/development/haskell-modules/configuration-common.nix @@ -274,12 +274,6 @@ self: super: { sha256 = "1c7knpvxr7p8c159jkyk6w29653z5yzgjjqj11130bbb8mk9qhq7"; }) super.c2hsc; - # Some Hackage packages reference this attribute, which exists only in the - # GHCJS package set. We provide a dummy version here to fix potential - # evaluation errors. - ghcjs-base = null; - ghcjs-prim = null; - ghc-debug-client = doJailbreak super.ghc-debug-client; # Test failure. Tests also disabled in Stackage: diff --git a/pkgs/development/haskell-modules/configuration-ghcjs.nix b/pkgs/development/haskell-modules/configuration-ghcjs-8.x.nix similarity index 100% rename from pkgs/development/haskell-modules/configuration-ghcjs.nix rename to pkgs/development/haskell-modules/configuration-ghcjs-8.x.nix diff --git a/pkgs/development/haskell-modules/configuration-ghcjs-9.x.nix b/pkgs/development/haskell-modules/configuration-ghcjs-9.x.nix new file mode 100644 index 0000000000000..3b1f8dc4558e1 --- /dev/null +++ b/pkgs/development/haskell-modules/configuration-ghcjs-9.x.nix @@ -0,0 +1,22 @@ +{ pkgs, haskellLib }: + +with haskellLib; + +# cabal2nix doesn't properly add dependencies conditional on arch(javascript) +(self: super: { + ghcjs-base = addBuildDepends (with self; [ + aeson + attoparsec + dlist + hashable + primitive + scientific + unordered-containers + vector + ]) super.ghcjs-base; + + ghcjs-dom = addBuildDepend self.ghcjs-dom-javascript super.ghcjs-dom; + ghcjs-dom-javascript = addBuildDepend self.ghcjs-base super.ghcjs-dom-javascript; + jsaddle = addBuildDepend self.ghcjs-base super.jsaddle; + jsaddle-dom = addBuildDepend self.ghcjs-base super.jsaddle-dom; +}) diff --git a/pkgs/development/haskell-modules/configuration-hackage2nix/broken.yaml b/pkgs/development/haskell-modules/configuration-hackage2nix/broken.yaml index 02729804ac97b..04a308f33d73c 100644 --- a/pkgs/development/haskell-modules/configuration-hackage2nix/broken.yaml +++ b/pkgs/development/haskell-modules/configuration-hackage2nix/broken.yaml @@ -1995,7 +1995,6 @@ broken-packages: - ghc-internal # failure in job https://hydra.nixos.org/build/260723678 at 2024-05-25 - ghcitui # failure in job https://hydra.nixos.org/build/252737339 at 2024-03-16 - ghcjs-base-stub # timeout - - ghcjs-dom-javascript # failure in job https://hydra.nixos.org/build/255688382 at 2024-04-16 - ghcjs-dom-jsffi # failure in job https://hydra.nixos.org/build/233215225 at 2023-09-02 - ghcjs-fetch # timeout - ghcjs-promise # failure in job https://hydra.nixos.org/build/233243985 at 2023-09-02 diff --git a/pkgs/development/haskell-modules/configuration-hackage2nix/main.yaml b/pkgs/development/haskell-modules/configuration-hackage2nix/main.yaml index 93eebf297e8e8..1a734a348afa6 100644 --- a/pkgs/development/haskell-modules/configuration-hackage2nix/main.yaml +++ b/pkgs/development/haskell-modules/configuration-hackage2nix/main.yaml @@ -152,6 +152,7 @@ package-maintainers: - ghcjs-dom - ghcjs-dom-hello - ghcjs-dom-javascript + - ghcjs-dom-jsaddle - haveibeenpwned - jsaddle - jsaddle-clib @@ -792,6 +793,7 @@ supported-platforms: geomancy: [ platforms.x86 ] # x86 intrinsics geomancy-layout: [ platforms.x86 ] # x86 intrinsics gi-gtkosxapplication: [ platforms.darwin ] + ghcjs-dom-javascript: [ javascript-ghcjs ] gtk-mac-integration: [ platforms.darwin ] gtk3-mac-integration: [ platforms.darwin ] halide-haskell: [ platforms.linux ] diff --git a/pkgs/development/haskell-modules/default.nix b/pkgs/development/haskell-modules/default.nix index 3f8a0bb750c71..73ce1af7735a0 100644 --- a/pkgs/development/haskell-modules/default.nix +++ b/pkgs/development/haskell-modules/default.nix @@ -9,6 +9,7 @@ , configurationNix ? import ./configuration-nix.nix , configurationArm ? import ./configuration-arm.nix , configurationDarwin ? import ./configuration-darwin.nix +, configurationJS ? import ./configuration-ghcjs-9.x.nix }: let @@ -26,7 +27,10 @@ let (configurationArm { inherit pkgs haskellLib; }) ] ++ lib.optionals stdenv.hostPlatform.isDarwin [ (configurationDarwin { inherit pkgs haskellLib; }) - ]; + ] ++ lib.optionals stdenv.hostPlatform.isGhcjs [ + (configurationJS { inherit pkgs haskellLib; }) + ] + ; extensions = lib.composeManyExtensions ([ (nonHackagePackages { inherit pkgs haskellLib; }) diff --git a/pkgs/development/haskell-modules/generic-builder.nix b/pkgs/development/haskell-modules/generic-builder.nix index e32bef104de6c..6c60efe1bce50 100644 --- a/pkgs/development/haskell-modules/generic-builder.nix +++ b/pkgs/development/haskell-modules/generic-builder.nix @@ -7,6 +7,13 @@ let isCross = stdenv.buildPlatform != stdenv.hostPlatform; + # Note that ghc.isGhcjs != stdenv.hostPlatform.isGhcjs. + # ghc.isGhcjs implies that we are using ghcjs, a project separate from GHC. + # (mere) stdenv.hostPlatform.isGhcjs means that we are using GHC's JavaScript + # backend. The latter is a normal cross compilation backend and needs little + # special accommodation. + outputsJS = ghc.isGhcjs or false || stdenv.hostPlatform.isGhcjs; + # Pass the "wrong" C compiler rather than none at all so packages that just # use the C preproccessor still work, see # https://github.com/haskell/cabal/issues/6466 for details. @@ -19,15 +26,11 @@ let fetchurl removeReferencesTo pkg-config coreutils gnugrep glibcLocales emscripten; + in { pname -# Note that ghc.isGhcjs != stdenv.hostPlatform.isGhcjs. -# ghc.isGhcjs implies that we are using ghcjs, a project separate from GHC. -# (mere) stdenv.hostPlatform.isGhcjs means that we are using GHC's JavaScript -# backend. The latter is a normal cross compilation backend and needs little -# special accommodation. -, dontStrip ? (ghc.isGhcjs or false || stdenv.hostPlatform.isGhcjs) +, dontStrip ? outputsJS , version, revision ? null , sha256 ? null , src ? fetchurl { url = "mirror://hackage/${pname}-${version}.tar.gz"; inherit sha256; } @@ -44,7 +47,7 @@ in , doHaddockQuickjump ? doHoogle , doInstallIntermediates ? false , editedCabalFile ? null -, enableLibraryProfiling ? !(ghc.isGhcjs or false) +, enableLibraryProfiling ? !outputsJS , enableExecutableProfiling ? false , profilingDetail ? "exported-functions" # TODO enable shared libs for cross-compiling diff --git a/pkgs/development/haskell-modules/hackage-packages.nix b/pkgs/development/haskell-modules/hackage-packages.nix index 1b67efe86b389..1c281355e688b 100644 --- a/pkgs/development/haskell-modules/hackage-packages.nix +++ b/pkgs/development/haskell-modules/hackage-packages.nix @@ -121427,9 +121427,8 @@ self: { sha256 = "0im7wn7bn43rhkblh0wn9angadbdvywsalfz0adr9pkwv6hvc8qs"; description = "DOM library using JSFFI and GHCJS"; license = lib.licenses.mit; - hydraPlatforms = lib.platforms.none; + platforms = [ "javascript-ghcjs" ]; maintainers = [ lib.maintainers.alexfmpe ]; - broken = true; }) {}; "ghcjs-dom-jsaddle" = callPackage @@ -121442,6 +121441,7 @@ self: { doHaddock = false; description = "DOM library that supports both GHCJS and GHC using jsaddle"; license = lib.licenses.mit; + maintainers = [ lib.maintainers.alexfmpe ]; }) {}; "ghcjs-dom-jsffi" = callPackage diff --git a/pkgs/top-level/haskell-packages.nix b/pkgs/top-level/haskell-packages.nix index 562c4d7328243..b924a29f26162 100644 --- a/pkgs/top-level/haskell-packages.nix +++ b/pkgs/top-level/haskell-packages.nix @@ -568,7 +568,7 @@ in { buildHaskellPackages = ghc.bootPkgs; ghc = bh.compiler.ghcjs810; compilerConfig = callPackage ../development/haskell-modules/configuration-ghc-8.10.x.nix { }; - packageSetConfig = callPackage ../development/haskell-modules/configuration-ghcjs.nix { }; + packageSetConfig = callPackage ../development/haskell-modules/configuration-ghcjs-8.x.nix { }; }; # The integer-simple attribute set contains package sets for all the GHC compilers From 1d68e8d62018ec76c74bd4861bbe5aca76e8be8d Mon Sep 17 00:00:00 2001 From: Tony Zorman Date: Sat, 15 Jun 2024 11:09:46 +0200 Subject: [PATCH 13/24] haskellPackages.html-parse: unbreak --- .../haskell-modules/configuration-hackage2nix/broken.yaml | 1 - pkgs/development/haskell-modules/hackage-packages.nix | 2 -- 2 files changed, 3 deletions(-) diff --git a/pkgs/development/haskell-modules/configuration-hackage2nix/broken.yaml b/pkgs/development/haskell-modules/configuration-hackage2nix/broken.yaml index 836a740bdc557..681c7cc70dae8 100644 --- a/pkgs/development/haskell-modules/configuration-hackage2nix/broken.yaml +++ b/pkgs/development/haskell-modules/configuration-hackage2nix/broken.yaml @@ -2896,7 +2896,6 @@ broken-packages: - HTicTacToe # failure in job https://hydra.nixos.org/build/233235397 at 2023-09-02 - htiled # failure in job https://hydra.nixos.org/build/233219305 at 2023-09-02 - htlset # failure in job https://hydra.nixos.org/build/233203886 at 2023-09-02 - - html-parse # failure in job https://hydra.nixos.org/build/233241759 at 2023-09-02 - html-rules # failure in job https://hydra.nixos.org/build/233200615 at 2023-09-02 - html-tokenizer # failure in job https://hydra.nixos.org/build/233243581 at 2023-09-02 - htoml # failure in job https://hydra.nixos.org/build/233246670 at 2023-09-02 diff --git a/pkgs/development/haskell-modules/hackage-packages.nix b/pkgs/development/haskell-modules/hackage-packages.nix index 31687a5aa9419..61cbc7a420d41 100644 --- a/pkgs/development/haskell-modules/hackage-packages.nix +++ b/pkgs/development/haskell-modules/hackage-packages.nix @@ -163892,8 +163892,6 @@ self: { ]; description = "A high-performance HTML tokenizer"; license = lib.licenses.bsd3; - hydraPlatforms = lib.platforms.none; - broken = true; }) {}; "html-parse-util" = callPackage From ca1281b9e9546b6ced11e7818bc29ec9628c0207 Mon Sep 17 00:00:00 2001 From: Alexandre Esteves Date: Thu, 30 May 2024 23:49:25 +0100 Subject: [PATCH 14/24] haskellPackages.warp: fix build on darwin --- pkgs/development/haskell-modules/configuration-darwin.nix | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/pkgs/development/haskell-modules/configuration-darwin.nix b/pkgs/development/haskell-modules/configuration-darwin.nix index 5985d29f8b591..20e3ab0de13d3 100644 --- a/pkgs/development/haskell-modules/configuration-darwin.nix +++ b/pkgs/development/haskell-modules/configuration-darwin.nix @@ -323,6 +323,10 @@ self: super: ({ # Tests fail on macOS https://github.com/mrkkrp/zip/issues/112 zip = dontCheck super.zip; + warp = super.warp.overrideAttrs (drv: { + __darwinAllowLocalNetworking = true; + }); + jsaddle-wkwebview = overrideCabal (drv: { libraryFrameworkDepends = with pkgs.buildPackages.darwin.apple_sdk.frameworks; [ Cocoa WebKit ]; libraryHaskellDepends = with self; [ aeson data-default jsaddle ]; # cabal2nix doesn't add darwin-only deps From 5169cbeb91137a66df24e4421ce2394aa98a594b Mon Sep 17 00:00:00 2001 From: Alexandre Esteves Date: Thu, 30 May 2024 23:51:57 +0100 Subject: [PATCH 15/24] haskellPackages.jsaddle-warp: fix on ghc 9.8 --- pkgs/development/haskell-modules/configuration-ghc-9.8.x.nix | 1 + 1 file changed, 1 insertion(+) diff --git a/pkgs/development/haskell-modules/configuration-ghc-9.8.x.nix b/pkgs/development/haskell-modules/configuration-ghc-9.8.x.nix index ba0f6c31a216e..8b5ad996c24b9 100644 --- a/pkgs/development/haskell-modules/configuration-ghc-9.8.x.nix +++ b/pkgs/development/haskell-modules/configuration-ghc-9.8.x.nix @@ -68,6 +68,7 @@ self: super: { stylish-haskell = self.stylish-haskell_0_14_6_0; hlint = self.hlint_3_8; ghc-syntax-highlighter = self.ghc-syntax-highlighter_0_0_11_0; + websockets = self.websockets_0_13_0_0; # A given major version of ghc-exactprint only supports one version of GHC. ghc-exactprint = self.ghc-exactprint_1_8_0_0; From 128d0232cda169904642ab21871f39042f02f940 Mon Sep 17 00:00:00 2001 From: Alexandre Esteves Date: Thu, 30 May 2024 23:45:26 +0100 Subject: [PATCH 16/24] haskellPackages.jsaddle-dom: remove override --- pkgs/development/haskell-modules/configuration-common.nix | 5 ----- 1 file changed, 5 deletions(-) diff --git a/pkgs/development/haskell-modules/configuration-common.nix b/pkgs/development/haskell-modules/configuration-common.nix index 3d402d3d1be64..7e57dfcfda823 100644 --- a/pkgs/development/haskell-modules/configuration-common.nix +++ b/pkgs/development/haskell-modules/configuration-common.nix @@ -1560,11 +1560,6 @@ self: super: { doJailbreak ]; - jsaddle-dom = overrideCabal (old: { - postPatch = old.postPatch or "" + '' - rm Setup.hs - ''; - }) super.jsaddle-dom; jsaddle-hello = doJailbreak super.jsaddle-hello; ghcjs-dom-hello = doJailbreak super.ghcjs-dom-hello; From 78e2348b11ddb5dc606b9d6a4f22679b12257b30 Mon Sep 17 00:00:00 2001 From: Alexandre Esteves Date: Fri, 31 May 2024 01:00:50 +0100 Subject: [PATCH 17/24] haskellPackages.jsaddle-hello: fix on darwin --- .../haskell-modules/configuration-common.nix | 17 ++++++++++++++++- .../haskell-modules/configuration-darwin.nix | 5 +++++ .../configuration-hackage2nix/main.yaml | 1 - .../haskell-modules/hackage-packages.nix | 1 - 4 files changed, 21 insertions(+), 3 deletions(-) diff --git a/pkgs/development/haskell-modules/configuration-common.nix b/pkgs/development/haskell-modules/configuration-common.nix index 7e57dfcfda823..b444072c6b033 100644 --- a/pkgs/development/haskell-modules/configuration-common.nix +++ b/pkgs/development/haskell-modules/configuration-common.nix @@ -1560,7 +1560,22 @@ self: super: { doJailbreak ]; - jsaddle-hello = doJailbreak super.jsaddle-hello; + # Needs https://github.com/ghcjs/jsaddle-hello/pull/5 and hackage release + jsaddle-hello = appendPatches [ + (fetchpatch { + url = "https://github.com/ghcjs/jsaddle-hello/commit/c4de837675117b821c50a5079d20d84ec16ff26a.patch"; + sha256 = "sha256-NsM7QqNLt5V8i5bveYgMrawGnZVsIuAoJfBF75jBwV0="; + }) + (fetchpatch { + url = "https://github.com/ghcjs/jsaddle-hello/commit/5c437363833684ea951ec74a0d0fdf5b6fbaca85.patch"; + sha256 = "sha256-CUyZsts0FAQ3c8Z+zfvwbmlAJCMcidV80n8dA/SoRls="; + }) + (fetchpatch { + url = "https://github.com/ghcjs/jsaddle-hello/commit/e2da9e266fbfa8f7fcf3009ab6cfbf825a8bcf7a.patch"; + sha256 = "sha256-WL0CcnlMt6KI7MOZMg74fNN/I4gYSO3n+GiaXB2BOP0="; + }) + ] super.jsaddle-hello; + ghcjs-dom-hello = doJailbreak super.ghcjs-dom-hello; # Too strict upper bounds on text diff --git a/pkgs/development/haskell-modules/configuration-darwin.nix b/pkgs/development/haskell-modules/configuration-darwin.nix index 20e3ab0de13d3..cddba36884b1f 100644 --- a/pkgs/development/haskell-modules/configuration-darwin.nix +++ b/pkgs/development/haskell-modules/configuration-darwin.nix @@ -327,6 +327,11 @@ self: super: ({ __darwinAllowLocalNetworking = true; }); + jsaddle-hello = overrideCabal (drv: { + libraryHaskellDepends = with self; [ jsaddle lens ]; + executableHaskellDepends = with self; [ jsaddle-warp jsaddle-wkwebview ]; + }) super.jsaddle-hello; + jsaddle-wkwebview = overrideCabal (drv: { libraryFrameworkDepends = with pkgs.buildPackages.darwin.apple_sdk.frameworks; [ Cocoa WebKit ]; libraryHaskellDepends = with self; [ aeson data-default jsaddle ]; # cabal2nix doesn't add darwin-only deps diff --git a/pkgs/development/haskell-modules/configuration-hackage2nix/main.yaml b/pkgs/development/haskell-modules/configuration-hackage2nix/main.yaml index 1a734a348afa6..ee998754c560a 100644 --- a/pkgs/development/haskell-modules/configuration-hackage2nix/main.yaml +++ b/pkgs/development/haskell-modules/configuration-hackage2nix/main.yaml @@ -700,7 +700,6 @@ unsupported-platforms: intricacy: [ platforms.darwin ] # depends on mesa iwlib: [ platforms.darwin ] Jazzkell: [ platforms.darwin ] # depends on Euterpea - jsaddle-hello: [ platforms.darwin ] # depends on jsaddle-webkit2gtk jsaddle-webkit2gtk: [ platforms.darwin ] Kulitta: [ platforms.darwin ] # depends on Euterpea LambdaHack: [ platforms.darwin ] diff --git a/pkgs/development/haskell-modules/hackage-packages.nix b/pkgs/development/haskell-modules/hackage-packages.nix index 1a0a6b29d77c9..746ab257aecc1 100644 --- a/pkgs/development/haskell-modules/hackage-packages.nix +++ b/pkgs/development/haskell-modules/hackage-packages.nix @@ -178681,7 +178681,6 @@ self: { ]; description = "JSaddle Hello World, an example package"; license = lib.licenses.mit; - badPlatforms = lib.platforms.darwin; maintainers = [ lib.maintainers.alexfmpe ]; }) {}; From 9036501ab527eb84f80076c69bfbb1a6d29a1715 Mon Sep 17 00:00:00 2001 From: Alexandre Esteves Date: Fri, 31 May 2024 01:35:17 +0100 Subject: [PATCH 18/24] haskellPackages.ghcjs-dom-hello: fix on darwin --- .../haskell-modules/configuration-common.nix | 17 +++++++++++++++-- .../haskell-modules/configuration-darwin.nix | 5 +++++ .../configuration-hackage2nix/main.yaml | 1 - .../haskell-modules/hackage-packages.nix | 1 - 4 files changed, 20 insertions(+), 4 deletions(-) diff --git a/pkgs/development/haskell-modules/configuration-common.nix b/pkgs/development/haskell-modules/configuration-common.nix index b444072c6b033..e1efb46422a37 100644 --- a/pkgs/development/haskell-modules/configuration-common.nix +++ b/pkgs/development/haskell-modules/configuration-common.nix @@ -1560,6 +1560,21 @@ self: super: { doJailbreak ]; + ghcjs-dom-hello = appendPatches [ + (fetchpatch { + url = "https://github.com/ghcjs/ghcjs-dom-hello/commit/53991df6a4eba9f1e9633eb22f6a0486a79491c3.patch"; + sha256 = "sha256-HQeUgjvzYyY14+CDYiMahAMn7fBcy2d7p8/kqGq+rnI="; + }) + (fetchpatch { + url = "https://github.com/ghcjs/ghcjs-dom-hello/commit/d766d937121f7ea5c4c154bd533a1eae47f531c9.patch"; + sha256 = "sha256-QTkH+L+JMwGyuoqzHBnrokT7KzpHC4YiAWoeiaFBLUw="; + }) + (fetchpatch { + url = "https://github.com/ghcjs/ghcjs-dom-hello/commit/831464d995f4033c9aa84f9ed9fb37a268f34d4e.patch"; + sha256 = "sha256-hQMy+78geTuxd3kbdiyYqoAFrauu90HbpPi0EEKjMzM="; + }) + ] super.ghcjs-dom-hello; + # Needs https://github.com/ghcjs/jsaddle-hello/pull/5 and hackage release jsaddle-hello = appendPatches [ (fetchpatch { @@ -1576,8 +1591,6 @@ self: super: { }) ] super.jsaddle-hello; - ghcjs-dom-hello = doJailbreak super.ghcjs-dom-hello; - # Too strict upper bounds on text lsql-csv = doJailbreak super.lsql-csv; diff --git a/pkgs/development/haskell-modules/configuration-darwin.nix b/pkgs/development/haskell-modules/configuration-darwin.nix index cddba36884b1f..16e5d2613fb2e 100644 --- a/pkgs/development/haskell-modules/configuration-darwin.nix +++ b/pkgs/development/haskell-modules/configuration-darwin.nix @@ -327,6 +327,11 @@ self: super: ({ __darwinAllowLocalNetworking = true; }); + ghcjs-dom-hello = overrideCabal (drv: { + libraryHaskellDepends = with self; [ jsaddle jsaddle-warp ]; + executableHaskellDepends = with self; [ ghcjs-dom jsaddle-wkwebview ]; + }) super.ghcjs-dom-hello; + jsaddle-hello = overrideCabal (drv: { libraryHaskellDepends = with self; [ jsaddle lens ]; executableHaskellDepends = with self; [ jsaddle-warp jsaddle-wkwebview ]; diff --git a/pkgs/development/haskell-modules/configuration-hackage2nix/main.yaml b/pkgs/development/haskell-modules/configuration-hackage2nix/main.yaml index ee998754c560a..9dbb6480584ed 100644 --- a/pkgs/development/haskell-modules/configuration-hackage2nix/main.yaml +++ b/pkgs/development/haskell-modules/configuration-hackage2nix/main.yaml @@ -671,7 +671,6 @@ unsupported-platforms: freenect: [ platforms.darwin ] FTGL: [ platforms.darwin ] fuzzytime: [ platforms.darwin ] # https://github.com/kamwitsta/fuzzytime/issues/2 - ghcjs-dom-hello: [ platforms.darwin ] ghc-gc-hook: [ platforms.darwin ] # requires C11 threads which Apple doesn't support gi-adwaita: [ platforms.darwin ] gi-dbusmenugtk3: [ platforms.darwin ] diff --git a/pkgs/development/haskell-modules/hackage-packages.nix b/pkgs/development/haskell-modules/hackage-packages.nix index 746ab257aecc1..ac300d764c84b 100644 --- a/pkgs/development/haskell-modules/hackage-packages.nix +++ b/pkgs/development/haskell-modules/hackage-packages.nix @@ -121415,7 +121415,6 @@ self: { ]; description = "GHCJS DOM Hello World, an example package"; license = lib.licenses.mit; - badPlatforms = lib.platforms.darwin; maintainers = [ lib.maintainers.alexfmpe ]; }) {}; From d8989a7ddeb3a71766466b39067ad5f4a71a14a6 Mon Sep 17 00:00:00 2001 From: Alexandre Esteves Date: Wed, 19 Jun 2024 08:26:38 +0100 Subject: [PATCH 19/24] haskellPackages.ghcjs-base: fix build under old ghcjs --- pkgs/development/haskell-modules/configuration-ghcjs-8.x.nix | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/pkgs/development/haskell-modules/configuration-ghcjs-8.x.nix b/pkgs/development/haskell-modules/configuration-ghcjs-8.x.nix index c74fdb09232c2..6b52216fa7705 100644 --- a/pkgs/development/haskell-modules/configuration-ghcjs-8.x.nix +++ b/pkgs/development/haskell-modules/configuration-ghcjs-8.x.nix @@ -24,6 +24,11 @@ self: super: aeson = self.aeson_1_5_6_0; }); + # Some Hackage packages reference this attribute, which exists only in the + # GHCJS package set. We provide a dummy version here to fix potential + # evaluation errors. + ghcjs-prim = null; + # GHCJS does not ship with the same core packages as GHC. # https://github.com/ghcjs/ghcjs/issues/676 stm = doJailbreak self.stm_2_5_3_1; From d98cbf29a2c7e1bc86c966d320cee6070e62dc50 Mon Sep 17 00:00:00 2001 From: Alexandre Esteves Date: Wed, 19 Jun 2024 08:27:04 +0100 Subject: [PATCH 20/24] haskellPackages.ghcjs-websockets: fix build under old ghcjs --- pkgs/development/haskell-modules/configuration-ghcjs-8.x.nix | 2 ++ .../haskell-modules/configuration-hackage2nix/broken.yaml | 1 + pkgs/development/haskell-modules/hackage-packages.nix | 2 ++ 3 files changed, 5 insertions(+) diff --git a/pkgs/development/haskell-modules/configuration-ghcjs-8.x.nix b/pkgs/development/haskell-modules/configuration-ghcjs-8.x.nix index 6b52216fa7705..fd85cb75531c8 100644 --- a/pkgs/development/haskell-modules/configuration-ghcjs-8.x.nix +++ b/pkgs/development/haskell-modules/configuration-ghcjs-8.x.nix @@ -29,6 +29,8 @@ self: super: # evaluation errors. ghcjs-prim = null; + ghcjs-websockets = markUnbroken super.ghcjs-websockets; + # GHCJS does not ship with the same core packages as GHC. # https://github.com/ghcjs/ghcjs/issues/676 stm = doJailbreak self.stm_2_5_3_1; diff --git a/pkgs/development/haskell-modules/configuration-hackage2nix/broken.yaml b/pkgs/development/haskell-modules/configuration-hackage2nix/broken.yaml index 9cc21e201a202..59b5bc7abce29 100644 --- a/pkgs/development/haskell-modules/configuration-hackage2nix/broken.yaml +++ b/pkgs/development/haskell-modules/configuration-hackage2nix/broken.yaml @@ -1999,6 +1999,7 @@ broken-packages: - ghcjs-fetch # timeout - ghcjs-promise # failure in job https://hydra.nixos.org/build/233243985 at 2023-09-02 - ghcjs-xhr # failure in job https://hydra.nixos.org/build/233235693 at 2023-09-02 + - ghcjs-websockets # Does not work on the js backend added in 9.6+, only on ghcjs, where we markUnbroken - ghc-justdoit # failure in job https://hydra.nixos.org/build/233221884 at 2023-09-02 - ghclive # failure in job https://hydra.nixos.org/build/233231592 at 2023-09-02 - ghc-man-completion # failure in job https://hydra.nixos.org/build/233245740 at 2023-09-02 diff --git a/pkgs/development/haskell-modules/hackage-packages.nix b/pkgs/development/haskell-modules/hackage-packages.nix index ac300d764c84b..90155cd0fef6f 100644 --- a/pkgs/development/haskell-modules/hackage-packages.nix +++ b/pkgs/development/haskell-modules/hackage-packages.nix @@ -121565,6 +121565,8 @@ self: { ]; description = "Deprecated: use ghcjs-base's native websockets"; license = lib.licenses.mit; + hydraPlatforms = lib.platforms.none; + broken = true; }) {}; "ghcjs-xhr" = callPackage From b552f61df93a6d13aa52830130bf6eb6760361b7 Mon Sep 17 00:00:00 2001 From: Alexandre Esteves Date: Wed, 19 Jun 2024 08:29:29 +0100 Subject: [PATCH 21/24] haskellPackages.ghcjs-base: disable support when building outside of js context --- .../haskell-modules/configuration-hackage2nix/main.yaml | 1 + pkgs/development/haskell-modules/hackage-packages.nix | 1 + 2 files changed, 2 insertions(+) diff --git a/pkgs/development/haskell-modules/configuration-hackage2nix/main.yaml b/pkgs/development/haskell-modules/configuration-hackage2nix/main.yaml index 9dbb6480584ed..984eeb3a6af30 100644 --- a/pkgs/development/haskell-modules/configuration-hackage2nix/main.yaml +++ b/pkgs/development/haskell-modules/configuration-hackage2nix/main.yaml @@ -791,6 +791,7 @@ supported-platforms: geomancy: [ platforms.x86 ] # x86 intrinsics geomancy-layout: [ platforms.x86 ] # x86 intrinsics gi-gtkosxapplication: [ platforms.darwin ] + ghcjs-base: [ javascript-ghcjs ] ghcjs-dom-javascript: [ javascript-ghcjs ] gtk-mac-integration: [ platforms.darwin ] gtk3-mac-integration: [ platforms.darwin ] diff --git a/pkgs/development/haskell-modules/hackage-packages.nix b/pkgs/development/haskell-modules/hackage-packages.nix index 90155cd0fef6f..babb4a166fd4a 100644 --- a/pkgs/development/haskell-modules/hackage-packages.nix +++ b/pkgs/development/haskell-modules/hackage-packages.nix @@ -121346,6 +121346,7 @@ self: { sha256 = "1cx9jqpbr6b30qckp2zpsfk3swa58snjb79pq0l6485nvrxa9mls"; description = "base library for GHCJS"; license = lib.licenses.mit; + platforms = [ "javascript-ghcjs" ]; maintainers = [ lib.maintainers.alexfmpe ]; }) {}; From e9a349aea9bf98bd8929575034c231cc08cff584 Mon Sep 17 00:00:00 2001 From: Alexandre Esteves Date: Wed, 19 Jun 2024 13:38:33 +0100 Subject: [PATCH 22/24] haskellPackages.ghcjs-prim: Clarify comment --- pkgs/development/haskell-modules/configuration-ghcjs-8.x.nix | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/pkgs/development/haskell-modules/configuration-ghcjs-8.x.nix b/pkgs/development/haskell-modules/configuration-ghcjs-8.x.nix index fd85cb75531c8..3f6e399f795b8 100644 --- a/pkgs/development/haskell-modules/configuration-ghcjs-8.x.nix +++ b/pkgs/development/haskell-modules/configuration-ghcjs-8.x.nix @@ -24,9 +24,7 @@ self: super: aeson = self.aeson_1_5_6_0; }); - # Some Hackage packages reference this attribute, which exists only in the - # GHCJS package set. We provide a dummy version here to fix potential - # evaluation errors. + # Included in ghcjs itself ghcjs-prim = null; ghcjs-websockets = markUnbroken super.ghcjs-websockets; From f7227f35973556a4445f3baef030b91bfaa8c75f Mon Sep 17 00:00:00 2001 From: Leo Coogan Date: Mon, 17 Jun 2024 12:24:46 -0400 Subject: [PATCH 23/24] haskellPackages.hledger-iadd: Remove broken flag --- .../configuration-hackage2nix/broken.yaml | 1 - .../transitive-broken.yaml | 3 --- .../haskell-modules/hackage-packages.nix | 13 ------------- 3 files changed, 17 deletions(-) diff --git a/pkgs/development/haskell-modules/configuration-hackage2nix/broken.yaml b/pkgs/development/haskell-modules/configuration-hackage2nix/broken.yaml index 9cc21e201a202..75ff09173efdb 100644 --- a/pkgs/development/haskell-modules/configuration-hackage2nix/broken.yaml +++ b/pkgs/development/haskell-modules/configuration-hackage2nix/broken.yaml @@ -2608,7 +2608,6 @@ broken-packages: - hledger-chart # failure in job https://hydra.nixos.org/build/233205387 at 2023-09-02 - hledger-diff # failure in job https://hydra.nixos.org/build/233199639 at 2023-09-02 - hledger-flow # failure in job https://hydra.nixos.org/build/233252169 at 2023-09-02 - - hledger-iadd # failure in updateAutotoolsGnuConfigScriptsPhase in job https://hydra.nixos.org/build/238288021 at 2023-10-21 - hledger-irr # failure in job https://hydra.nixos.org/build/233230276 at 2023-09-02 - hledger-makeitso # failure in job https://hydra.nixos.org/build/233213046 at 2023-09-02 - hledger-vty # failure in job https://hydra.nixos.org/build/233191782 at 2023-09-02 diff --git a/pkgs/development/haskell-modules/configuration-hackage2nix/transitive-broken.yaml b/pkgs/development/haskell-modules/configuration-hackage2nix/transitive-broken.yaml index 0976a60db5784..02e2d5954d20f 100644 --- a/pkgs/development/haskell-modules/configuration-hackage2nix/transitive-broken.yaml +++ b/pkgs/development/haskell-modules/configuration-hackage2nix/transitive-broken.yaml @@ -665,7 +665,6 @@ dont-distribute-packages: - bip32 - birch-beer - bird - - bisc - biscuit-servant - bishbosh - bit-array @@ -3569,8 +3568,6 @@ dont-distribute-packages: - secrm - sednaDBXML - seitz-symbol - - selda-json - - selda-sqlite - selenium-server - semantic-source - semantic-version diff --git a/pkgs/development/haskell-modules/hackage-packages.nix b/pkgs/development/haskell-modules/hackage-packages.nix index ac300d764c84b..8049119d2e0ba 100644 --- a/pkgs/development/haskell-modules/hackage-packages.nix +++ b/pkgs/development/haskell-modules/hackage-packages.nix @@ -50661,7 +50661,6 @@ self: { ]; description = "A small tool that clears cookies (and more)"; license = lib.licenses.gpl3Only; - hydraPlatforms = lib.platforms.none; mainProgram = "bisc"; }) {}; @@ -151703,9 +151702,7 @@ self: { testToolDepends = [ hspec-discover ]; description = "A terminal UI as drop-in replacement for hledger add"; license = lib.licenses.bsd3; - hydraPlatforms = lib.platforms.none; mainProgram = "hledger-iadd"; - broken = true; }) {}; "hledger-iadd_1_3_21" = callPackage @@ -151741,7 +151738,6 @@ self: { license = lib.licenses.bsd3; hydraPlatforms = lib.platforms.none; mainProgram = "hledger-iadd"; - broken = true; }) {}; "hledger-interest" = callPackage @@ -189484,8 +189480,6 @@ self: { ]; description = "Haskell bindings to LevelDB"; license = lib.licenses.bsd3; - hydraPlatforms = lib.platforms.none; - broken = true; }) {inherit (pkgs) leveldb;}; "leveldb-haskell-fork" = callPackage @@ -267546,9 +267540,7 @@ self: { description = "Generates unique passwords for various websites from a single password"; license = lib.licenses.bsd3; platforms = lib.platforms.x86; - hydraPlatforms = lib.platforms.none; mainProgram = "scat"; - broken = true; }) {}; "scc" = callPackage @@ -269923,8 +269915,6 @@ self: { ]; description = "Multi-backend, high-level EDSL for interacting with SQL databases"; license = lib.licenses.mit; - hydraPlatforms = lib.platforms.none; - broken = true; }) {}; "selda-json" = callPackage @@ -269936,7 +269926,6 @@ self: { libraryHaskellDepends = [ aeson base bytestring selda text ]; description = "JSON support for the Selda database library"; license = lib.licenses.mit; - hydraPlatforms = lib.platforms.none; }) {}; "selda-postgresql" = callPackage @@ -269971,7 +269960,6 @@ self: { ]; description = "SQLite backend for the Selda database EDSL"; license = lib.licenses.mit; - hydraPlatforms = lib.platforms.none; }) {}; "select" = callPackage @@ -336470,7 +336458,6 @@ self: { ]; description = "Add CSP headers to Yesod apps"; license = lib.licenses.mit; - hydraPlatforms = lib.platforms.none; }) {}; "yesod-datatables" = callPackage From 96a701f146fdec0cc344d7ccb854860f1810c210 Mon Sep 17 00:00:00 2001 From: Marc Scholten Date: Mon, 17 Jun 2024 09:44:01 -0700 Subject: [PATCH 24/24] haskellPackages: add mpscholten as maintainer --- .../configuration-hackage2nix/main.yaml | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/pkgs/development/haskell-modules/configuration-hackage2nix/main.yaml b/pkgs/development/haskell-modules/configuration-hackage2nix/main.yaml index 9dbb6480584ed..41eb0934b7f9f 100644 --- a/pkgs/development/haskell-modules/configuration-hackage2nix/main.yaml +++ b/pkgs/development/haskell-modules/configuration-hackage2nix/main.yaml @@ -650,6 +650,24 @@ package-maintainers: - nix-tree zowoq: - ShellCheck + mpscholten: + - ihp-hsx + - push-notify-apn + - hs-pkpass + - raven-haskell + - stripe-concepts + - stripe-signature + - http2-client + - zip + - currencies + - string-random + - inflections + - pcre-heavy + - mmark + - mmark-ext + - typerep-map + - minio-hs + - smtp-mail unsupported-platforms: Allure: [ platforms.darwin ]