Fix build for NixOS
This commit is contained in:
parent
31510147bd
commit
2464ffb168
@ -1,11 +1,11 @@
|
|||||||
{ nixpkgs ? import <nixpkgs> {}, compiler ? "ghc822" }:
|
{ nixpkgs ? import <nixpkgs> {}, compiler ? null }:
|
||||||
|
|
||||||
let
|
let
|
||||||
inherit (nixpkgs) pkgs;
|
inherit (nixpkgs) pkgs;
|
||||||
|
|
||||||
haskellPackages = if isNull compiler
|
haskellPackages = if isNull compiler
|
||||||
then pkgs.haskellPackages
|
then pkgs.haskellPackages
|
||||||
else pkgs.haskell.packages.${compiler};
|
else pkgs.haskell.packages."${compiler}";
|
||||||
|
|
||||||
drv = haskellPackages.callPackage ./uniworx.nix {};
|
drv = haskellPackages.callPackage ./uniworx.nix {};
|
||||||
|
|
||||||
|
|||||||
@ -2,12 +2,13 @@
|
|||||||
|
|
||||||
let
|
let
|
||||||
inherit (nixpkgs) haskell pkgs;
|
inherit (nixpkgs) haskell pkgs;
|
||||||
|
haskellPackages = if ghc.version == pkgs.haskellPackages.ghc.version then pkgs.haskellPackages else pkgs.haskell.packages."ghc${builtins.replaceStrings ["."] [""] ghc.version}";
|
||||||
in haskell.lib.buildStackProject {
|
in haskell.lib.buildStackProject {
|
||||||
inherit ghc;
|
inherit ghc;
|
||||||
name = "stackenv";
|
name = "stackenv";
|
||||||
buildInputs = (with pkgs;
|
buildInputs = (with pkgs;
|
||||||
[ postgresql zlib openldap cyrus_sasl.dev
|
[ postgresql zlib openldap cyrus_sasl.dev
|
||||||
]) ++ (with haskell.packages."ghc${builtins.replaceStrings ["."] [""] ghc.version}";
|
]) ++ (with haskellPackages;
|
||||||
[ yesod-bin
|
[ yesod-bin
|
||||||
]);
|
]);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user