@@ -1,17 +0,0 @@
4− - mkdir -p ~/.config/nixpkgs/overlays
5− - ln -s "$(pwd)/default.nix" ~/.config/nixpkgs/overlays/stackage-overlay.nix
8− - nix-build nixpkgs.nix -A stackage2nix --dry-run
12− - env: NIXPKGS=pinned
13− - env: NIXPKGS=unstable
14− before_script: nix-env -i stackage2nix --dry-run
16− - env: NIXPKGS=unstable
@@ -1,24 +1,21 @@
1−# nixpkgs-stackage
1+# Nix
3−[](https://travis-ci.org/typeable/nixpkgs-stackage)
3+Nixpgs overlay
5−Nixpkgs overlay adding Stackage Haskell packages at the `pkgs.haskell.packages.stackage`
5+## Packages
7−# Install
7+- Stackage LTS releases
9−Symlink the current `./default.nix` into the `~/.config/nixpkgs/overlays` folder.
12+Symlink the current `./haskell-overlay.nix` into the `~/.config/nixpkgs/overlays` folder.
12cd ~/.config/nixpkgs/overlays
15cd ~/.config/nixpkgs/overlays
13−ln -s /path/to/default.nix stackage-overlay.nix
16+ln -s /path/to/haskell-overlay.nix typeable-overlay.nix
18−- Stackage LTS releases at `pkgs.haskell.packages.stackage`
19−- [stackage2nix][] at `pkgs`
20−- build utils at `pkgs.haskell.packages.stackage.lib`
22## Haskell overlay
19## Haskell overlay
24List LTS packages:
21List LTS packages:
@@ -35,39 +32,10 @@ $ nix-env -i stackage2nix
36## Update script
33## Update script
38−Update script will add missing lts releases to `stackage` directory:
35+Update script will add missing lts releases to `stackage` directory
41−./update.sh
38+nix-shell update.nix --pure
46−Build derivation for `stackage2nix` from `stackage2nix.json` source.
50− nixpkgs = import <nixpkgs> {
51− overlays = [ (import ../default.nix) ];
53− inherit (nixpkgs) pkgs lib;
55− stackage2nixSrc = pkgs.fetchFromGitHub (lib.importJSON ./stackage2nix.json);
57− stackage = nixpkgs.haskell.packages.stackage.lib.callStackage2nix "stackage2nix" stackage2nixSrc {
67−nix-build example.nix -A stackage2nix
70−See [examples](./examples) directory for more
73[stackage2nix]: https://github.com/typeable/stackage2nix
41[stackage2nix]: https://github.com/typeable/stackage2nix
cache-version.txtdeleted−1
@@ -1,70 +1,7 @@
1−self: super:
1+# Nixpkgs overlay which aggregates overlays for tools and products
3−let
3+{ nixpkgs ? import <nixpkgs> {} }:
5− # from pkgs/stdenv/generic/make-derivation.nix
5+with nixpkgs.lib;
6− # This parameter is sometimes a string, sometimes null, and sometimes a list, yuck
6+let haskellOverlay = import ./haskell-overlay.nix;
7− normalizedConfigureFlags = configureFlags: let inherit (super) lib; in
7+in fix (extends haskellOverlay (_: nixpkgs))
8− (/**/ if lib.isString configureFlags then [configureFlags]
9− else if configureFlags == null then []
10− else configureFlags);
12− stackage2nixPackages = import ./stackage2nix/stackage-packages.nix { nixpkgs = self; };
15− haskell = super.haskell // {
16− packages = super.haskell.packages // {
17− stackage = super.callPackage ./stackage {} // {
18− lib = super.callPackage ./lib.nix {};
23− stackage2nix = self.callPackage ./stackage2nix {
24− drv = super.haskell.lib.disableSharedExecutables stackage2nixPackages.stackage2nix;
27− stackage2nixWrapper = import ./stackage2nix/impure.nix {
28− cacheVersion = builtins.readFile ./cache-version.txt;
32− stackage2nix-static = import ./stackage2nix/impure.nix {
35− stackagePackages = import ./stackage2nix/stackage-packages.nix { nixpkgs = self; };
36− in self.haskell.lib.overrideCabal stackagePackages.stackage2nix (drv: {
37− enableSharedExecutables = false;
38− enableSharedLibraries = false;
40− "--ghc-option=-optl=-static"
41− "--ghc-option=-optl=-L${self.glibc.static}/lib"
42− "--ghc-option=-optl=-L${self.gmp.override { withStatic = true; }}/lib"
43− "--ghc-option=-optl=-L${self.icu-static.static}/lib"
44− "--ghc-option=-optl=-L${self.openssl-static.static}/lib"
45− "--ghc-option=-optl=-L${self.zlib.static}/lib"
48− cacheVersion = builtins.readFile ./cache-version.txt;
52− icu-static = super.icu.overrideAttrs (attrs: {
53− dontDisableStatic = true;
54− configureFlags = normalizedConfigureFlags attrs.configureFlags ++ [ "--enable-static" ];
55− outputs = attrs.outputs ++ [ "static" ];
57− moveToOutput "lib/*.a" "$static"
58− '' + (if attrs ? postInstall then attrs.postInstall else "");
61− openssl-static = super.openssl.overrideAttrs (attrs: {
62− dontDisableStatic = true;
63− outputs = attrs.outputs ++ [ "static" ];
65− mkdir -p $static/lib;
66− cp -v *.a $static/lib;
67− '' + (if attrs ? postInstall then attrs.postInstall else "");
examples/example-override-pinned.nixdeleted−16
@@ -1,16 +0,0 @@
1−# Stackage packages with Nixpkgs pinned to specific revision
4− nixpkgs = import ./nixpkgs-pinned.nix {};
5− inherit (nixpkgs) pkgs lib haskell;
7− stackage2nixSrc = pkgs.fetchFromGitHub (lib.importJSON ./stackage2nix.json);
9− stackagePackages = haskell.packages.stackage.lib.callStackage2nix "stackage2nix" stackage2nixSrc { inherit nixpkgs; };
10− stackage = stackagePackages.override {
11− overrides = self: super: {
12− stackage2nix = haskell.lib.disableSharedExecutables super.stackage2nix;
examples/example-override.nixdeleted−20
@@ -1,20 +0,0 @@
1−# Stackage packages accept `overrides` like Nixpkgs `haskellPackages`
4− _pkgs = import <nixpkgs> {};
5− _stackageOverlay = _pkgs.fetchFromGitHub (_pkgs.lib.importJSON ./nixpkgs-stackage.json);
6− nixpkgs = import <nixpkgs> {
7− overlays = [ (import _stackageOverlay) ];
9− inherit (nixpkgs) pkgs lib haskell;
11− stackage2nixSrc = pkgs.fetchFromGitHub (lib.importJSON ./stackage2nix.json);
13− stackagePackages = haskell.packages.stackage.lib.callStackage2nix "stackage2nix" stackage2nixSrc { inherit nixpkgs; };
14− stackage = stackagePackages.override {
15− overrides = self: super: {
16− stackage2nix = haskell.lib.disableSharedExecutables super.stackage2nix;
examples/example.nixdeleted−16
@@ -1,16 +0,0 @@
1−# Produces Stackage packages set with `stackage2nix` package
2−# from `${stackage2nixSrc}/stack.yaml`
4−# nix-build ./example.nix -A stackage2nix
7− nixpkgs = import <nixpkgs> {
8− overlays = [ (import ../default.nix) ];
10− inherit (nixpkgs) pkgs lib;
12− stackage2nixSrc = pkgs.fetchFromGitHub (lib.importJSON ./stackage2nix.json);
14− stackage = nixpkgs.haskell.packages.stackage.lib.callStackage2nix "stackage2nix" stackage2nixSrc;
examples/nixpkgs-pinned.nixdeleted−15
@@ -1,15 +0,0 @@
1−# Nixpkgs with Stackage overlay pinned to specific version set in `nixpkgs.json`
8− _pkgs = import <nixpkgs> {};
9− _pkgsPath = _pkgs.fetchFromGitHub (_pkgs.lib.importJSON ../nixpkgs.json);
10− _stackageOverlayLocal = ../.;
13− overlays = [ (import _stackageOverlayLocal) ] ++ overlays;
14− config = config // { allowUnfree = true; };
15− } // (if system != null then { inherit system; } else { }))
examples/stackage2nix.jsondeleted−6
@@ -1,6 +0,0 @@
3− "repo": "stackage2nix",
4− "rev": "8d6e70044a4bafa0f8d5bdc011ac00634549a13b",
5− "sha256": "1lcs8ii0nqlyg1lj50zjabw8z4crkk59dpfyykpxraa9whkklg4d"
haskell-overlay.nixnew file+11
@@ -0,0 +1,11 @@
4+ haskell = super.haskell // {
5+ packages = super.haskell.packages // {
6+ stackage = import ./stackage { inherit self; };
10+ stackage2nix = import ./stackage2nix { nixpkgs = self; };
@@ -1,67 +0,0 @@
1−{ stdenv, lib, cacert, glibcLocales, stackage2nix, stackage2nixWrapper }:
5− stackage2nixGeneric = { drv, pname, installPhase, name, src }:
8− name = "${pname}-${name}";
10− phases = [ "installPhase" ];
11− buildInputs = [ drv ];
12− preferLocalBuild = true;
14− SSL_CERT_FILE="${cacert}/etc/ssl/certs/ca-bundle.crt";
15− LANG = "en_US.UTF-8";
16− LOCALE_ARCHIVE = lib.optionalString stdenv.isLinux "${glibcLocales}/lib/locale/locale-archive";
18− inherit installPhase;
21− stackage2nixWrapperSrc = { name, src }: stackage2nixGeneric {
22− drv = stackage2nixWrapper;
23− pname = "stackage2nixWrapper";
28− stackage2nix "${src}"
34− stackage2nixSrc = { name, src }: stackage2nixGeneric {
36− pname = "stackage2nix";
41− stackage2nix "${src}"
47− stackage2nixSrcArgs = { name, src, stackage-lts, all-cabal-hashes, hackage-db }: stackage2nixGeneric {
49− pname = "stackage2nixArgs";
54− stackage2nix --all-cabal-hashes ${all-cabal-hashes} --lts-haskell ${stackage-lts} --hackage-db ${hackage-db}
60− callStackage2nix = name: src: import (stackage2nixSrc { inherit name src; });
62− callStackage2nixWrapper = name: src: import (stackage2nixWrapperSrc { inherit name src; });
64− callStackage2nixArgs = name: src: stackage-lts: all-cabal-hashes: hackage-db:
65− import (stackage2nixSrcArgs { inherit name src stackage-lts all-cabal-hashes hackage-db; });
nix-build-release.shdeleted−10
@@ -1,10 +0,0 @@
4−# nix-build-release.sh -A lts-100.x86_64-linux --dry-run
7−NIXPKGS_ALLOW_BROKEN=1 exec nix-build release.nix \
8− --option use-binary-caches false \
@@ -1,6 +0,0 @@
3− "repo": "nixpkgs-channels",
4− "rev": "d6c6c7fcec6dbd2b8ab14f0b35d56c7733872baa",
5− "sha256": "1bq59575b58lmh5w8bh7pwp17c3p2nm651bz1i3q224c4zsj9294"
@@ -1,15 +0,0 @@
1−# Nixpkgs with Stackage overlay pinned to `nixpkgs.json` revision
8− _pkgs = import <nixpkgs> {};
9− _pkgsPath = if pkgsPath != null
11− else _pkgs.fetchFromGitHub (_pkgs.lib.importJSON ./nixpkgs.json);
14− overlays = [ (import ./default.nix) ] ++ overlays;
15− } // (if system != null then { inherit system; } else {}))
@@ -1,49 +0,0 @@
1−{ supportedSystems ? [ "x86_64-linux" "i686-linux" ]
2−, supportedReleases ? null
4−, pkgs ? import <nixpkgs> {}
10− release = import (pkgs.path + "/pkgs/top-level/release-lib.nix") {
11− inherit supportedSystems;
12− nixpkgsArgs = { overlays = [ (import ./default.nix) ]; };
15− # supportedStackageReleases :: [StackageVersion]
16− supportedStackageReleases =
17− if supportedReleases == null
20− (map (builtins.replaceStrings ["."] [""])
21− (builtins.filter (x: x != "")
22− (lib.splitString "\n"
23− (builtins.readFile ./supported-stackage-releases.txt))))
27− # hasSupportedSystem :: System -> Derivation -> Bool
28− hasSupportedSystem = system: pkg:
29− # Test `isAttrs pkg` to ensure that pkg is a derivation
30− lib.isAttrs pkg && lib.elem system pkg.meta.platforms;
32− # genJobSetFiltered :: System -> StackageVersion -> AttrSet
33− genJobSetFiltered = system: stackage:
35− (_: pkg: hasSupportedSystem system pkg)
36− (release.pkgsFor system).haskell.packages.stackage."${stackage}";
38− # genJobSetFull :: System -> StackageVersion -> AttrSet
39− genJobSetFull = system: stackage:
40− (release.pkgsFor system).haskell.packages.stackage."${stackage}";
42− # genJobSet :: StackageRelease -> System -> AttrSet
43− genJobSet = if inHydra then genJobSetFull else genJobSetFiltered;
46− lib.genAttrs supportedSystems (system:
47− lib.genAttrs supportedStackageReleases (stackage:
48− genJobSet system stackage
stackage/README.mdnew file+12
@@ -0,0 +1,12 @@
6+~/.local/bin/stackage2nix --hackage-db /home/dbushev/.cabal/packages/hackage.haskell.org/01-index.tar --all-cabal-hashes /home/dbushev/projects/commercialhaskell/all-cabal-hashes --lts-haskell /home/dbushev/projects/fpco/lts-haskell --resolver lts-6.30
11+nix-env -f '<nixpkgs>' -qaP -A pkgs.haskell.packages.stackage.lts-635
stackage/default.nix+5−23
@@ -1,25 +1,7 @@
1−{ callPackage }:
1+self:
3− lts-130 = callPackage ./lts-13.0 {};
3+ lts-100 = import ./lts-10.0 {};
4− lts-131 = callPackage ./lts-13.1 {};
4+ lts-630 = import ./lts-6.30 {};
5− lts-132 = callPackage ./lts-13.2 {};
5+ lts-635 = import ./lts-6.35 {};
6− lts-133 = callPackage ./lts-13.3 {};
6+ lts-90 = import ./lts-9.0 {};
7− lts-134 = callPackage ./lts-13.4 {};
8− lts-135 = callPackage ./lts-13.5 {};
9− lts-136 = callPackage ./lts-13.6 {};
10− lts-137 = callPackage ./lts-13.7 {};
11− lts-138 = callPackage ./lts-13.8 {};
12− lts-139 = callPackage ./lts-13.9 {};
13− lts-1310 = callPackage ./lts-13.10 {};
14− lts-1311 = callPackage ./lts-13.11 {};
15− lts-1312 = callPackage ./lts-13.12 {};
16− lts-1313 = callPackage ./lts-13.13 {};
17− lts-1314 = callPackage ./lts-13.14 {};
18− lts-1315 = callPackage ./lts-13.15 {};
19− lts-1316 = callPackage ./lts-13.16 {};
20− lts-1317 = callPackage ./lts-13.17 {};
21− lts-1318 = callPackage ./lts-13.18 {};
22− lts-1319 = callPackage ./lts-13.19 {};
23− lts-1320 = callPackage ./lts-13.20 {};
24− lts-1321 = callPackage ./lts-13.21 {};
stackage/lts-10.0/configuration-common.nixnew file+8
@@ -0,0 +1,8 @@
6+ warp = addBuildDepend super.warp pkgs.curl;
stackage/lts-10.0/configuration-packages.nixnew file+49
@@ -0,0 +1,49 @@
1+# Generated by stackage2nix 0.4.0 from "/home/dbushev/projects/fpco/lts-haskell/lts-10.0.yaml"
4+with haskellLib; self: super: {
16+ "ghc-boot-th" = null;
21+ "integer-gmp" = null;
25+ "template-haskell" = null;
28+ "transformers" = null;
30+ # break cycle: HUnit call-stack nanospec hspec hspec-core ansi-terminal colour test-framework ansi-wl-pprint xml text test-framework-hunit test-framework-quickcheck2 async hspec-expectations hspec-meta quickcheck-io silently temporary base-compat exceptions tasty clock tasty-quickcheck tasty-hunit optparse-applicative regex-tdfa parsec hspec-discover stringbuilder
31+ "stringbuilder" = dontCheck super.stringbuilder;
32+ "hspec-discover" = dontCheck super.hspec-discover;
33+ "clock" = dontCheck super.clock;
34+ "exceptions" = dontCheck super.exceptions;
35+ "base-compat" = dontCheck super.base-compat;
36+ "temporary" = dontCheck super.temporary;
37+ "silently" = dontCheck super.silently;
38+ "async" = dontCheck super.async;
39+ "text" = dontCheck super.text;
40+ "colour" = dontCheck super.colour;
41+ "nanospec" = dontCheck super.nanospec;
42+ # break cycle: scalendar SCalendar
43+ "SCalendar" = dontCheck super.SCalendar;
44+ # break cycle: http-streams snap-server
45+ "snap-server" = dontCheck super.snap-server;
46+ # break cycle: statistics monad-par mwc-random vector-algorithms
47+ "mwc-random" = dontCheck super.mwc-random;
stackage/lts-10.0/default.nixnew file+12
@@ -0,0 +1,12 @@
1+# Generated by stackage2nix 0.4.0 from "/home/dbushev/projects/fpco/lts-haskell/lts-10.0.yaml"
2+{ nixpkgs ? import <nixpkgs> {} }:
5+ haskellLib = callPackage (nixpkgs.path + /pkgs/development/haskell-modules/lib.nix) {};
6+in callPackage (nixpkgs.path + /pkgs/development/haskell-modules) {
7+ ghc = pkgs.haskell.compiler.ghc822;
8+ compilerConfig = import ./configuration-packages.nix { inherit pkgs haskellLib; };
9+ initialPackages = import ./packages.nix;
10+ configurationCommon = if builtins.pathExists ./configuration-common.nix then import ./configuration-common.nix else args: self: super: {};
stackage/lts-13.18/packages.nix → stackage/lts-10.0/packages.nixrenamed+18381−12894
This diff is too big to show here.
stackage/lts-13.0/configuration-packages.nixdeleted−40
This diff is too big to show here.
stackage/lts-13.0/default.nixdeleted−26
This diff is too big to show here.
stackage/lts-13.1/configuration-packages.nixdeleted−40
This diff is too big to show here.
stackage/lts-13.1/default.nixdeleted−26
This diff is too big to show here.
stackage/lts-13.1/packages.nixdeleted−38588
This diff is too big to show here.
stackage/lts-13.10/configuration-packages.nixdeleted−40
This diff is too big to show here.
stackage/lts-13.10/default.nixdeleted−26
This diff is too big to show here.
stackage/lts-13.10/packages.nixdeleted−39158
This diff is too big to show here.
stackage/lts-13.11/configuration-packages.nixdeleted−40
This diff is too big to show here.
stackage/lts-13.11/default.nixdeleted−26
This diff is too big to show here.
stackage/lts-13.11/packages.nixdeleted−39132
This diff is too big to show here.
stackage/lts-13.12/configuration-packages.nixdeleted−40
This diff is too big to show here.
stackage/lts-13.12/default.nixdeleted−26
This diff is too big to show here.
stackage/lts-13.12/packages.nix−39227
This diff is too big to show here.
stackage/lts-13.13/configuration-packages.nix−40
This diff is too big to show here.
stackage/lts-13.13/default.nix−26
This diff is too big to show here.
stackage/lts-13.13/packages.nix−39223
This diff is too big to show here.
stackage/lts-13.14/configuration-packages.nix−40
This diff is too big to show here.
stackage/lts-13.14/default.nix−26
This diff is too big to show here.
stackage/lts-13.14/packages.nix−39253
This diff is too big to show here.
stackage/lts-13.15/configuration-packages.nix−40
This diff is too big to show here.
stackage/lts-13.15/default.nix−26
This diff is too big to show here.
stackage/lts-13.15/packages.nix−39252
This diff is too big to show here.
stackage/lts-13.16/configuration-packages.nix−40
This diff is too big to show here.
stackage/lts-13.16/default.nix−26
This diff is too big to show here.
stackage/lts-13.16/packages.nix−39274
This diff is too big to show here.
stackage/lts-13.17/configuration-packages.nix−40
This diff is too big to show here.
stackage/lts-13.17/default.nix−26
This diff is too big to show here.
stackage/lts-13.17/packages.nix−39278
This diff is too big to show here.
stackage/lts-13.18/configuration-packages.nix−40
This diff is too big to show here.
stackage/lts-13.18/default.nix−26
This diff is too big to show here.
stackage/lts-13.19/configuration-packages.nix−40
This diff is too big to show here.
stackage/lts-13.19/default.nix−26
This diff is too big to show here.
stackage/lts-13.2/configuration-packages.nix−40
This diff is too big to show here.
stackage/lts-13.2/default.nix−26
This diff is too big to show here.
stackage/lts-13.20/configuration-packages.nix−40
This diff is too big to show here.
stackage/lts-13.20/default.nix−26
This diff is too big to show here.
stackage/lts-13.20/packages.nix−39318
This diff is too big to show here.
stackage/lts-13.21/configuration-packages.nix−42
This diff is too big to show here.
stackage/lts-13.21/default.nix−26
This diff is too big to show here.
stackage/lts-13.21/packages.nix−39300
This diff is too big to show here.
stackage/lts-13.3/configuration-packages.nix−40
This diff is too big to show here.
stackage/lts-13.3/default.nix−26
This diff is too big to show here.
stackage/lts-13.3/packages.nix−38734
This diff is too big to show here.
stackage/lts-13.4/configuration-packages.nix−40
This diff is too big to show here.
stackage/lts-13.4/default.nix−26
This diff is too big to show here.
stackage/lts-13.4/packages.nix−39037
This diff is too big to show here.
stackage/lts-13.5/configuration-packages.nix−40
This diff is too big to show here.
stackage/lts-13.5/default.nix−26
This diff is too big to show here.
stackage/lts-13.5/packages.nix−39042
This diff is too big to show here.
stackage/lts-13.6/configuration-packages.nix−40
This diff is too big to show here.
stackage/lts-13.6/default.nix−26
This diff is too big to show here.
stackage/lts-13.6/packages.nix−39030
This diff is too big to show here.
stackage/lts-13.7/configuration-packages.nix−40
This diff is too big to show here.
stackage/lts-13.7/default.nix−26
This diff is too big to show here.
stackage/lts-13.7/packages.nix−39023
This diff is too big to show here.
stackage/lts-13.8/configuration-packages.nix−40
This diff is too big to show here.
stackage/lts-13.8/default.nix−26
This diff is too big to show here.
stackage/lts-13.8/packages.nix−39022
This diff is too big to show here.
stackage/lts-13.9/configuration-packages.nix−40
This diff is too big to show here.
stackage/lts-13.9/default.nix−26
This diff is too big to show here.
stackage/lts-13.9/packages.nix−39158
This diff is too big to show here.
stackage/lts-6.30/configuration-packages.nix+41
This diff is too big to show here.
stackage/lts-6.30/default.nix+15
This diff is too big to show here.
stackage/lts-6.30/packages.nix+20761−21199
This diff is too big to show here.
stackage/lts-6.35/configuration-packages.nix+41
This diff is too big to show here.
stackage/lts-6.35/default.nix+15
This diff is too big to show here.
stackage/lts-6.35/packages.nix+20906−20908
This diff is too big to show here.
stackage/lts-9.0/configuration-packages.nix+46
This diff is too big to show here.
stackage/lts-9.0/default.nix+12
This diff is too big to show here.
stackage/lts-9.0/packages.nix+18973−15995
This diff is too big to show here.
stackage2nix/README.md+16
This diff is too big to show here.
stackage2nix/default.nix+13−6
This diff is too big to show here.
stackage2nix/impure.nix−32
This diff is too big to show here.
This diff is too big to show here.
stackage2nix/stackage-packages.nix−226
This diff is too big to show here.
stackage2nix/stackage2nix.nix+32
This diff is too big to show here.
supported-stackage-releases.txt−53
This diff is too big to show here.
This diff is too big to show here.
This diff is too big to show here.