-
-
Save JonathanReeve/c20bbc6fc8359a1682b5789b18279510 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ haskellLib ? (import <nixpkgs> {}).haskellPackages, nixpkgs ? import <nixpkgs> {}, compiler ? "default", doBenchmark ? false }: | |
let | |
inherit (nixpkgs) pkgs; | |
clay = haskellLib.doJailbreak clay; | |
f = { mkDerivation, base, blaze-html, clay, hakyll, stdenv }: | |
mkDerivation { | |
pname = "open-editions"; | |
version = "0.1.0.0"; | |
src = ./.; | |
isLibrary = false; | |
isExecutable = true; | |
executableHaskellDepends = [ base blaze-html clay hakyll ]; | |
license = "unknown"; | |
hydraPlatforms = stdenv.lib.platforms.none; | |
}; | |
haskellPackages = if compiler == "default" | |
then pkgs.haskellPackages | |
else pkgs.haskell.packages.${compiler}; | |
variant = if doBenchmark then pkgs.haskell.lib.doBenchmark else pkgs.lib.id; | |
drv = variant (haskellPackages.callPackage f {}); | |
in | |
if pkgs.lib.inNixShell then drv.env else drv |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment