mirror of
https://github.com/haskell-nix/hnix.git
synced 2024-09-11 06:55:38 +03:00
Add shell.nix
This commit is contained in:
parent
735c5ca15a
commit
5ccc2ce72c
52
shell.nix
Normal file
52
shell.nix
Normal file
@ -0,0 +1,52 @@
|
||||
{ nixpkgs ? import <nixpkgs> {}, compiler ? "default", doBenchmark ? false }:
|
||||
|
||||
let
|
||||
|
||||
inherit (nixpkgs) pkgs;
|
||||
|
||||
f = { mkDerivation, ansi-wl-pprint, base, containers, criterion
|
||||
, data-fix, deepseq, deriving-compat, directory, filepath, Glob
|
||||
, parsers, regex-tdfa, regex-tdfa-text, semigroups, split, stdenv
|
||||
, tasty, tasty-hunit, tasty-th, text, transformers, trifecta
|
||||
, unordered-containers, these, optparse-applicative, free
|
||||
, interpolate, process, exceptions, bytestring, mtl, monadlist
|
||||
, base16-bytestring, cryptohash, template-haskell, syb
|
||||
}:
|
||||
mkDerivation {
|
||||
pname = "hnix";
|
||||
version = "0.4.0";
|
||||
src = ./.;
|
||||
isLibrary = true;
|
||||
isExecutable = true;
|
||||
libraryHaskellDepends = [
|
||||
ansi-wl-pprint base containers data-fix deepseq deriving-compat
|
||||
parsers regex-tdfa regex-tdfa-text semigroups text transformers
|
||||
trifecta unordered-containers these free process directory
|
||||
filepath exceptions bytestring mtl monadlist base16-bytestring
|
||||
cryptohash template-haskell syb
|
||||
];
|
||||
executableHaskellDepends = [
|
||||
ansi-wl-pprint base containers data-fix deepseq optparse-applicative
|
||||
text transformers unordered-containers template-haskell
|
||||
];
|
||||
testHaskellDepends = [
|
||||
base containers data-fix directory filepath Glob split tasty
|
||||
tasty-hunit tasty-th text transformers interpolate
|
||||
];
|
||||
benchmarkHaskellDepends = [ base containers criterion text ];
|
||||
homepage = "http://github.com/jwiegley/hnix";
|
||||
description = "Haskell implementation of the Nix language";
|
||||
license = stdenv.lib.licenses.bsd3;
|
||||
};
|
||||
|
||||
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
|
Loading…
Reference in New Issue
Block a user