idris2Packages.pack: fix runtime building of Idris2 versions

This commit is contained in:
Mathew Polzin 2024-12-06 17:49:20 -06:00
parent 2a5ea00280
commit f1beac4cd1

View File

@ -2,6 +2,12 @@
lib,
idris2Packages,
fetchFromGitHub,
clang,
chez,
gmp,
zsh,
makeBinaryWrapper,
stdenv,
}:
let
inherit (idris2Packages) idris2Api buildIdris;
@ -42,6 +48,28 @@ let
filepath
];
nativeBuildInputs = [ makeBinaryWrapper ];
buildInputs = [
gmp
clang
chez
] ++ lib.optionals stdenv.hostPlatform.isDarwin [ zsh ];
postInstall = ''
wrapProgram $out/bin/pack \
--suffix C_INCLUDE_PATH : ${lib.makeIncludePath [ gmp ]} \
--suffix PATH : ${
lib.makeBinPath (
[
clang
chez
]
++ lib.optionals stdenv.hostPlatform.isDarwin [ zsh ]
)
}
'';
meta = {
description = "An Idris2 Package Manager with Curated Package Collections";
mainProgram = "pack";