3
0
Fork 0
forked from mirrors/nixpkgs
Commit graph

56 commits

Author SHA1 Message Date
Bas van Dijk 7b49b870cb
haskell: have a dedicated file for non Hackage packages
We had a few "overrides" in configuration-common.nix that were really
extensions. They introduced packages that weren't in hackage-packages.nix.

The advantage of having a dedicated file for these packages is that we can still
place Nix-specific overrides to these packages in configuration-nix.nix. We
weren't able do this before because configuration-nix.nix extended only the
packages from hackage-packages.nix.
2018-10-12 14:12:29 +02:00
volth 6d2857a311 [bot] treewide: remove unused 'inherit' in let blocks 2018-07-20 19:38:19 +00:00
Peter Simons 6e07a3a19a
Revert "haskell generic-builder: Use strictDeps always" 2018-07-04 13:18:21 +02:00
John Ericson d2f6f527f4 alex: which needs to be a tool dep so it's a nativeBuildInput
Also pull it from `buildPackages`, as that is where nativeBuildInputs
come from.
2018-07-02 15:52:22 -04:00
Will Fancher 25856e37e3 haskellPackages: Fix overriding all-cabal-hashes 2018-03-25 20:39:38 -04:00
John Ericson 81553124cf haskell infra: nativeGhc != ghc.bootPkgs.ghc
There's no reason to wait for non-binary native to *build* cross ghc,
but we want a nix-built GHC for Setup.hs or things won't work.
2018-01-21 23:31:04 -05:00
Shea Levy 961907de47
Add haskell-ide-engine 2017-12-29 14:41:15 -05:00
Shea Levy 1a1ad1a17d Revert "Merge branch 'improved-make-overridable' of git://github.com/ElvishJerricco/nixpkgs"
This reverts commit c3af1210b4, reversing
changes made to 49f175cd0c.
2017-09-29 09:11:26 -04:00
Will Fancher 4d860389d8 Merge branch 'master' into improved-make-overridable 2017-08-26 11:39:13 -04:00
John Ericson 74f5fe5068 haskell infra: Misc cleanups
- The haskell lib is very close to not relying on Nixpkgs. I think
   this is good---simpler to think about and matches Nixpkgs's lib.

 - The haskell lib is only imported once

 - stdenv is exposed more shallowly so it can be overriden more easily.
   I'll eventually use this on Darwin to avoid the Sierra shared
   library problems (unless changes are to be made system-wide).

Closes https://github.com/NixOS/nixpkgs/pull/27840.
2017-08-03 13:12:01 +02:00
Will Fancher 05f9db601a Added self views of the interface in makeExtensibleWithInterface
Fixing the `overrideScope` in `haskellpackages`.
2017-07-14 06:43:33 -04:00
Will Fancher e11dbc3710 Update haskellPackages to use new features of makeOverridable
Instead of manually using `makeExtensible`, which broke `override`.

Fixes #26561
2017-07-12 18:36:18 -04:00
Domen Kožar bb9e23837a
haskellPackages: make configuration-{nix,common}.nix configurable
The motivation is to be able to get rid of common configuration
when initial packages differs since common configuration assumes
a very specific version set.

cc @jmitchell @peti
2017-06-22 13:25:53 +02:00
Shea Levy 01e047d088 Add haskellPackages.developPackage for local development default.nixes 2017-06-10 20:13:21 -04:00
Jacob Mitchell ed6ecacf64 haskell-modules: refactor package set
This change is effectively a no-op to nixpkgs. However, it gives users
the flexibility to create and maintain their own package sets per
project, while benefiting from nix's Haskell configurations.

