Commit Graph

30 Commits

Author SHA1 Message Date
Moritz Angermann
dfefba5be7
Call cabal project to nix (now with hackage-truncate) (#135)
* This adds more logic for the cabalProjectToNix idf

That is, something like this:

```
nix-build --expr 'with import ./. {}; callCabalProjectToNix { index-state = "2019-04-30T00:00:00Z"; src = /some/path; }'
```

should produce something that can be build with mkCabalProjectPkgSet.

* Make sure the hackageTarball's store path doesn't change

previously the fetchurl would produce a different store path each
and every time as hackage's index is a moving target.  With this
impurity setup, we can ignore this.

* Fix test

* Proper name

* Re-enable test

* Allow to parameterize over the `system` for the test default.nix

* Copy instead of link for ifds.

This makes me really sad.
2019-05-21 20:05:03 +08:00
Moritz Angermann
52280f2324
[ifd] cabalProjectToNix (#122) 2019-05-18 22:00:28 +08:00
Edward Amsden
390771849a Add callStackToNix function (#116)
Allow building a stack project directly without needing to generate the scaffolding.

```nix
{ mkStackPkgSet, callStackToNix, ... }:
let
  pkgSet = mkStackPkgSet {
    stack-pkgs = callStackToNix { src = ./.; };
    pkg-def-extras = [];
    modules = [];
  };
in pkgSet.config.hsPkgs
```
2019-05-17 15:49:40 +08:00
Luke Clifton
5a1201915a Don't worry if there are no patches 2019-05-10 16:30:09 +08:00
Rodney Lorrimar
adf6b4385b
Put back src for nix-tools 2019-04-02 20:18:38 +10:00
Rodney Lorrimar
4478c67f3a
Bring nix-tools build into haskell.nix
I plan to delete the auto-generated nix expressions in nix-tools so
that it is a pure cabal project.
2019-04-02 12:34:08 +10:00
Rodney Lorrimar
ebb979fa07
Pin nixpkgs to latest nixos-19.03 2019-04-02 12:30:23 +10:00
Rodney Lorrimar
b12e3b304e
Nightly: Also update hackage-src.json and stackage-src.json 2019-04-02 11:30:32 +10:00
Moritz Angermann
0de60e8b0c
reinstallable lib:ghc and option inheritance (#88)
- reinstallable lib:ghc
- adds global options and option inheritance.
2019-03-18 21:20:33 +08:00
Moritz Angermann
8ee6fcfba7
Rename pkg-def-overlays to pkg-def-extras (#79)
* Rename pkg-def-overlays to pkg-def-extras

Fixes #75
2019-03-15 11:10:57 +08:00
Moritz Angermann
e122281e02
Adds mkCabalProjectPkgsSet 2019-02-15 15:40:14 +08:00
Rodney Lorrimar
d1ed4f2f04
Allow users to override hackage.nix and stackage.nix revision pins
This would be useful if the project needs to stay with an old version
of haskell.nix but use recent version of hackage.nix/stackage.nix.

Normally latest haskell.nix and latest hackage/stackage are best.
2019-02-13 15:08:49 +10:00
Rodney Lorrimar
a6d28bacb2
Add a script for updating the Stackage rev 2019-02-13 14:51:10 +10:00
Rodney Lorrimar
12076ea8f0
Add a script for updating the Hackage rev 2019-02-13 14:51:10 +10:00
Rodney Lorrimar
72cc37dcc3
Add nix-tools 2019-02-13 14:51:10 +10:00
Rodney Lorrimar
bd603e0b51
Provide hackage and stackage from haskell.nix
Providing hackage and stackage here simplifies usage of the new
Haskell Infrastructure.

With this change, the user doesn't need to specify revisions of the
external repos, or update them.

Basically, with hackage.nix and stackage.nix, the latest version is
always best, because snapshots and package versions are added on
top. So there is no need for users to choose a revision.

Also add mkStackPkgSet which is a shortcut for building stack
projects.
2019-02-13 14:51:10 +10:00
Rodney Lorrimar
e533951448
Fix broken compat attribute
I have a suspicion that the compat stuff is bitrotting because it's
not being used and there are no tests.

Relates to #24
2019-02-12 12:55:10 +10:00
Moritz Angermann
26e147db4a Drop compat
Fixes #24
2019-01-27 11:31:49 +08:00
Moritz Angermann
84bcfd77a3
better patches 2019-01-18 14:40:05 +08:00
Moritz Angermann
e1355cac7d
add ghc patches :( 2019-01-18 10:48:22 +08:00
Moritz Angermann
5f56d93147
Revert "Drop def-pkg-overlay"
We still needthis, as the module system is not very well suited
for package overrides.

This reverts commit 28a9c6f352.
2018-11-29 15:35:10 +08:00
Moritz Angermann
5a750e0890
force drop boot-pkgs from plan-defs 2018-11-19 12:57:08 +08:00
Moritz Angermann
28a9c6f352
Drop def-pkg-overlay 2018-11-09 16:02:18 +08:00
Moritz Angermann
f7c010387b This adds logic to better support stackage (stack-to-nix)
When using stackage as a baseline via stack-to-nix, we usually
assume stackage to be the base, and some augemnetation via
extra-dependencies and packages in the `stack.yaml` file.

To achive this we extend the package-set builder by allowing
a list of additional sets of package to speicied. These are then
folded onto the base package set.

As stackage seems to define the `rts` package as well, we force
`rts-1.0` to be null ontop of our hackage database.  As of
today (November 7th, 2018) there is no way of building the rts outside
of GHC; and as such no way to ever get the rts package onto hackage.

Once this package is *on* hackage, we can drop the hack.
2018-11-08 15:30:54 +08:00
Will Fancher
fd39d56a5b Allow modules from mkNewPkgSet 2018-11-01 13:33:41 +08:00
Will Fancher
d18913eaa6 Use NixOS module system 2018-11-01 13:33:41 +08:00
Moritz Angermann
f08973b609 make it work 2018-10-30 15:32:31 +08:00
Moritz Angermann
fe5c13d8b7
move package-set.nix from stackage.nix into haskell.nix 2018-10-11 14:11:45 +08:00
Moritz Angermann
3a6d9e7a6b
thread hackage 2018-07-23 20:30:21 +08:00
Moritz Angermann
dd47498850
Add default.nix 2018-04-20 18:08:36 +02:00