summaryrefslogtreecommitdiff
path: root/default.nix
diff options
context:
space:
mode:
authorMikael Brockman <mikael@brockman.se>2017-08-21 14:50:38 +0300
committerMikael Brockman <mikael@brockman.se>2017-09-04 19:22:07 +0300
commit5c73d6d7a9071395abf5a9d63164b421e440de7e (patch)
tree03ef386b825f81e373b148691eedd37dc32f1a96 /default.nix
parent08d781833cbe2474d12a54e059eebd6aa139d800 (diff)
Add a Travis configuration for autotesting commits
The configuration uses Nix to install dependencies. I first tried using just Cabal, but compiling all the dependencies takes too long for the free tier of Travis. Nix doesn't compile Hackage dependencies because it has a "binary cache" with compiled versions of almost all Hackage packages. I do not run the GF test suite, because it seems to be in a failing state. This can be enabled later. All of this will only be enabled once the Travis service is set up by someone in the GF team with the permissions to do so. Build results will then be automatically visible on all new commits and pull requests.
Diffstat (limited to 'default.nix')
-rw-r--r--default.nix34
1 files changed, 34 insertions, 0 deletions
diff --git a/default.nix b/default.nix
new file mode 100644
index 000000000..98cae21a4
--- /dev/null
+++ b/default.nix
@@ -0,0 +1,34 @@
+{ mkDerivation, alex, array, base, bytestring, Cabal, cgi
+, containers, directory, exceptions, filepath, happy, haskeline
+, HTF, httpd-shed, HUnit, json, lifted-base, mtl, network
+, network-uri, old-locale, parallel, pretty, process, random
+, stdenv, terminfo, time, time-compat, unix, utf8-string
+}:
+mkDerivation {
+ pname = "gf";
+ version = "3.9";
+ src = ./.;
+ isLibrary = true;
+ isExecutable = true;
+ enableSeparateDataOutput = true;
+ libraryHaskellDepends = [
+ array base bytestring cgi containers directory exceptions filepath
+ haskeline httpd-shed json mtl network network-uri old-locale
+ parallel pretty process random terminfo time time-compat unix
+ utf8-string
+ ];
+ libraryToolDepends = [ alex happy ];
+ executableHaskellDepends = [ base containers lifted-base mtl ];
+ testHaskellDepends = [
+ base Cabal directory filepath HTF HUnit process
+ ];
+ doCheck = false;
+ postPatch = ''
+ sed -i "s|\"-s\"|\"\"|" ./Setup.hs
+ sed -i "s|numJobs (bf bi)++||" ./Setup.hs
+ '';
+ preBuild = ''export LD_LIBRARY_PATH=`pwd`/dist/build:$LD_LIBRARY_PATH'';
+ homepage = "http://www.grammaticalframework.org/";
+ description = "Grammatical Framework";
+ license = "unknown";
+}