Merge pull request #14 from mbrock/master

Add a Travis configuration for checking that new commits build correctly
This commit is contained in:
John J. Camilleri
2018-05-03 10:41:59 +02:00
committed by GitHub
3 changed files with 39 additions and 0 deletions

2
.travis.yml Normal file
View File

@@ -0,0 +1,2 @@
language: nix
script: rm -rf .git && nix-build gf.nix

34
default.nix Normal file
View File

@@ -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";
}

3
gf.nix Normal file
View File

@@ -0,0 +1,3 @@
let pkgs = import <nixpkgs> {}; in rec {
gf = pkgs.haskellPackages.callPackage ./default.nix {};
}