Commit Graph

33 Commits

Author SHA1 Message Date
Robert Hensing
b6a3b8846e haskell.lib.buildFromSdist: add test, fix double-patch
Same issue as buildFromCabalSdist: sdistTarball applies patches via
overrideDerivation, but the patches attribute remained, causing
patchPhase to apply them again.
2025-12-28 15:31:09 +01:00
nixpkgs-ci[bot]
9c3c785b9e Merge staging-next into staging 2025-10-26 00:19:00 +00:00
Aliaksandr
dc7095a86e treewide: remove deprecated lib functions that had warning for more than 2 years 2025-10-24 06:30:16 +03: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
0eedc11e2f haskell.lib: make krank ignore informational issue references 2025-09-26 14:31:36 +02:00
sternenseemann
6bd080254c haskell.lib: remove controlPhases and ghcInfo 2025-09-06 14:56:30 +02:00
Wolfgang Walther
5a0711127c treewide: run nixfmt 1.0.0 2025-07-24 13:55:40 +02:00
Silvan Mosberger
4f0dadbf38 treewide: format all inactive Nix files
After final improvements to the official formatter implementation,
this commit now performs the first treewide reformat of Nix files using it.
This is part of the implementation of RFC 166.

Only "inactive" files are reformatted, meaning only files that
aren't being touched by any PR with activity in the past 2 months.
This is to avoid conflicts for PRs that might soon be merged.
Later we can do a full treewide reformat to get the rest,
which should not cause as many conflicts.

A CI check has already been running for some time to ensure that new and
already-formatted files are formatted, so the files being reformatted here
should also stay formatted.

This commit was automatically created and can be verified using

    nix-build a08b3a4d19.tar.gz \
      --argstr baseRev b32a094368
    result/bin/apply-formatting $NIXPKGS_PATH
2024-12-10 20:26:33 +01:00
Robert Hensing
729225e355 treewide: lib.isInOldestRelease -> lib.oldestSupportedReleaseIsAtLeast 2024-10-08 11:14:24 +02:00
Rodney Lorrimar
e2d259ebc0 pkgs.haskell.lib: Add disableParallelBuilding function 2024-09-23 11:36:24 +02:00
Philip Taron
8e3651c954 aeson: remove with statements 2024-08-18 06:31:15 -07:00
Magnus Viernickel
110fb9b4b5 haskell.lib.compose: don't disable library profiling in justStaticExecutables 2024-07-01 17:50:29 +02:00
Rebecca Turner
d2618822ab haskell.lib.compose.justStaticExecutables: Forbid references to GHC
This makes `justStaticExecutables` error if the produced store path
contains references to GHC. This is almost always erroneous and due to
the generated `Paths_*` module being imported. This helps prevent
`justStaticExecutables` from producing binaries with closure sizes in
the gigabytes.

See: https://github.com/NixOS/nixpkgs/issues/164630

Co-authored-by: sternenseemann <sternenseemann@systemli.org>
2024-05-27 21:08:16 +02:00
Wolfgang Walther
72e03b91ea haskellPackages: add dontCheckIf helper
Using this helper will prevent introducing problematic doCheck = condition overrides,
which accidentally re-enable previously disabled tests.
2024-02-26 12:32:02 +01:00
Wolfgang Walther
eb56edbce0 haskellPackages.mkDerivation: remove version checks for unsupported GHC
Most of the version checks for GHC can be removed, because they target versions
which are not part of nixpkgs anymore.
2024-02-08 14:39:02 +01:00
sternenseemann
43b6f6d3c6 haskell.lib.compose.triggerRebuild: don't discard old postUnpack 2023-12-14 19:01:34 +01:00
Gabriella Gonzalez
aa75fa1eaa haskell.lib.packagesFromDirectory: only .nix files
This changes `haskell.lib.packagesFromDirectory` to ignore non-Nix
files so that it doesn't attempt to run `callPackage` on, say, a
`.md` file in the same directory.
2023-11-07 14:33:28 -08:00
Peter Simons
962633e4d1 haskell.packages.ghc94.gtk2hs-buildtools: gtk2hs setup hook broken for ghc-9.4.4
See https://github.com/gtk2hs/gtk2hs/issues/323 for details.
2023-02-04 12:34:07 +01:00
sternenseemann
63862f4a66 haskell.packages.ghc94.X11-xft: automate workaround for cabal#8455
The current workaround for the regression is propagating the
runtime dependency closure (technically only Requires.private in the
pkg-config files). This can easily be done automatically by mimicking
how e.g. pkgsStatic converts buildInputs to propagatedBuildInputs.
This is extracted into a helper function,
__CabalEagerPkgConfigWorkaround, which can be applied to any package
easily.
2023-02-04 12:34:07 +01:00
sternenseemann
0a66465b22 doc/haskell: (re-)init haskell manual section
This restarts a Haskell section in the nixpkgs manual. The content
presented here has been written from scratch, although some parts of it
take inspiration from the existing haskell4nix documentation.

