Skip to content

Commit c3e883c

Browse files
committed
Merge remote-tracking branch 'origin/master' into support-cabal-doctest
2 parents 1d6dd9c + 930ec0d commit c3e883c

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

53 files changed

+394
-324
lines changed

README.org

Lines changed: 27 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -20,13 +20,26 @@ For the documentation, see https://input-output-hk.github.io/haskell.nix/.
2020
For =cabal.project= project add a =default.nix=:
2121

2222
#+begin_src sh
23-
{ pkgs ? import <nixpkgs> (import (builtins.fetchTarball https://github.com/input-output-hk/haskell.nix/archive/master.tar.gz))
23+
let
24+
# Fetch the latest haskell.nix and import its default.nix
25+
haskellNix = import (builtins.fetchTarball https://github.com/input-output-hk/haskell.nix/archive/master.tar.gz) {};
26+
# haskell.nix provides access to the nixpkgs pins which are used by our CI, hence
27+
# you will be more likely to get cache hits when using these.
28+
# But you can also just use your own, e.g. '<nixpkgs>'
29+
nixpkgsSrc = haskellNix.sources.nixpkgs-1909;
30+
# haskell.nix provides some arguments to be passed to nixpkgs, including some patches
31+
# and also the haskell.nix functionality itself as an overlay.
32+
nixpkgsArgs = haskellNix.nixpkgsArgs;
33+
in
34+
{ pkgs ? import nixpkgsSrc nixpkgsArgs
2435
, haskellCompiler ? "ghc865"
2536
}:
26-
pkgs.haskell-nix.cabalProject {
27-
src = pkgs.haskell-nix.haskellLib.cleanGit { src = ./.; };
28-
ghc = pkgs.buildPackages.pkgs.haskell-nix.compiler.${haskellCompiler};
29-
}
37+
# 'cabalProject' generates a package set based on a cabal.project (and the corresponding .cabal files)
38+
pkgs.haskell-nix.cabalProject {
39+
# 'cleanGit' cleans a source directory based on the files known by git
40+
src = pkgs.haskell-nix.haskellLib.cleanGit { src = ./.; };
41+
ghc = pkgs.buildPackages.pkgs.haskell-nix.compiler.${haskellCompiler};
42+
}
3043
#+end_src
3144

3245
Note that you'll need to add a comment specifying the expected sha256
@@ -45,11 +58,16 @@ source-repository-package
4558
For a =stack.yaml= project add a =default.nix=:
4659

4760
#+begin_src sh
48-
{ pkgs ? import <nixpkgs> (import (builtins.fetchTarball https://github.com/input-output-hk/haskell.nix/archive/master.tar.gz))
61+
let
62+
haskellNix = import (builtins.fetchTarball https://github.com/input-output-hk/haskell.nix/archive/master.tar.gz) {};
63+
nixpkgsSrc = haskellNix.sources.nixpkgs-1909;
64+
nixpkgsArgs = haskellNix.nixpkgsArgs;
65+
in
66+
{ pkgs ? import nixpkgsSrc nixpkgsArgs
4967
}:
50-
pkgs.haskell-nix.stackProject {
51-
src = pkgs.haskell-nix.haskellLib.cleanGit { src = ./.; };
52-
}
68+
pkgs.haskell-nix.stackProject {
69+
src = pkgs.haskell-nix.haskellLib.cleanGit { src = ./.; };
70+
}
5371
#+end_src
5472

5573
To build the library component of a package in the project run:

build.nix

Lines changed: 8 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -2,26 +2,19 @@
22
#
33
# It is separate from default.nix because that file is the public API
44
# of Haskell.nix, which shouldn't have tests, etc.
5-
6-
{ nixpkgs ? ./nixpkgs
7-
# Provide args to the nixpkgs instantiation.
8-
, system ? builtins.currentSystem
9-
, crossSystem ? null
10-
, config ? {}
11-
, nixpkgsArgs ? { inherit system crossSystem; }
5+
let
6+
haskellNix = (import ./default.nix {});
7+
in
8+
{ nixpkgs ? haskellNix.sources.nixpkgs-default
9+
, nixpkgsArgs ? haskellNix.nixpkgsArgs
10+
, pkgs ? import nixpkgs nixpkgsArgs
1211
, ifdLevel ? 1000
1312
}:
1413

1514
let
16-
haskellNixArgs = import ./default.nix;
17-
pkgs = import nixpkgs ({
18-
config = haskellNixArgs.config // config;
19-
inherit (haskellNixArgs) overlays;
20-
} // nixpkgsArgs);
2115
haskell = pkgs.haskell-nix;
22-
2316
in rec {
24-
tests = import ./test/default.nix { inherit nixpkgs nixpkgsArgs ifdLevel; };
17+
tests = import ./test/default.nix { inherit pkgs ifdLevel; };
2518

2619
# Scripts for keeping Hackage and Stackage up to date, and CI tasks.
2720
# The dontRecurseIntoAttrs prevents these from building on hydra
@@ -36,7 +29,7 @@ in rec {
3629
# nixpkgs 19.09 changes "Option has no description" from an
3730
# error into a warning. That is quite helpful when hardly any
3831
# of our options are documented, thanks @oxij.
39-
pkgs = import ./nixpkgs { nixpkgs-pin = "release-19.09"; };
32+
pkgs = import (import ./nixpkgs/default.nix).nixpkgs-1909 {};
4033
};
4134
};
4235
# Because this is going to be used to test caching on hydra, it must not

builder/default.nix

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ let
4040

4141
hoogleLocal = let
4242
# Use the latest default nixpkgs hoogle.nix, as the 19.03 one does not work with cross compilers
43-
nixpkgsHoogleLocal = import ((import ../nixpkgs {}).path + /pkgs/development/haskell-modules/hoogle.nix);
43+
nixpkgsHoogleLocal = import ((import (import ../nixpkgs).nixpkgs-default {}).path + /pkgs/development/haskell-modules/hoogle.nix);
4444
in { packages ? [], hoogle ? pkgs.buildPackages.haskell-nix.haskellPackages.hoogle.components.exes.hoogle }:
4545
haskellLib.weakCallPackage pkgs nixpkgsHoogleLocal {
4646
# For musl we can use haddock from the buildGHC

builder/make-config-files.nix

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -170,7 +170,7 @@ in { identifier, component, fullName, flags ? {} }:
170170
done | sed 's|''${pkgroot}/../../../|/nix/store/|' | sort -u
171171
)
172172
for d in $dirsToLink; do
173-
ln -f -s "$d/"*.dylib $dynamicLinksDir
173+
ln -f -s "$d/"*.{a,dylib,so} $dynamicLinksDir
174174
done
175175
# Edit the local package DB to reference the links directory.
176176
for f in "$out/${packageCfgDir}/"*.conf; do

ci-lib.nix

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
let
2+
# Generic nixpkgs, use *only* for lib functions that are stable across versions
3+
pkgs = import (import ./nixpkgs/default.nix).nixpkgs-default {};
4+
lib = pkgs.lib;
5+
in rec {
6+
inherit (import ./dimension.nix) dimension;
7+
8+
# A filter for removing packages that aren't supported on the current platform
9+
# according to 'meta.platforms'.
10+
platformFilterGeneric = pkgs: system:
11+
# This needs to use the correct nixpkgs version so all the systems line up
12+
let lib = pkgs.lib;
13+
platform = lib.systems.elaborate { inherit system; };
14+
# Can't just default to [] for platforms, since no meta.platforms
15+
# means "all platforms" not "no platforms"
16+
in drv : if drv ? meta && drv.meta ? platforms then
17+
lib.any (lib.meta.platformMatch platform) drv.meta.platforms
18+
else true;
19+
20+
# Hydra doesn't like these attributes hanging around in "jobsets": it thinks they're jobs!
21+
stripAttrsForHydra = filterAttrsOnlyRecursive (n: _: n != "recurseForDerivations" && n != "dimension");
22+
23+
# Keep derivations and attrsets with 'recurseForDerivations'. This ensures that we match the
24+
# derivations that Hercules will see, and prevents Hydra from trying to pick up all sorts of bad stuff
25+
# (like attrsets that contain themselves!).
26+
filterDerivations = filterAttrsOnlyRecursive (n: attrs: lib.isDerivation attrs || attrs.recurseForDerivations or false);
27+
28+
# A version of 'filterAttrsRecursive' that doesn't recurse into derivations. This prevents us from going into an infinite
29+
# loop with the 'out' attribute on derivations.
30+
# TODO: Surely this shouldn't be necessary. I think normal 'filterAttrsRecursive' will effectively cause infinite loops
31+
# if you keep derivations and your predicate forces the value of the attribute, as this then triggers a loop on the
32+
# 'out' attribute. Weird.
33+
filterAttrsOnlyRecursive = pred: set:
34+
lib.listToAttrs (
35+
lib.concatMap (name:
36+
let v = set.${name}; in
37+
if pred name v then [
38+
(lib.nameValuePair name (
39+
if builtins.isAttrs v && !lib.isDerivation v then filterAttrsOnlyRecursive pred v
40+
else v
41+
))
42+
] else []
43+
) (builtins.attrNames set)
44+
);
45+
}

ci.nix

Lines changed: 49 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -1,44 +1,65 @@
1-
# these are patched nixpkgs that include the following PRs:
2-
# - https://github.com/NixOS/nixpkgs/pull/71216
3-
# - https://github.com/NixOS/nixpkgs/pull/68398
4-
1+
# 'supportedSystems' restricts the set of systems that we will evaluate for. Useful when you're evaluting
2+
# on a machine with e.g. no way to build the Darwin IFDs you need!
3+
{ supportedSystems ? [ "x86_64-linux" "x86_64-darwin" ]
4+
, ifdLevel ? 3
5+
# Whether or not we are evaluating in restricted mode. This is true in Hydra, but not in Hercules.
6+
, restrictEval ? false }:
57
let
6-
inherit (import ./dimension.nix) dimension;
8+
inherit (import ./ci-lib.nix) dimension platformFilterGeneric filterAttrsOnlyRecursive;
9+
inherit (import ./default.nix {}) sources nixpkgsArgs;
710
nixpkgsVersions = {
8-
# "release-18.09" = builtins.fetchTarball "https://github.com/input-output-hk/nixpkgs/archive/7e4dcacbf066a8e2d12693a9de1fb30c77081c5d.tar.gz";
9-
"release-19.03" = builtins.fetchTarball "https://github.com/input-output-hk/nixpkgs/archive/a8f81dc037a5977414a356dd068f2621b3c89b60.tar.gz";
10-
# "release-19.09" = builtins.fetchTarball "https://github.com/input-output-hk/nixpkgs/archive/3d623a406cec9052ae0a16a79ce3ce9de11236bb.tar.gz";
11+
"R1903" = "nixpkgs-1903";
12+
"R1909" = "nixpkgs-1909";
1113
};
12-
systems = {
13-
"x86_64-linux" = {};
14+
systems = nixpkgs: nixpkgs.lib.filterAttrs (_: v: builtins.elem v supportedSystems) {
15+
# I wanted to take these from 'lib.systems.examples', but apparently there isn't one for linux!
16+
linux = "x86_64-linux";
17+
darwin = "x86_64-darwin";
1418
};
15-
crossSystems = {
16-
"x86_64-pc-mingw32" = {};
19+
crossSystems = nixpkgsName: nixpkgs: system:
20+
# We need to use the actual nixpkgs version we're working with here, since the values
21+
# of 'lib.systems.examples' are not understood between all versions
22+
let lib = nixpkgs.lib;
23+
in lib.optionalAttrs (system == "x86_64-linux" || nixpkgsName == "R1903") {
24+
# Windows cross compilation is currently broken on macOS for nixpkgs 19.09 (works on 19.03)
25+
inherit (lib.systems.examples) mingwW64;
26+
} // lib.optionalAttrs (system == "x86_64-linux") {
27+
# Musl cross only works on linux
28+
# aarch64 cross only works on linux
29+
inherit (lib.systems.examples) musl64 aarch64-multiplatform;
1730
};
18-
haskellNixArgs = import ./.;
1931
in
20-
dimension "Nixpkgs version" nixpkgsVersions (nixpkgsName: nixpkgsSrc:
21-
dimension "System" systems (system: _:
22-
# Native builds
23-
# TODO: can we merge this into the general case by picking an appropriate "cross system" to mean native?
24-
let pkgs = import nixpkgsSrc (haskellNixArgs // { inherit system; });
25-
in pkgs.recurseIntoAttrs {
26-
hello = (pkgs.haskell-nix.hackage-package { name = "hello"; version = "1.0.0.2";}).components.exes.hello;
27-
iserv-proxy = pkgs.ghc-extra-packages.ghc865.iserv-proxy.components.exes.iserv-proxy;
28-
ghc = pkgs.recurseIntoAttrs pkgs.haskell-nix.compiler;
29-
tests = pkgs.lib.optionalAttrs (system == "x86_64-linux") (import ./test { inherit pkgs; });
32+
dimension "Nixpkgs version" nixpkgsVersions (nixpkgsName: nixpkgs-pin:
33+
let pinnedNixpkgsSrc = sources.${nixpkgs-pin};
34+
# We need this for generic nixpkgs stuff at the right version
35+
genericPkgs = import pinnedNixpkgsSrc {};
36+
in dimension "System" (systems genericPkgs) (systemName: system:
37+
let pkgs = import pinnedNixpkgsSrc (nixpkgsArgs // { inherit system; });
38+
build = import ./build.nix { inherit pkgs ifdLevel; };
39+
platformFilter = platformFilterGeneric pkgs system;
40+
in filterAttrsOnlyRecursive (_: v: platformFilter v) {
41+
# Native builds
42+
# TODO: can we merge this into the general case by picking an appropriate "cross system" to mean native?
43+
native = pkgs.recurseIntoAttrs {
44+
inherit (build) tests maintainer-scripts maintainer-script-cache;
45+
hello = (pkgs.haskell-nix.hackage-package { name = "hello"; version = "1.0.0.2"; }).components.exes.hello;
46+
iserv-proxy = pkgs.ghc-extra-packages.ghc865.iserv-proxy.components.exes.iserv-proxy;
47+
ghc = pkgs.recurseIntoAttrs pkgs.haskell-nix.compiler;
48+
};
3049
}
3150
//
32-
dimension "Cross system" crossSystems (crossSystem: _:
51+
dimension "Cross system" (crossSystems nixpkgsName genericPkgs system) (crossSystemName: crossSystem:
3352
# Cross builds
34-
let pkgs = import nixpkgsSrc (haskellNixArgs // { inherit system; crossSystem.config = crossSystem; });
53+
let pkgs = import pinnedNixpkgsSrc (nixpkgsArgs // { inherit system crossSystem; });
54+
build = import ./build.nix { inherit pkgs ifdLevel; };
3555
in pkgs.recurseIntoAttrs {
36-
hello = (pkgs.haskell-nix.hackage-package { name = "hello"; version = "1.0.0.2";}).components.exes.hello;
37-
56+
hello = (pkgs.haskell-nix.hackage-package { name = "hello"; version = "1.0.0.2"; }).components.exes.hello;
3857
iserv-proxy = pkgs.ghc-extra-packages.ghc865.iserv-proxy.components.exes.iserv-proxy;
39-
4058
remote-iserv = pkgs.ghc-extra-packages.ghc865.remote-iserv.components.exes.remote-iserv;
4159
}
60+
//
61+
# Tests are broken on aarch64 cross https://github.com/input-output-hk/haskell.nix/issues/513
62+
pkgs.lib.optionalAttrs (crossSystemName != "aarch64-multiplatform") build.tests
4263
)
4364
)
4465
)

compiler/ghc/default.nix

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -73,9 +73,12 @@ let
7373
inherit (bootPkgs) ghc;
7474

7575
# TODO check if this posible fix for segfaults works or not.
76-
libffiStaticEnabled = if libffi == null || !stdenv.targetPlatform.isMusl
77-
then libffi
78-
else targetPackages.libffi.overrideAttrs (old: { dontDisableStatic = true; });
76+
targetLibffi =
77+
if stdenv.targetPlatform.isMusl
78+
then targetPackages.libffi.overrideAttrs (old: { dontDisableStatic = true; })
79+
else if targetPlatform != hostPlatform
80+
then targetPackages.libffi
81+
else libffi;
7982

8083
# TODO(@Ericson2314) Make unconditional
8184
targetPrefix = stdenv.lib.optionalString
@@ -116,7 +119,7 @@ let
116119

117120
# Splicer will pull out correct variations
118121
libDeps = platform: stdenv.lib.optional enableTerminfo [ ncurses ]
119-
++ [libffiStaticEnabled]
122+
++ [targetLibffi]
120123
++ stdenv.lib.optional (!enableIntegerSimple) gmp
121124
++ stdenv.lib.optional (platform.libc != "glibc" && !targetPlatform.isWindows) libiconv;
122125

@@ -208,7 +211,7 @@ in let configured-src = stdenv.mkDerivation (rec {
208211
configureFlags = [
209212
"--datadir=$doc/share/doc/ghc"
210213
"--with-curses-includes=${ncurses.dev}/include" "--with-curses-libraries=${ncurses.out}/lib"
211-
] ++ stdenv.lib.optionals (libffiStaticEnabled != null) ["--with-system-libffi" "--with-ffi-includes=${libffiStaticEnabled.dev}/include" "--with-ffi-libraries=${libffiStaticEnabled.out}/lib"
214+
] ++ stdenv.lib.optionals (targetLibffi != null) ["--with-system-libffi" "--with-ffi-includes=${targetLibffi.dev}/include" "--with-ffi-libraries=${targetLibffi.out}/lib"
212215
] ++ stdenv.lib.optional (!enableIntegerSimple) [
213216
"--with-gmp-includes=${targetPackages.gmp.dev}/include" "--with-gmp-libraries=${targetPackages.gmp.out}/lib"
214217
] ++ stdenv.lib.optional (targetPlatform == hostPlatform && hostPlatform.libc != "glibc" && !targetPlatform.isWindows) [

default.nix

Lines changed: 24 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,24 @@
1-
# This default.nix is designed to be passed directly nixpkgs with something like:
2-
# import <nixpkgs> (import (builtins.fetchTarball https://github.com/input-output-hk/haskell.nix/archive/master.tar.gz))
3-
{ config = import ./config.nix;
4-
overlays = import ./overlays;
5-
}
1+
let haskellNix = rec {
2+
sources = {
3+
inherit (import ./nixpkgs/default.nix) nixpkgs-1903 nixpkgs-1909 nixpkgs-default;
4+
};
5+
6+
config = import ./config.nix;
7+
overlays = import ./overlays;
8+
nixpkgsArgs = { inherit overlays config; };
9+
};
10+
11+
haskellNixV1 = haskellNix.nixpkgsArgs;
12+
haskellNixV2 = haskellNix;
13+
14+
v1DeprecationMessage = "Version 1 is deprecated: use version 2 (nixpkgs arguments are available as the `nixpkgsArgs` attribute of version 2)";
15+
# If no arguments, then you get V1
16+
# I'd like to make importing directly issue a warning, but I couldn't figure out a way to make it happen
17+
in haskellNixV1 // {
18+
__functor = _: { version ? 2 }:
19+
if version == 1
20+
then builtins.trace v1DeprecationMessage haskellNixV1
21+
else if version == 2
22+
then haskellNixV2
23+
else builtins.throw ("haskell.nix: unknown version: " + (builtins.toString version));
24+
}

docs/user-guide.md

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -7,22 +7,22 @@
77
To build a package, say [lens][], from a stackage snapshot, say [lts-13.28][],
88
you could run
99
```bash
10-
nix build '(with import <nixpkgs> (import ./.); haskell-nix.snapshots."lts-13.28").lens.components.library'
10+
nix build '(with import <nixpkgs> (import ./. {}).nixpkgsArgs; haskell-nix.snapshots."lts-13.28").lens.components.library'
1111
```
1212
which would build the [lens][] library component from the lens package as fixed
1313
by the [lts-13.28][] stackage snapshot.
1414

1515
To build any package from hackage, say [lens][], in version, say 4.17.1, you
1616
could run
1717
```bash
18-
nix build '(with import <nixpkgs> (import ./.); (haskell-nix.hackage-package { name = "lens"; version = "4.17.1"; })).components.library'
18+
nix build '(with import <nixpkgs> (import ./. {}).nixpkgsArgs; (haskell-nix.hackage-package { name = "lens"; version = "4.17.1"; })).components.library'
1919
```
2020
which would build the [lens][] library component from the [lens-4.17.1][] package
2121
from hackage. The dependencies would be solved against the most recent
2222
[hackage-index-state][] that comes via the [hackage.nix][] pin with your
2323
[haskell.nix][] checkout. A specific one can be specified as well:
2424
```bash
25-
nix build '(with import <nixpkgs> (import ./.); (haskell-nix.hackage-package { name = "lens"; version = "4.17.1"; index-state = "2019-07-14T00:00:00Z"; })).components.library'
25+
nix build '(with import <nixpkgs> (import ./. {}).nixpkgsArgs; (haskell-nix.hackage-package { name = "lens"; version = "4.17.1"; index-state = "2019-07-14T00:00:00Z"; })).components.library'
2626
```
2727
which would use the hackage index as of `2019-07-14T00:00:00Z` to produce a build plan
2828
for the [lens-4.17.1][] package.
@@ -49,7 +49,7 @@ produce derivations that we can `nix build`.
4949
To build the latest `nix-tools` and store the result at `./nt`, run:
5050

5151
```bash
52-
nix build '(with import <nixpkgs> (import (builtins.fetchTarball https://github.com/input-output-hk/haskell.nix/archive/master.tar.gz)); haskell-nix.nix-tools)' --out-link nt
52+
nix build '(with import <nixpkgs> (import (builtins.fetchTarball https://github.com/input-output-hk/haskell.nix/archive/master.tar.gz) {}).nixpkgsArgs; haskell-nix.nix-tools)' --out-link nt
5353
```
5454

5555
If you would like to then install `nix-tools` into your profile, run:
@@ -85,15 +85,15 @@ The easiest way to get a hold of [Haskell.nix][] is with
8585
[`fetchTarball`](https://nixos.org/nix/manual/#ssec-builtins).
8686

8787
```nix
88-
import <nixpkgs> (import (builtins.fetchTarball https://github.com/input-output-hk/haskell.nix/archive/master.tar.gz))
88+
import <nixpkgs> (import (builtins.fetchTarball https://github.com/input-output-hk/haskell.nix/archive/master.tar.gz) {}).nixpkgsArgs
8989
```
9090

9191
### Using your cabal.project file
9292

9393
If your project has a `cabal.project` you can add a `default.nix` like this:
9494

9595
```nix
96-
{ pkgs ? import <nixpkgs> (import (builtins.fetchTarball https://github.com/input-output-hk/haskell.nix/archive/master.tar.gz))
96+
{ pkgs ? import <nixpkgs> (import (builtins.fetchTarball https://github.com/input-output-hk/haskell.nix/archive/master.tar.gz) {}).nixpkgsArgs
9797
, haskellCompiler ? "ghc865"
9898
}:
9999
pkgs.haskell-nix.cabalProject {
@@ -173,7 +173,7 @@ or one of the constraints in your local `.cabal` files).
173173
If your project has a `stack.yaml` you can add a `default.nix` like this:
174174

175175
```nix
176-
{ pkgs ? import <nixpkgs> (import (builtins.fetchTarball https://github.com/input-output-hk/haskell.nix/archive/master.tar.gz))
176+
{ pkgs ? import <nixpkgs> (import (builtins.fetchTarball https://github.com/input-output-hk/haskell.nix/archive/master.tar.gz) {}).nixpkgsArgs
177177
}:
178178
pkgs.haskell-nix.stackProject {
179179
src = pkgs.haskell-nix.haskellLib.cleanGit { src = ./.; };
@@ -269,7 +269,7 @@ these Git repositories correspond to the actual Hackage and Stackage.
269269
stackageSourceJSON = ./stackage-src.json;
270270
};
271271
})]; })
272-
, haskellNixArgs ? import (builtins.fetchTarball https://github.com/input-output-hk/haskell.nix/archive/master.tar.gz)
272+
, haskellNixArgs ? (import (builtins.fetchTarball https://github.com/input-output-hk/haskell.nix/archive/master.tar.gz) {}).nixpkgsArgs
273273
}:
274274
pkgs
275275
```
@@ -283,7 +283,7 @@ attrsets and try examples.
283283
# example.nix
284284
{ nixpkgs ? <nixpkgs> }:
285285
rec {
286-
haskell = import nixpkgs (import (builtins.fetchTarball https://github.com/input-output-hk/haskell.nix/archive/master.tar.gz));
286+
haskell = import nixpkgs (import (builtins.fetchTarball https://github.com/input-output-hk/haskell.nix/archive/master.tar.gz) {}).nixpkgsArgs;
287287
pkgNames = haskell.pkgs.lib.attrNames haskell.haskell-nix.snapshots."lts-13.18";
288288
}
289289
```

0 commit comments

Comments
 (0)