mirror of
https://github.com/idris-lang/Idris2.git
synced 2024-09-11 13:36:08 +03:00
fix macos-nix build where refc support files don't build under default environment anymore (#3246)
This commit is contained in:
parent
1977dbd640
commit
aa3f67cd11
@ -19,9 +19,16 @@ stdenv.mkDerivation rec {
|
||||
++ lib.optional (!bootstrap) [ idris2Bootstrap ];
|
||||
buildInputs = [ chez gmp support ];
|
||||
|
||||
# For bootstrap builds the Makefile will try to
|
||||
# rebuild the support library if we don't patch
|
||||
# bootstrap-install.
|
||||
prePatch = ''
|
||||
patchShebangs --build tests
|
||||
sed 's/$(GIT_SHA1)/${srcRev}/' -i Makefile
|
||||
substituteInPlace Makefile \
|
||||
--replace-fail '$(GIT_SHA1)' '${srcRev}'
|
||||
'' + lib.optionalString bootstrap ''
|
||||
substituteInPlace Makefile \
|
||||
--replace-fail 'bootstrap-install: install-idris2 install-support' 'bootstrap-install: install-idris2'
|
||||
'';
|
||||
|
||||
makeFlags = [ "IDRIS2_SUPPORT_DIR=${supportLibrariesPath}" ]
|
||||
|
@ -1,5 +1,8 @@
|
||||
{ stdenv, lib, gmp, idris2Version }:
|
||||
stdenv.mkDerivation rec {
|
||||
{ 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;
|
||||
|
||||
@ -10,7 +13,7 @@ stdenv.mkDerivation rec {
|
||||
|
||||
makeFlags = [
|
||||
"PREFIX=$(out)"
|
||||
] ++ lib.optional stdenv.isDarwin "OS=";
|
||||
] ++ lib.optional stdenv'.isDarwin "OS=";
|
||||
|
||||
buildFlags = [ "support" ];
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user