Add back *.nix files for the sake of Travis
This commit is contained in:
parent
054eb3ced5
commit
8b47c8b143
2
.gitignore
vendored
2
.gitignore
vendored
|
@ -3,5 +3,3 @@
|
||||||
**/#*
|
**/#*
|
||||||
**/.#*
|
**/.#*
|
||||||
result
|
result
|
||||||
/default.nix
|
|
||||||
/shell.nix
|
|
||||||
|
|
|
@ -4,4 +4,4 @@ env:
|
||||||
|
|
||||||
language: nix
|
language: nix
|
||||||
|
|
||||||
script: nix-build --argstr compiler "$GHCVERSION"
|
script: nix-build build.nix --argstr compiler "$GHCVERSION"
|
||||||
|
|
9
build.nix
Normal file
9
build.nix
Normal file
|
@ -0,0 +1,9 @@
|
||||||
|
{ nixpkgs ? import <nixpkgs> {}, compiler ? null }:
|
||||||
|
let
|
||||||
|
haskellPackages = if compiler == null
|
||||||
|
# use the current default version
|
||||||
|
then nixpkgs.pkgs.haskellPackages
|
||||||
|
else nixpkgs.pkgs.haskell.packages.${compiler};
|
||||||
|
in
|
||||||
|
|
||||||
|
haskellPackages.callPackage ./default.nix {}
|
27
default.nix
Normal file
27
default.nix
Normal file
|
@ -0,0 +1,27 @@
|
||||||
|
{ mkDerivation, ansi-wl-pprint, base, containers, criterion
|
||||||
|
, data-fix, deepseq, deriving-compat, parsers, regex-tdfa
|
||||||
|
, regex-tdfa-text, semigroups, stdenv, tasty, tasty-hunit, tasty-th
|
||||||
|
, text, transformers, trifecta, unordered-containers
|
||||||
|
}:
|
||||||
|
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
|
||||||
|
];
|
||||||
|
executableHaskellDepends = [
|
||||||
|
ansi-wl-pprint base containers data-fix deepseq
|
||||||
|
];
|
||||||
|
testHaskellDepends = [
|
||||||
|
base containers data-fix tasty tasty-hunit tasty-th text
|
||||||
|
];
|
||||||
|
benchmarkHaskellDepends = [ base containers criterion text ];
|
||||||
|
homepage = "http://github.com/jwiegley/hnix";
|
||||||
|
description = "Haskell implementation of the Nix language";
|
||||||
|
license = stdenv.lib.licenses.bsd3;
|
||||||
|
}
|
45
shell.nix
Normal file
45
shell.nix
Normal file
|
@ -0,0 +1,45 @@
|
||||||
|
{ nixpkgs ? import <darwin> {}, compiler ? "default", doBenchmark ? false }:
|
||||||
|
|
||||||
|
let
|
||||||
|
|
||||||
|
inherit (nixpkgs) pkgs;
|
||||||
|
|
||||||
|
f = { mkDerivation, ansi-wl-pprint, base, containers, criterion
|
||||||
|
, data-fix, deepseq, deriving-compat, parsers, regex-tdfa
|
||||||
|
, regex-tdfa-text, semigroups, stdenv, tasty, tasty-hunit, tasty-th
|
||||||
|
, text, transformers, trifecta, unordered-containers
|
||||||
|
}:
|
||||||
|
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
|
||||||
|
];
|
||||||
|
executableHaskellDepends = [
|
||||||
|
ansi-wl-pprint base containers data-fix deepseq
|
||||||
|
];
|
||||||
|
testHaskellDepends = [
|
||||||
|
base containers data-fix tasty tasty-hunit tasty-th text
|
||||||
|
];
|
||||||
|
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 a new issue