I would make immediate use of this change in stack2nix, a project that
generates nix expressions for all the dependencies of a given Haskell
project. @domenkozar is familiar with the motivations and helped
refine this change
2017-05-30 11:27:32 -07:00
Benno Fünfstück 5f33eb493f haskell-packages: factor package set construction in new file
Closes https://github.com/NixOS/nixpkgs/pull/24850.
2017-04-21 16:25:53 +02:00
Shea Levy 1feca4cae3 haskellPackages: Export haskellSrc2nix and hackage2nix
Allows using a different haskell package set to generate the nix
expressions (during eval time) than the one used to actually build the
package (at build time).
2017-04-03 08:13:07 -04:00
Leon Isenberg 2553ceb982 haskell: use GHCJS to build Setup.hs for GHCJS packages
Closes https://github.com/NixOS/nixpkgs/pull/23614.
2017-03-29 20:30:28 +02:00
Peter Simons 50cce50143 callCabal2nix: Revert "Don't rebuild unchanged cabal file"
This reverts commit 24b47526ce since it broke
callCabal2nix, apparently. See https://github.com/NixOS/nixpkgs/issues/24245
for details.
2017-03-27 09:00:06 +02:00
Will Fancher 934c8c7a93 callCabal2nix: Fixed indentation 2017-03-17 04:32:34 -04:00
Will Fancher 24b47526ce callCabal2nix: Don't rebuild unchanged cabal file
It can be quite annoying that callCabal2nix will build a new derivation
if anything in the source has changed, even if the cabal file hasn't.
2017-03-13 22:20:56 -04:00
Shea Levy ef5986e03c haskellSrc2nix: Change sha arg when sha256 is null.
Otherwise it just fails due to no nix-prefetch-url
2017-03-04 13:18:14 -05:00
Peter Simons e1908d4e21 Merge branch 'master' into haskell-extensible 2017-02-28 09:14:50 +01:00
Charles Strahan 65a228a2b1
haskellPackages: use makeExtensible 2017-02-25 17:38:38 -05:00
Sukant Hajra 98617ccb99 Haskell infrastructure: fix #9871 (overrideCabal)
As per the recommendation by @Mathnerd314, this change seems to work
with the testing I did.

It makes sense to me why it works, but I think it's in an important
enough place that someone with much deeper knowledge of Haskell
infrastructure in Nixpkgs should give it a really heavy review.

I also consolidated all the overrideCabal definitions (there were two)
into a single definition in haskell-modules/lib.nix.
2017-02-09 23:07:40 -06:00
Benno Fünfstück 57507f08e8 haskell-modules: split off nix-specific overrides and common ones
This allows the nix-specific overrides to be reused for other purposes,
with different haskell package sets, etc.
2017-02-07 15:13:23 +01:00
Peter Simons 1f18f65650 callCabal2nix: take "name" parameter as a function argument
The callCabal2nix function cannot reliably determine the appropriate "name" for
the package it's processing. Attempts to derive this information have led to
plenty of evaluation errors, and so I'd like to go for the obvious and reliable
solution now and let the caller specify that bit of information.

Here is an example that demonstrates how to use callCabal2nix.

    let
      pkgs = import <nixpkgs> {};
      src = pkgs.fetchFromGitHub {
        owner = "gtk2hs";
        repo = "gtk2hs";
        rev = "eee61d84edf1dd44f8d380d7d7cae2405de50124";
        sha256 = "12i53grimni0dyjqjydl120z5amcn668w4pfhl8dxscjh4a0l5nb";
      };
    in
      pkgs.haskellPackages.callCabal2nix "gtkhs-tools" "${src}/tools" {}
2017-02-05 21:18:27 +01:00
3noch 8454a9e753
haskellPackages.callCabal2nix: provide fallback name if source is not package 2017-02-04 02:01:10 -05:00
3noch 05ee54782e Add callCabal2nix to haskell packages
Closes https://github.com/NixOS/nixpkgs/pull/22191.
2017-02-01 15:04:48 +01:00
Shea Levy 4687b6142c haskellPackages.mkDerivation: Use native jailbreak-cabal when cross-compiling 2017-01-11 13:25:50 -05:00
Peter Simons 0018599a26 haskell-hoogle: use latest version by default 2016-11-03 17:37:19 +01:00
Peter Simons fac1168816 callHackage: make 'all-cabal-hashes' repository overridable
This commit changes callHackage to use a deterministic version of the Hackage
checkout from https://github.com/commercialhaskell/all-cabal-hashes by default.
This means that packages uploaded to Hackage after today will be available to
callHackage only after "pkgs/data/misc/hackage/default.nix" has been updated.

People who want the previous behavior where we always had the latest version of
Hackage available -- at the cost of frequent downloads from Github --, can add
the following override to their "~/.nixpkgs/config.nix" file:

  {
    packageOverrides = super: {
      all-cabal-hashes = builtins.fetchTarball "https://github.com/commercialhaskell/all-cabal-hashes/archive/hackage.tar.gz";
    };
  }
