summary refs log blame commit diff
path: root/pkgs/development/idris-modules/build-idris-package.nix
blob: 0048634f5b45cc55e0bd743ff22d183dd9049b20 (plain) (tree)
1
2
3
4
5
6
7




                                                                                       
                 
                        





                                
                            



                   
                                                 
     
 
                              
          
# 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)