Fix build for NixOS

This commit is contained in:
Gregor Kleen 2018-04-11 14:41:00 +02:00
parent 31510147bd
commit 2464ffb168
2 changed files with 4 additions and 3 deletions

View File

@ -1,11 +1,11 @@
{ nixpkgs ? import <nixpkgs> {}, compiler ? "ghc822" }:
{ nixpkgs ? import <nixpkgs> {}, compiler ? null }:
let
inherit (nixpkgs) pkgs;
haskellPackages = if isNull compiler
then pkgs.haskellPackages
else pkgs.haskell.packages.${compiler};
else pkgs.haskell.packages."${compiler}";
drv = haskellPackages.callPackage ./uniworx.nix {};

View File

@ -2,12 +2,13 @@
let
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 {
inherit ghc;
name = "stackenv";
buildInputs = (with pkgs;
[ postgresql zlib openldap cyrus_sasl.dev
]) ++ (with haskell.packages."ghc${builtins.replaceStrings ["."] [""] ghc.version}";
]) ++ (with haskellPackages;
[ yesod-bin
]);
}