summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohn J. Camilleri <john@johnjcamilleri.com>2018-05-03 10:41:59 +0200
committerGitHub <noreply@github.com>2018-05-03 10:41:59 +0200
commiteabaa54a23f1c6bc848b896af1b45badece1d1a9 (patch)
treeac57dd64811e3ec544690ce8ec1a4327db132a33
parentfc61f97a7a9cdadba30da8bd3cac7868d460c4bf (diff)
parent5c73d6d7a9071395abf5a9d63164b421e440de7e (diff)
Merge pull request #14 from mbrock/master
Add a Travis configuration for checking that new commits build correctly
-rw-r--r--.travis.yml2
-rw-r--r--default.nix34
-rw-r--r--gf.nix3
3 files changed, 39 insertions, 0 deletions
diff --git a/.travis.yml b/.travis.yml
new file mode 100644
index 000000000..50d53fc4e
--- /dev/null
+++ b/.travis.yml
@@ -0,0 +1,2 @@
+language: nix
+script: rm -rf .git && nix-build gf.nix
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";
+}
diff --git a/gf.nix b/gf.nix
new file mode 100644
index 000000000..4b7ed2092
--- /dev/null
+++ b/gf.nix
@@ -0,0 +1,3 @@
+let pkgs = import <nixpkgs> {}; in rec {
+ gf = pkgs.haskellPackages.callPackage ./default.nix {};
+}