Unverified Commit e014f1e9 authored by Mathew Polzin's avatar Mathew Polzin Committed by GitHub
Browse files

idris2Packages.pack: fix runtime building of Idris2 versions (#362622)

parents 1bb68c7d f1beac4c
Loading
Loading
Loading
Loading
+28 −0
Original line number Diff line number Diff line
@@ -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";