1
0
Fork 1
mirror of https://github.com/NixOS/nixpkgs.git synced 2024-12-20 21:17:46 +00:00
nixpkgs/pkgs/development/idris-modules/build-idris-package.nix
Shea Levy 69d4adee1f
idris: Move library setup to the setup hook.
This was broken in preHook because addEnvHooks isn't defined yet.
2018-01-20 19:58:06 -05:00

24 lines
472 B
Nix

# 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 ({
buildPhase = ''
idris --build *.ipkg
'';
doCheck = true;
checkPhase = ''
if grep -q test *.ipkg; then
idris --testpkg *.ipkg
fi
'';
installPhase = ''
idris --install *.ipkg --ibcsubdir $IBCSUBDIR
'';
buildInputs = [ gmp idris ];
} // args)