It is by no means complete, the idea is mostly to get the ball rolling
in some way. Upcoming tasks are hinted at in the comments in the
documentation file.
2023-01-14 22:33:35 +01:00
figsoda
ec8cb34358 treewide: fix typos 2022-12-17 19:39:44 -05:00
sternenseemann
9e9b7f4d99 haskell.lib.compose.addOptparseApplicativeCompletionScripts: remove
This function was deprecated when it was first added to
haskell.lib.compose, so we can probably safely drop it.
2022-10-07 00:37:53 +02:00
sternenseemann
ac1f1ad0e0 haskell: support cross in generateOptparseApplicativeCompletions
Deprecate haskell.lib{,.compose}.generateOptparseApplicativeCompletion*
in favor of the newly added
haskell.packages.*.generateOptparseApplicativeCompletions (plural!)
which takes into account whether we are cross-compiling or not. If we
are, generating completions is disabled, since we can't execute software
built for a different platform.

The move is necessary, so we can receive the /same/ stdenv as the
package we are overriding in order to accurately check whether we can
execute produced binaries.

Resolves #174040.
Resolves #49648.
2022-10-07 00:37:53 +02:00
Robert Hensing
d64780ea0e Merge pull request #174176 from hercules-ci/buildFromCabalSdist
haskellPackages: Add buildFromCabalSdist (faster, tested)
2022-06-28 10:06:27 +02:00
sternenseemann
7503f25359 haskell.lib: make doDistribute respect badPlatforms
release-lib.nix's packagePlatforms will (understandably) take
hydraPlatforms at face value, so we need to make sure that we don't slip
anything actually unsupported in there.
2022-06-19 23:47:57 +02:00
Robert Hensing
cf5e2d5103 haskellPackages: Add buildFromCabalSdist (faster, tested) 2022-05-23 22:28:57 +02:00
sternenseemann
767fefc21c haskell.lib: move lib.nix into same directory as compose.nix 2022-01-22 21:38:03 +01:00
Jonathan Ringer
2e6fadac4e Merge remote-tracking branch 'origin/staging-next' into staging
Conflicts:
	pkgs/development/python-modules/django-rq/default.nix
2021-12-02 16:07:50 -08:00
sternenseemann
6496069dda haskell.lib{,.compose}.doDistribute: default to lib.platforms.all
This reflects the default value set in generic-builder.nix, following
the reasoning that GHC can cross-compile and we assume that packages are
generally portable.
2021-12-02 11:27:12 +01:00
Profpatsch
5abb1856ce haskell-modules/lib: make postFixup more resilient
1. Putting the string on one line (instead of using a multiline
string) means it is not ended with \n, which means if somebody wants
to append more lines, they have to start it with \n or it will get
concatenated to the `postFixup` here, so add \n.

2. Previously, ignoring `drv.postFixup` would throw away any
`postFixup`s set in `drv`, which is not something we want.

The extra empty line is a cute trick to prevent concatenating the code
with any previous `postFixup` that doesn’t end in \n.
2021-11-27 15:47:58 +01:00
Ellie Hermaszewska
15ae25f36c haskell: switch from haskell.lib to haskell.lib.compose 2021-11-07 20:18:45 +08:00
Ellie Hermaszewska
518f09f2d0 haskell.lib.compose: init
No changes in derivations for pkgs.haskellPackages
2021-11-07 19:40:00 +08:00