Commit graph

96 commits

Author SHA1 Message Date
Dennis Gosnell
ba354d5ad8
haskell.lib.setBuildTargets: fix spelling in doc string 2021-05-02 13:35:08 +09:00
Isaac Shapira
d725ac7942
Add haskell.lib.setBuiltTarget, and support non library compiling of a single target 2021-05-02 13:35:07 +09:00
Jonathan Ringer
9bb3fccb5b treewide: pkgs.pkgconfig -> pkgs.pkg-config, move pkgconfig to alias.nix
continuation of #109595

pkgconfig was aliased in 2018, however, it remained in
all-packages.nix due to its wide usage. This cleans
up the remaining references to pkgs.pkgsconfig and
moves the entry to aliases.nix.

python3Packages.pkgconfig remained unchanged because
it's the canonical name of the upstream package
on pypi.
2021-01-19 01:16:25 -08:00
Robert Hensing
ae13cc9790 haskell.lib.generateOptparseApplicativeCompletion: support separate bin 2020-12-18 20:27:53 +01:00
Joe Hermaszewski
7673eda11d haskell: Add documentationTarball to lib 2020-11-13 21:37:56 +01:00
Joe Hermaszewski
407bb3ba3f haskell: whitespace fixes 2020-11-13 21:37:56 +01:00
Joe Hermaszewski
a3d8c1284f haskell: add addTestToolDepends 2020-11-13 21:37:56 +01:00
Ashesh Ambasta
32c8e793bc Additional docs for doJailbreak
Yesterday with @infinisil on #nixos, he pointed me to: peti/jailbreak-cabal#7 after a good deal of time wrangling through a package to make it work. 
The `nix-build -K` command, is very handy for debugging things like these, again I learnt from infinisil. 
And after much experimenting and looking through, it turned out that jailbreaking wasn't working as expected, and its documentation could point it out to avoid future confusion.
2020-04-24 22:00:38 +02:00
Ben Gamari
cdf1a522ca haskell/lib: Introduce markUnbroken helper
As discussed in #59409, this is quite useful now since we mark things as
broken so liberally.
2019-07-14 12:26:04 -04:00
Peter Simons
f399f890dd haskell-stack: clean up deep overrides 2019-06-19 22:46:56 +02:00
Domen Kožar
bd06834d5e
haskell: allow separate bin output, disable by default 2019-03-29 15:10:42 +07:00
Shea Levy
30fb5b0dcf
haskell generic builder: Add flag to allow inconsistent dependencies. 2018-12-15 13:31:08 -05:00
David Johnson
e42d10957d Add disable core optimizations (#51464)
haskell.lib.disableOptimization: new function

Adds a utility function for disabling GHC core optimizations.
Significantly reduces build times.
2018-12-03 19:46:22 +01:00
John Ericson
ebd1dd54e5 Merge remote-tracking branch 'upstream/master' into haskell-bash-completion-2 2018-11-08 11:28:53 -05:00
Robert Hensing
2a1c0dde8f haskellPackages: Add shell completions + improve docs
This adds the remaining parts of #42657 on top of #49477, renames the
function to a better name, and improves the docs
2018-11-08 11:28:11 -05:00
John Ericson
26fa9d2b51
Merge pull request #49477 from obsidiansystems/haskell-shell-completions
haskell-lib: Factor out shell completion scripts helper
2018-10-30 15:25:03 -04:00
John Ericson
c34f5176f1 haskell-lib: Factor out shell completion scripts helper 2018-10-30 14:49:58 -04:00
Will Fancher
bc56701020 haskell.lib.buildFromSdist: Allow overrideCabal [Fixes #45018] 2018-10-19 04:49:56 -04:00
Silvan Mosberger
7c5c3fceff haskell.lib.getBuildInputs: Use generic builder passthru to implement 2018-10-03 18:00:29 +02:00
Peter Simons
b35b8baddd
Merge pull request #45348 from shlevy/shellFor-all-build-inputs
haskellPackages.shellFor: fix after recent getHaskellBuildInputs fix.
2018-09-02 16:11:43 +02:00
Bas van Dijk
97a4d29545 haskell: disable library profiling for static executables
Haskell packages overridden with justStaticExecutables
(like cabal-install, stack, pandoc, darcs, etc.) don't provide
libraries in the end result so it's futile to build them with library
profiling enabled because it will just take extra time.
2018-08-27 14:31:34 +02:00
John Ericson
60fc04c34b haskell lib: Add appendConfigureFlags
For consistency and completeness; other helpers have these "plural"
variants too.
2018-08-20 17:50:23 -04:00
Shea Levy
b00b2363b3
haskellPackages.shellFor: fix after recent getHaskellBuildInputs fix.
Fixes #45318
2018-08-19 15:17:35 -04:00
Shea Levy
7372d3bf31
haskell.lib.getHaskellBuildInputs: Actually get the haskell build inputs.
5523ec8f3c accidentally dropped the attribute lookup.
2018-08-14 17:05:36 -04:00
Gabriel Gonzalez
05ca67107a
Fix type signature 2018-07-07 15:23:03 -07:00
Robert Hensing
637fcd4c5b pkgs.haskell.lib.packagesFromDirectory: forward compatibility
Add `...` for less painful downgrades in the future
2018-07-06 13:03:56 +02:00
Gabriel Gonzalez
2c55c157bd Rename readDirectory to packagesFromDirectory
... as suggested by @roberth
2018-07-04 08:22:20 -07:00
Gabriel Gonzalez
8dae83157b Change readDirectory to accept an attribute set
... as suggested by @roberth
2018-07-03 17:44:19 -07:00
Gabriel Gonzalez
e57fd11bb4 Add pkgs.haskell.lib.readDirectory utility
This adds a `readDirectory` utility that can be used to "slurp" a directory
full of `cabal2nix`-generated files and transform them into a Haskell package
override set.  The main use of this is so that users don't have to write:

```
{ overrides = self: super: {
    foo = self.callPackage ./path/to/foo.nix { };

    bar = self.callPackage ./path/to/bar.nix { };

    ...
  };
}
```

Instead, they can write:

```
{ overrides = pkgs.haskell.lib.readDirectory ./path/to;
}
```

This is a an alternative to `packageSourceOverrides` which primarily addresses
the following use cases:

* The desired package is not yet available in `all-cabal-hashes` (perhaps the
  user is pinned to an older revision of `nixpkgs`)
* The default `cabal2nix` invocation used by `packageSourceOverrides`
  does not use the desired `cabal2nix` flags
* The user wants to avoid the use of import-from-derivation
2018-07-03 09:25:15 -07:00
Moritz Angermann
87afa66a63 haskell infra: Adds buildFlags logic 2018-05-23 10:27:42 -04:00
Peter Simons
5db3a9df5e
Revert "ghc, haskell infra: #40642 direct to master" 2018-05-23 09:36:16 +02:00
Peter Simons
0e35858252
Merge pull request #40929 from obsidiansystems/cross-ghc-for-master
ghc, haskell infra: #40642 direct to master
2018-05-22 20:37:45 +02:00
Moritz Angermann
82a847a04b haskell infra: Adds buildFlags logic 2018-05-21 15:11:11 -04:00
Will Fancher
5523ec8f3c Make getHaskellBuildInputs / shellFor work with overrideCabal 2018-05-17 20:35:53 -04:00
Ben Gamari
d79fd43c9d haskell.lib: Add {en,dis}ableExecutableProfiling transformer
We already have {en,dis}ableLibraryProfiling and the builder already
accepts the executable profiling attribute; let's make it easy to use.
2018-03-29 13:33:48 -04:00
Matthew Bauer
970f2b5063 Revert "justStaticExecutables: enable -dead_strip on mac to shrink closure"
This reverts commit 24d313e203.

Fixes #37750
2018-03-26 20:57:32 -05:00
Peter Simons
a8d9a94574 haskell.lib.markBroken: explicitly disable Hydra builds
Recent changes [1] allow Hydra to build packages that are marked broken. To
avoid plenty of evaluation errors on Hydra, explicitly disable Hydra builds of
broken packages.

[1] https://github.com/NixOS/nixpkgs/issues/7541#issuecomment-357541243
2018-01-20 21:40:38 +01:00
Will Fancher
9047a7dd33 Move packageSourceOverrides to haskellLib 2018-01-18 16:42:56 -05:00
Robert Hensing
f40ecb29aa Add documentation for haskell-modules/lib.nix 2018-01-12 10:48:03 +01:00
Shea Levy
3a763b9196
haskellLib: Add shellAware function 2018-01-10 12:08:36 -05:00
Shea Levy
1ee61d8f23
Revert "Revert "hslib: Function to extract the haskell build inputs of a package.""
Trying again, without changing the generic builder.

This reverts commit 65138e8a41.
2017-12-29 14:37:24 -05:00
Peter Simons
65138e8a41 Revert "hslib: Function to extract the haskell build inputs of a package."
This reverts commit d545ef3fa1. Please don't
commit substantial changes to the generic Haskell builder without giving me a
chance to review them.
2017-12-28 19:23:41 +01:00
Shea Levy
d545ef3fa1
hslib: Function to extract the haskell build inputs of a package.
This works by extracting out some logic from generic-builder.nix to
make it possible to get at the relevant information by overriding
mkDerivation for the haskell package.
2017-12-23 11:44:18 -05:00
Peter Simons
8d8061ec20
Revert "Revive multiple outputs for Haskell packages." 2017-12-05 09:36:08 +01:00
Nicholas Clarke
d90165c7db Revert "Revert "Merge pull request #27209 from nc6/nc/haskell-multiple-out""
This reverts commit 89f5d52cf4.
2017-11-27 16:05:22 +00:00
Peter Simons
2439a83072 haskell.lib: strip trailing whitespace 2017-09-19 15:55:50 +02:00
Peter Simons
a8b69958cf haskell.lib: add doBenchmark helper function 2017-09-19 15:55:16 +02:00
Bas van Dijk
b4ea459eab haskell: introduce failOnAllWarnings
Applying `haskell.lib.failOnAllWarnings` to a Haskell package enables the
`-Wall` and `-Werror` GHC options to turn all warnings into build failures.
2017-09-10 13:09:52 +02:00
Peter Simons
89f5d52cf4 Revert "Merge pull request #27209 from nc6/nc/haskell-multiple-out"
This reverts commit dfb0f25484, reversing
changes made to 7f8ff02437. These changes broke
the ghcWithPackages wrapper:

    nix-shell -p "haskellPackages.ghcWithPackages (ps: [ps.mtl])" --run "ghc-pkg list mtl"
    /nix/store/szz84j5k1dy3jdashis6ws28d8l8zxxb-ghc-8.0.2-with-packages/lib/ghc-8.0.2/package.conf.d
        (no packages)
2017-09-06 10:19:18 +02:00
Nicholas Clarke
a1d78fa5bc Don't build separate bin output for alex.
It has files in /usr/share which reference the bin output.
2017-09-04 12:35:57 +01:00