mirror of
https://github.com/idris-lang/Idris2.git
synced 2024-12-19 01:01:59 +03:00
7d33c0438a
* don't assume all .so files are the exectuable * don't rebuild support or the compiler if only the buildIdris nix function has changed * fixes to nix buildIdris function
33 lines
755 B
Nix
33 lines
755 B
Nix
{ stdenv, lib, overrideSDK, gmp, idris2Version }:
|
|
let
|
|
stdenv' = if stdenv.isDarwin then overrideSDK stdenv "11.0" else stdenv;
|
|
in
|
|
stdenv'.mkDerivation rec {
|
|
pname = "libidris2_support";
|
|
version = idris2Version;
|
|
|
|
# we don't rebuild Idris when changing the buildIdris nix
|
|
# function:
|
|
src = with lib.fileset; toSource {
|
|
root = ../.;
|
|
fileset = difference ../. ../nix/buildIdris.nix;
|
|
};
|
|
|
|
strictDeps = true;
|
|
buildInputs = [ gmp ];
|
|
|
|
makeFlags = [
|
|
"PREFIX=$(out)"
|
|
] ++ lib.optional stdenv'.isDarwin "OS=";
|
|
|
|
buildFlags = [ "support" ];
|
|
|
|
installTargets = "install-support";
|
|
|
|
postInstall = ''
|
|
mv $out/idris2-${version}/lib $out/lib
|
|
mv $out/idris2-${version}/support $out/share
|
|
rmdir $out/idris2-${version}
|
|
'';
|
|
}
|