2015-11-27 19:17:17 +01:00
|
|
|
# Build an idris package
|
|
|
|
#
|
|
|
|
# args: Additional arguments to pass to mkDerivation. Generally should include at least
|
|
|
|
# name and src.
|
|
|
|
{ stdenv, idris, gmp }: args: stdenv.mkDerivation ({
|
2015-11-27 15:35:59 +01:00
|
|
|
buildPhase = ''
|
2018-01-21 01:58:06 +01:00
|
|
|
idris --build *.ipkg
|
2015-11-27 15:35:59 +01:00
|
|
|
'';
|
|
|
|
|
|
|
|
doCheck = true;
|
|
|
|
|
|
|
|
checkPhase = ''
|
|
|
|
if grep -q test *.ipkg; then
|
2018-01-21 01:58:06 +01:00
|
|
|
idris --testpkg *.ipkg
|
2015-11-27 15:35:59 +01:00
|
|
|
fi
|
|
|
|
'';
|
|
|
|
|
|
|
|
installPhase = ''
|
2018-01-21 01:58:06 +01:00
|
|
|
idris --install *.ipkg --ibcsubdir $IBCSUBDIR
|
2015-11-27 15:35:59 +01:00
|
|
|
'';
|
2015-11-27 17:03:04 +01:00
|
|
|
|
2018-01-21 01:58:06 +01:00
|
|
|
buildInputs = [ gmp idris ];
|
2015-11-27 19:17:17 +01:00
|
|
|
} // args)
|