From f1beac4cd1023cb0d81ef32264fbc781f34f7776 Mon Sep 17 00:00:00 2001 From: Mathew Polzin Date: Fri, 6 Dec 2024 17:49:20 -0600 Subject: [PATCH] idris2Packages.pack: fix runtime building of Idris2 versions --- pkgs/development/compilers/idris2/pack.nix | 28 ++++++++++++++++++++++ 1 file changed, 28 insertions(+) diff --git a/pkgs/development/compilers/idris2/pack.nix b/pkgs/development/compilers/idris2/pack.nix index 7e65a3f73a77..f041e3bce857 100644 --- a/pkgs/development/compilers/idris2/pack.nix +++ b/pkgs/development/compilers/idris2/pack.nix @@ -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";