summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohn J. Camilleri <john@johnjcamilleri.com>2018-08-13 08:46:09 +0200
committerGitHub <noreply@github.com>2018-08-13 08:46:09 +0200
commit50e1e7b17e3d04eac37199fd063613dce5a70f40 (patch)
treedaf6d6e7149a95348b2cc62cfdf112cfbf2efa12
parentf1803a2f16013b093058424c58a3a1d164d29905 (diff)
parent64ccc424cfa65e2e94f3d01dcc880e3dbde96968 (diff)
Merge pull request #7 from odanoburu/travis-ci
add travis ci
-rw-r--r--.travis.yml16
-rw-r--r--default.nix34
-rw-r--r--gf.nix19
3 files changed, 14 insertions, 55 deletions
diff --git a/.travis.yml b/.travis.yml
index 50d53fc4e..0ca0794b0 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -1,2 +1,14 @@
-language: nix
-script: rm -rf .git && nix-build gf.nix
+sudo: required
+
+language: c
+
+services:
+ - docker
+
+before_install:
+ - docker pull odanoburu/gf-src:3.9
+
+script:
+ - |
+ docker run --mount src="$(pwd)",target=/home/gfer,type=bind odanoburu/gf-src:3.9 /bin/bash -c "cd /home/gfer/src/runtime/c &&
+ autoreconf -i && ./configure && make && make install ; cd /home/gfer ; cabal install -fserver -fc-runtime --extra-lib-dirs='/usr/local/lib'"
diff --git a/default.nix b/default.nix
deleted file mode 100644
index bfa85ab7c..000000000
--- a/default.nix
+++ /dev/null
@@ -1,34 +0,0 @@
-{ mkDerivation, alex, array, base, bytestring, Cabal, cgi
-, containers, directory, exceptions, filepath, happy, haskeline
-, HTF, httpd-shed, HUnit, json, 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 ];
- 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
deleted file mode 100644
index 2926651f3..000000000
--- a/gf.nix
+++ /dev/null
@@ -1,19 +0,0 @@
-let
- # We import the package hierarchy from the NIX_PATH.
- pkgs = import <nixpkgs> {};
-
- #
- # The `cgi` package has some out-of-date upper bounds.
- # Instead of fixing that upstream, we can use the "jailbreak"
- # function in Nix, which patches away the upper bounds.
- #
- # This isn't ideal, but it lets us build the dependency.
- #
- jailbreak = pkgs.haskell.lib.doJailbreak;
- haskellPackages = pkgs.haskellPackages.extend (self: super: {
- cgi = jailbreak super.cgi;
- });
-
-in {
- gf = haskellPackages.callPackage (import ./default.nix) {};
-}