2016-11-01 18:35:19 +01:00
Peter Simons 2a2a3c796a callHackage: ensure we're always using the latest available Hackage database 2016-10-05 19:05:50 +02:00
Michael Alan Dorman c3974031dd For the moment, we need a specific reference to 5.0.4
This will need to change if we stop arbitrarily tying "hoogle" to be
5.0.1.
2016-09-20 12:04:47 +02:00
Kirill Boltaev bccd75094f treewide: explicitly specify gtk and related package versions 2016-09-12 18:26:06 +03:00
Profpatsch f9f680013c haskell: fix ghcWithHoogle to version 4
Version 5 does not yet work with the ghcWithHoogle infrastructure. This
fixes Hoogle to version 4 as a temporary measure.
2016-09-03 18:18:53 +02:00
Peter Simons 3bfe30a042 haskell: update our Hackage database to the latest version 2016-07-16 13:34:06 +02:00
Peter Simons 8d86c8274f callHackage: generate expressions for the appropriate target system and compiler 2016-06-13 23:09:56 +02:00
Peter Simons 2862d272a6 haskell: add support for all of Hackage
The function "callHackage <name> <version>" generates build instructions for
the requested library version on-the-fly. All of Hackage is available. Note:
this code is brand-new, experimental, and it might change in the future. Don't
base production code on this feature yet.

Example usage:

  $ nix-shell -p 'haskellPackages.callHackage "cpphs" "1.19.3" {}' --run "cpphs --version"
  cpphs 1.19.3

  $ nix-shell -p 'haskellPackages.ghcWithPackages (self: [(self.callHackage "hsdns" "1.6.1" {})])' --run "ghc-pkg list hsdns"
  /nix/store/p6r81k2vb2pzy4wcvri6z9m492i0hg63-ghc-8.0.1/lib/ghc-8.0.1/package.conf.d
      hsdns-1.6.1
2016-06-12 08:37:06 +02:00
Peter Simons 69add60b5c pkgs/development/haskell-modules: simplify use of standard fix' and extends functions
My original version of 'extend' had its arguments flipped compared to the one
we now have in stdenv.lib.
2015-11-25 11:30:43 +01:00
Peter Simons 405fda497a lib: document fix and add fix', extends functions
These functions used to live in pkgs/development/haskell-modules/default.nix,
but they are generic, really, and should be easily accessible to everyone.
2015-11-24 12:48:03 +01:00
Vladimír Čunát 76ef7a93e3 Merge: xlibs and x11 attribute cleanup
Frequently using multiple *almost* identical attributes is bad.
2015-09-23 10:42:34 +02:00
Peter Simons 2aaa587b71 hackage-packages.nix: switch our default package set to Stackage Nightly
This update was generated by hackage2nix v20150903-82-g351b6f8 using the following inputs:

  - Hackage: af161fdf17
  - LTS Haskell: da73308b63
  - Stackage Nightly: 1994a4f865
2015-09-19 08:20:40 +02:00
Vladimír Čunát 88c9f8b574 xlibs: replace occurrences by xorg
This seems to have been confusing people, using both xlibs and xorg, etc.
- Avoided renaming local (and different) xlibs binding in gcc*.
- Fixed cases where both xorg and xlibs were used.
Hopefully everything still works as before.
2015-09-15 12:54:34 +02:00
Jan Malakhovski d8487667cf haskell-packages: bring hoogle to the masses by imlementing ghcWithHoogle
Replace `ghcWithPackages` to `ghcWithHoogle` in your config and enjoy.
2015-08-18 19:56:16 +00:00
obadz 23f5a23ec7 haskell-modules/default.nix: this line of code is invalid but wasn't causing harm thanks to non-strictness 2015-08-06 11:09:47 +01:00
Charles Strahan 3859f7bdab haskell-ng: hoogleLocal support 2015-06-11 20:25:31 -04:00
Peter Simons b9152b89c2 haskell-ng: reduce memory requirements of overrideScope by improved sharing
With this patch applied, "nix-env -qaP -A haskellngPackages" succeeds fine
without running out of memory. Thanks to @bennofs for catching this in
bbb422af92 (commitcomment-11235596).
2015-05-18 18:04:36 +02:00
Peter Simons 807146cf75 haskell-ng: make overrideScope respect the default lookup scope
Build environments created by overrideScope lost the ability to find
packages outside of the Haskell package set without help. This patch
remedies this issue.

Fixes https://github.com/NixOS/nixpkgs/issues/6192.
2015-05-18 18:04:36 +02:00
Peter Simons 7299118724 Remove obsolete Haskell attribute name compatibility layer. 2015-05-04 12:27:03 +02:00