Commit Graph

24 Commits

Author SHA1 Message Date
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