Created
October 11, 2019 12:54
-
-
Save freeman42x/b470541e8417df76622783774e0dd3de to your computer and use it in GitHub Desktop.
nix-shell -p zlib to shell.nix
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
{ nixpkgs ? import <nixpkgs> {}, compiler ? "default", doBenchmark ? false }: | |
let | |
inherit (nixpkgs) pkgs; | |
f = { mkDerivation, base, directory, stdenv, text, turtle, zlib }: | |
mkDerivation { | |
pname = "haskell-editor-setup"; | |
version = "0.1.0.0"; | |
src = ./.; | |
isLibrary = false; | |
isExecutable = true; | |
buildInputs = [ zlib ]; | |
executableHaskellDepends = [ base directory text turtle ]; | |
description = "Terminal program that will set up Haskell environment with a target selected editor or IDE"; | |
license = stdenv.lib.licenses.gpl3; | |
}; | |
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