File tree 3 files changed +13
-16
lines changed
3 files changed +13
-16
lines changed Original file line number Diff line number Diff line change 1
- /* The function obtained when this is applied to a package set calls
2
- * the stack-to-nix tool on a supplied source set and then
1
+ /* The function obtained when this is applied to a package set calls
2
+ * the stack-to-nix tool on a supplied source set and then
3
3
* imports the resulting pkgs.nix. The application of this function
4
4
* to a source path can thus be used directly as the input to mkStackPackageSet
5
- */
6
- { nix-tools , pkgs } : { src , stackYaml ? null } :
5
+ */
6
+ { nix-tools , pkgs } :
7
+ { src , stackYaml ? null } :
7
8
let
8
9
pkgsNix = pkgs . stdenv . mkDerivation {
9
10
name = "pkgs-nix" ;
10
11
inherit src ;
11
- nativeBuildInputs = [ nix-tools pkgs . nix-prefetch-git pkgs . rsync ] ;
12
+ nativeBuildInputs = [ nix-tools pkgs . nix-prefetch-git ] ;
12
13
installPhase = ''
13
14
export LANG=C.utf8 # Needed or stack-to-nix will die on unicode inputs
14
15
mkdir -p $out
Original file line number Diff line number Diff line change 52
52
override = "stackage" ;
53
53
} ) ;
54
54
55
- packages = pkgs : self : ( rec {
56
- inherit pkgs ; # Make pkgs available via callPackage
57
-
58
- # Packages built to run on the build platform, not the host platform
59
- buildPackages = pkgs . buildPackages . lib . makeScope pkgs . buildPackages . newScope ( packages pkgs . buildPackages ) ;
60
-
55
+ packages = self : ( {
61
56
# Utility functions for working with the component builder.
62
57
haskellLib = let hl = import ./lib { inherit ( pkgs ) lib ; haskellLib = hl ; } ; in hl ;
63
58
@@ -111,11 +106,12 @@ let
111
106
} ;
112
107
113
108
# Programs for generating Nix expressions from Cabal and Stack
114
- # files.
115
- nix-tools = self . callPackage ./nix-tools { inherit fetchExternal ; } ;
109
+ # files. We need to make sure we build this from the buildPackages,
110
+ # we never want to actually cross compile nix-tools on it's own.
111
+ nix-tools = pkgs . buildPackages . callPackage ./nix-tools { inherit fetchExternal ; inherit ( self ) mkCabalProjectPkgSet ; } ;
116
112
117
113
# Function to call stackToNix
118
- callStackToNix = buildPackages . callPackage ./call-stack-to-nix.nix { } ;
114
+ callStackToNix = self . callPackage ./call-stack-to-nix.nix { } ;
119
115
120
116
# Snapshots of Hackage and Stackage, converted to Nix expressions,
121
117
# regularly updated.
130
126
} ) ;
131
127
132
128
in
133
- pkgs . lib . makeScope pkgs . newScope ( packages pkgs )
129
+ pkgs . lib . makeScope pkgs . newScope packages
Original file line number Diff line number Diff line change @@ -12,7 +12,7 @@ rm -rvf */cabal.project.local */.ghc.environment* */dist */dist-newstyle */.stac
12
12
echo >& 2
13
13
14
14
printf " *** Running the nix-build tests...\n" >& 2
15
- nix- build $NIX_BUILD_ARGS --no-out- link --keep-going ./default.nix
15
+ nix build $NIX_BUILD_ARGS --no-link --keep-going -f ./default.nix
16
16
echo >& 2
17
17
18
18
printf " *** Running the unit tests... " >& 2
You can’t perform that action at this time.
0 commit comments