Skip to content

Commit edf5126

Browse files
eamsdenangerman
authored andcommitted
Fixes for callStackToNix
1 parent 438d27e commit edf5126

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

call-stack-to-nix.nix

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,14 +3,14 @@
33
* imports the resulting pkgs.nix. The application of this function
44
* to a source path can thus be used directly as the input to mkStackPackageSet
55
*/
6-
{ nix-tools pkgs }: { src, stackYaml ? null }:
6+
{ nix-tools, pkgs }: { src, stackYaml ? null }:
77
let
8-
pkgsNix = stdenv.mkDerivation {
9-
name = "${pkgs-nix";
8+
pkgsNix = pkgs.stdenv.mkDerivation {
9+
name = "pkgs-nix";
1010
inherit src;
1111
nativeBuildInputs = [ nix-tools pkgs.nix-prefetch-git pkgs.rsync ];
1212
installPhase = ''
13-
export LANG=C.utf8 # Needed or unicode in cabal files will kill stack-to-nix
13+
export LANG=C.utf8 # Needed or stack-to-nix will die on unicode inputs
1414
mkdir -p $out
1515
stack-to-nix --stack-yaml=$src/${if stackYaml == null then "stack.yaml" else stackYaml} -o $out
1616
mv $out/pkgs.nix $out/default.nix

default.nix

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ let
5252
override = "stackage";
5353
});
5454

55-
packages = pkgs: self: ({
55+
packages = pkgs: self: (rec {
5656
inherit pkgs; # Make pkgs available via callPackage
5757

5858
# Packages built to run on the build platform, not the host platform

0 commit comments

Comments
 (0)