2015-11-27 18:17:17 +00: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 14:35:59 +00:00
|
|
|
buildPhase = ''
|
2018-01-21 00:58:06 +00:00
|
|
|
idris --build *.ipkg
|
2015-11-27 14:35:59 +00:00
|
|
|
'';
|
|
|
|
|
|
|
|
doCheck = true;
|
|
|
|
|
|
|
|
checkPhase = ''
|
|
|
|
if grep -q test *.ipkg; then
|
2018-01-21 00:58:06 +00:00
|
|
|
idris --testpkg *.ipkg
|
2015-11-27 14:35:59 +00:00
|
|
|
fi
|
|
|
|
'';
|
|
|
|
|
|
|
|
installPhase = ''
|
2018-01-21 00:58:06 +00:00
|
|
|
idris --install *.ipkg --ibcsubdir $IBCSUBDIR
|
2015-11-27 14:35:59 +00:00
|
|
|
'';
|
2015-11-27 16:03:04 +00:00
|
|
|
|
2018-01-21 00:58:06 +00:00
|
|
|
buildInputs = [ gmp idris ];
|
2015-11-27 18:17:17 +00:00
|
|
|
} // args)
|