369 Commits

Author SHA1 Message Date
Alexandre Esteves 74fe81b7a3 haskellPackages: fix typos of __darwinAllowLocalNetworking argument 2026-04-18 22:25:19 +01:00
Alexandre Esteves d2e8530be2 haskellPackages.iserv-proxy: use in subprocess mode when doing cross 2026-04-08 20:41:47 +01:00
Alexandre Esteves 3750bf46f3 haskellPackages.iserv-proxy: fix on GHC 9.6 2026-03-16 03:02:49 +00:00
sternenseemann 348337960c haskellPackages: allow local networking when using iserv-proxy (#497113) 2026-03-11 13:32:39 +00:00
Alexandre Esteves 26f809bd67 haskellPackages: allow local networking when using iserv-proxy 2026-03-11 13:19:34 +00:00
sternenseemann 78ad85cb66 haskellPackages.mkDerivation: explicitly take glibcLocales for buildPackages
In #424368, there was some confusion whether glibcLocales should come from
buildPackages or pkgsHostTarget since there were seemingly different pieces
of code in generic-builder.nix. As it turns out, the plain glibcLocales was
inherited from buildPackages, so there was no actual difference. Making this
explicit everywhere should clear things up.
2026-03-08 12:02:29 +01:00
Alexandre Esteves 1cb5e9f635 haskellPackages: don't use external interpreter by default in ghcjs 2026-02-17 23:22:21 +00:00
Alexandre Esteves 18b7ec148d haskellPackages: silence wine debug messages 2026-02-10 20:14:25 +00:00
Alexandre Esteves fa7d26d067 haskellPackages: include pthread libraries when using the external interpreter on Windows
Fixes errors:
  - user specified .o/.so/.DLL could not be loaded (addDLL: pthread or dependencies not loaded. (Win32 error 126))
  - iserv-proxy-interpreter.exe:Couldnotload`libwinpthread-1.dll'.Reason:addDLL:libwinpthread-1.dllordependenciesnotloaded.(Win32error126)
2026-02-10 20:14:25 +00:00
Alexandre Esteves 762762f482 haskellPackages: use correct platform extension when running iserv-proxy-interpreter
Fixes error:
  wine: failed to open "/nix/store/5hhjpr2hgz7pyzhpl2hrl0pgmh8sczaq-iserv-proxy-x86_64-w64-mingw32-9.3-unstable-2025-06-21/bin/iserv-proxy-interpreter": c0000135
2026-02-10 12:45:24 +00:00
Alexandre Esteves 6c856e8725 haskellPackages: set prefix directory when running under Wine
Fixes error:
  chdir to /homeless-shelter/.wine : No such file or directory
2026-02-10 12:45:24 +00:00
nixpkgs-ci[bot] 7bad341585 Merge master into staging-next 2026-01-22 12:08:02 +00:00
Arnout Engelen 77be50b9bd ghc: enable object determinism by default
This is particularly relevant for us because we include
objects in haskell derivation outputs, and this fixes
reproducibility for a significant number of those.

Towards #151347
2026-01-22 09:43:07 +01:00
Wolfgang Walther 861a65fc21 haskellPackages.mkDerivation: faster haddockPhase (#462361) 2025-12-26 11:34:20 +00:00
Wolfgang Walther 916a35c1e0 haskell: export build flags as a shell variable (#463887) 2025-12-26 11:34:11 +00:00
Alexandre Esteves 20df4a1dbe haskellPackages: support Template Haskell when cross compiling
This makes TH work when cross-compiling between aarch64 and x86_64 for
both glibc and musl.

pkgsStatic does not work, yet and neither does darwin.
2025-11-30 19:14:31 +01:00
Jade Lovelace 2a9345daf1 haskell: export build flags as a shell variable
This is useful so that you can call `Setup build` on other targets e.g.
for code generation while still having the same flags.

The context that led me to write this patch is that we have HIE file
generation in an overlay at work and I was packaging Glean, which
requires a code gen component get built, and it was building twice due
to the hie flags not getting propagated to the Setup build commands I
was running manually.
2025-11-21 16:20:29 -08:00
Marc Scholten 5b7296475f haskellPackages.mkDerivation: pass --no-tmp-comp-dir to haddock
this avoids file operations that are not needed in nixpkgs
2025-11-16 12:16:18 -08:00
Marc Scholten 34d0c0cef5 haskellPackages.mkDerivation: pass -j to haddock 2025-11-16 12:15:24 -08:00
sternenseemann 866c9d08ef Merge haskell-updates PR #452254 into staging-next 2025-11-02 23:28:12 +01:00
sternenseemann a9d886f66e haskellPackages.mkDerivation: make license optional (#455796) 2025-10-26 16:42:03 +00:00
sternenseemann 03f27237ac haskellPackages.mkDerivation: make license optional
`stdenv.mkDerivation` does not require meta.license to be passed, so there
is no reason `haskellPackages.mkDerivation` needs to enforce this. This
would free up cabal2nix to not report a license if it is not sure.

As I have argued in https://github.com/NixOS/cabal2nix/pull/677#issuecomment-3444635379,
it is better not to report a license than reporting an inaccurate one.

This would also allow to stop generating arbitrary strings as licenses
in cabal2nix to remove string values to facilitate more cleanliness in
the spirit of https://github.com/NixOS/nixpkgs/pull/445672, though the
question is whether it is wise to remove the meta data altogether.
2025-10-26 12:04:29 +01:00
nixpkgs-ci[bot] 5f8a5c0c89 Merge 22bb9b3079 into haskell-updates 2025-10-23 00:21:42 +00:00
Wolfgang Walther 33735c24b9 Merge branch 'haskell-updates' into staging 2025-10-15 13:54:11 +02:00
Luna Nova e7fbed853b treewide: remove usages of obsolete pie hardening flag 2025-10-09 10:13:03 -07:00
Vladimír Čunát 7a566913da haskellPackages: restrict a darwin workaround to affected GHCs (#444983) 2025-10-07 11:56:41 +02:00
nixpkgs-ci[bot] 99bf2f7c42 Merge 0832d1b3a0 into haskell-updates 2025-10-05 00:22:14 +00:00
NAHO c8d4dabc43 pkgs: remove optional builtins prefixes from prelude functions
Remove optional builtins prefixes from prelude functions by running:

    builtins=(
      abort
      baseNameOf
      break
      derivation
      derivationStrict
      dirOf
      false
      fetchGit
      fetchMercurial
      fetchTarball
      fetchTree
      fromTOML
      import
      isNull
      map
      null
      placeholder
      removeAttrs
      scopedImport
      throw
      toString
      true
    )

    fd \
      --type file \
      . \
      pkgs \
      --exec-batch sed --in-place --regexp-extended "
        s/\<builtins\.($(
          printf '%s\n' "${builtins[@]}" |
            paste --delimiter '|' --serial -
        ))\>/\1/g
      "

    nix fmt
2025-10-04 19:02:37 +02:00
sternenseemann bcab0af638 haskellPackages.mkDerivation: convert .cabal file after prePatch
cabal2nix emits prePatch = "hpack" for packages that need it, so the
.cabal file may not exist before prePatch.
2025-09-28 21:10:07 +02:00
sternenseemann d9757d4fe3 haskellPackages.mkDerivation: jailbreak any/all cabal files
Since Cabal only allows a single cabal file per directory, we can just
jailbreak *.cabal which works even if the user doesn't have set pname to
match the cabal file name (which they SHOULD do, though).

The only remaining reference to ${pname}.cabal in the revision handling
code is fine since we know the proper name of the cabal file from
Hackage in that case.
2025-09-28 21:10:07 +02:00
sternenseemann 621a3a56eb haskellPackages.mkDerivation: convert any/all cabal files to unix nls
In general, `pname` SHOULD be the same as the Cabal package name in
Haskell updates, but things work fine without this in many cases (e.g.
when only building executables), so we need to preserve this.

Since Cabal only allows a single .cabal file per directory, we can just
process *.cabal.
2025-09-28 21:10:07 +02:00
sternenseemann 1deb92346f haskellPackages.mkDerivation: enforce unix line endings in cabal files
Automatically use sed(1) to remove DOS line endings from .cabal files.
This is intended to work around Hackage producing revised cabal files
with DOS line endings (https://github.com/haskell/hackage-server/issues/316).
This frequently leads to

- patches failing to apply. Unfortunately there is no way to apply a
  patch with Unix line endings to a file with DOS line endings with
  GNU patch(1). Only the following combinations are supported:

  file  patch  comment
  Unix  Unix
  DOS   DOS    using --binary
  DOS   Unix   Haven't tested it, but I assume it works because
               patch(1) converts the file to Unix line endings
               implicitly (which can be disabled using --binary),
               but never the patch…

- Test suites sometimes involve the .cabal file which can be
  affected by the line endings.

This behavior is enabled by default to prevent cases where (unrevised)
packages regress when they get a revision later. Of course, the behavior
is a little nonsensical for non-Hackage packages, but it is probably
rarely an issue in practice. When DOS line endings need to be preserved,
the user can pass `dontConvertCabalFileToUnix = true`.

Supersedes #279248.
Resolves #206840.
2025-09-26 11:56:55 +02:00
sternenseemann 9a1da95d15 haskellPackages: restrict darwin int ptr workaround to affected GHCs
A fix was merged for GHC >= 9.10 which has been backported to GHC 9.8.2
and 9.6.5.

- http://gitlab.haskell.org/ghc/ghc/-/commit/a5a7a0cead6de89648d3a7323c2dc64c59a830fc
- https://gitlab.haskell.org/ghc/ghc/-/commit/92239edecc9b5c7462f9d261742ae7c19f67e757
2025-09-22 15:33:30 +02:00
Wolfgang Walther 4a5ab1eb69 haskell.compiler.ghc865Binary: drop
This was used for bootstrapping GHC on powerpc64le, but it's unclear
whether that actually still works. It makes no sense to pretend to
support it, when it's most likely broken, but we can't even verify.

Also the bootstrap chain will be broken once we drop GHC 8.10.7, so we
might as well drop the whole thing.
2025-09-07 00:32:48 +02:00
sternenseemann 7b5b5fe515 treewide: drop GHCJS specific code
This affects haskelPackages.mkDerivation, ghcWithPackages and
hoogleWithPackages which means that it is not possible to re-introduce
a ghcjs derivation downstream and create a ghcjs package set with an up
to date Nixpkgs.
2025-09-06 14:56:31 +02:00
Wolfgang Walther 3f3bd4ce47 Merge commit 'ebebf7f93a3ef53489e240247e518f2f08d85b28' into haskell-updates 2025-07-24 14:38:10 +02:00
Wolfgang Walther 5a0711127c treewide: run nixfmt 1.0.0 2025-07-24 13:55:40 +02:00
nixpkgs-ci[bot] f2ef2c1505 Merge 77fc6c546b into haskell-updates 2025-07-22 00:23:04 +00:00
Wolfgang Walther 48389ccc6b haskellPackages.mkDerivation: Add env argument (#424368) 2025-07-21 13:07:14 +00:00
Rebecca Turner d3e4f784aa haskellPackages.mkDerivation: Add env argument
Previously, setting environment variables in a Haskell package build
required using `.overrideAttrs`, which (I think?) breaks later
invocations of `haskell.lib.overrideCabal`.

This patch adds an `env` argument to `haskellPackages.mkDerivation`,
which can be used to set environment variables during Haskell package
builds.
2025-07-16 11:38:18 -07:00
Alexandre Esteves 4fe25a0493 Add note about leaking into RPATH 2025-06-16 04:37:18 +01:00
Alexandre Esteves 571e7eb5d2 haskellPackages: disable shared libraries on android-prebuilt
Fixes build of `pkgsCross.aarch64-android-prebuilt.haskell.packages.ghc910.attoparsec`:
```
RPATH of binary /nix/store/g6ncgk2b04mv722hh2jgfbixyawbwabv-attoparsec-aarch64-unknown-linux-android-0.14.4/lib/ghc-9.10.1/lib/aarch64-android-ghc-9.10.1-inplace/libHSattoparsec-0.14.4-GkMCGqk5eKArKmd1r9IB7-ghc9.10.1.so contains a forbidden reference to /build/
```
2025-06-04 13:12:12 +01:00
K900 f96ac2dcd6 Merge remote-tracking branch 'origin/master' into staging-next 2025-04-26 09:07:48 +03:00
Fernando Rodrigues 05580f4b44 treewide: switch instances of lib.teams.*.members to the new meta.teams attribute
Follow-up to #394797.

Signed-off-by: Fernando Rodrigues <alpha@sigmasquadron.net>
2025-04-25 22:20:17 -03:00
Alexandre Esteves a6aabc498c haskellPackages: when building with js backend, output jsexe directory alongside executable 2025-04-22 15:24:03 +01:00
Wolfgang Walther 9e296dcf84 Merge commit '3b48b2eb41f0bcd2c0551cd1c2457fdae806c7a3' into haskell-updates-merge-nixfmt 2025-04-05 14:19:34 +02:00
Silvan Mosberger 374e6bcc40 treewide: Format all Nix files
Format all Nix files using the officially approved formatter,
making the CI check introduced in the previous commit succeed:

  nix-build ci -A fmt.check

This is the next step of the of the [implementation](https://github.com/NixOS/nixfmt/issues/153)
of the accepted [RFC 166](https://github.com/NixOS/rfcs/pull/166).

This commit will lead to merge conflicts for a number of PRs,
up to an estimated ~1100 (~33%) among the PRs with activity in the past 2
months, but that should be lower than what it would be without the previous
[partial treewide format](https://github.com/NixOS/nixpkgs/pull/322537).

Merge conflicts caused by this commit can now automatically be resolved while rebasing using the
[auto-rebase script](https://github.com/NixOS/nixpkgs/tree/8616af08d915377bd930395f3b700a0e93d08728/maintainers/scripts/auto-rebase).

If you run into any problems regarding any of this, please reach out to the
[formatting team](https://nixos.org/community/teams/formatting/) by
pinging @NixOS/nix-formatting.
2025-04-01 20:10:43 +02:00
Teo Camarasu 9f22e12dea haskellPackages.mkDerivation: Replace testTarget with testTargets
testTarget takes a space separated list of test suites to run. We itnroduce a new testTargets argument that instead takes a list, and add a backwards compatibility shim
2025-02-11 12:03:18 +00:00
github-actions[bot] d97909c3f6 Merge master into haskell-updates 2024-12-15 00:19:59 +00:00
github-actions[bot] 8c5656aa89 Merge master into staging-next 2024-12-15 00:17:27 +00:00