From df31ab241b91975d7da48859d8bbf6ecb5bb1adf Mon Sep 17 00:00:00 2001 From: odanoburu Date: Sat, 11 Aug 2018 22:02:08 -0300 Subject: [PATCH 1/5] (#5) add travis CI with docker dependencies are preinstalled in docker image for faster build, but this means we need to update it whenever dependencies change --- .travis.yml | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/.travis.yml b/.travis.yml index 50d53fc4e..69f4313ba 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 /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'" From 4038546321965f4c9c793796873cdbc1fd759893 Mon Sep 17 00:00:00 2001 From: odanoburu Date: Sat, 11 Aug 2018 22:07:53 -0300 Subject: [PATCH 2/5] (#5) no need for make install --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 69f4313ba..58fee17e0 100644 --- a/.travis.yml +++ b/.travis.yml @@ -11,4 +11,4 @@ before_install: script: - | docker run --mount src="$(pwd)",target=/home/gfer,type=bind odanoburu/gf-src /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'" + autoreconf -i && ./configure && make ; cd /home/gfer ; cabal install -fserver -fc-runtime --extra-lib-dirs='/usr/local/lib'" From 29acef41fc841eaab8fd905cbf4b9bbe020aa274 Mon Sep 17 00:00:00 2001 From: odanoburu Date: Sat, 11 Aug 2018 22:11:27 -0300 Subject: [PATCH 3/5] (#5) specify image version --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 58fee17e0..abc7c4a7a 100644 --- a/.travis.yml +++ b/.travis.yml @@ -10,5 +10,5 @@ before_install: script: - | - docker run --mount src="$(pwd)",target=/home/gfer,type=bind odanoburu/gf-src /bin/bash -c "cd /home/gfer/src/runtime/c && + 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 ; cd /home/gfer ; cabal install -fserver -fc-runtime --extra-lib-dirs='/usr/local/lib'" From dce81dc0eceed0bc40aedd6d7f164a80c3103224 Mon Sep 17 00:00:00 2001 From: odanoburu Date: Sat, 11 Aug 2018 22:16:28 -0300 Subject: [PATCH 4/5] (#5) reintroduce make install --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index abc7c4a7a..0ca0794b0 100644 --- a/.travis.yml +++ b/.travis.yml @@ -11,4 +11,4 @@ before_install: 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 ; cd /home/gfer ; cabal install -fserver -fc-runtime --extra-lib-dirs='/usr/local/lib'" + autoreconf -i && ./configure && make && make install ; cd /home/gfer ; cabal install -fserver -fc-runtime --extra-lib-dirs='/usr/local/lib'" From 64ccc424cfa65e2e94f3d01dcc880e3dbde96968 Mon Sep 17 00:00:00 2001 From: odanoburu Date: Sat, 11 Aug 2018 22:44:45 -0300 Subject: [PATCH 5/5] (#5) rm files from nix build --- default.nix | 34 ---------------------------------- gf.nix | 19 ------------------- 2 files changed, 53 deletions(-) delete mode 100644 default.nix delete mode 100644 gf.nix 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 {}; - - # - # 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) {}; -}