depot/third_party/nixpkgs/pkgs/development/idris-modules/with-packages.nix
Default email b450903751 Project import generated by Copybara.
GitOrigin-RevId: 74a1793c659d09d7cf738005308b1f86c90cb59b
2022-09-09 16:08:57 +02:00

20 lines
444 B
Nix

# Build a version of idris with a set of packages visible
# packages: The packages visible to idris
{ lib, idris, symlinkJoin, makeWrapper }: packages:
let paths = lib.closePropagation packages;
in
lib.appendToName "with-packages" (symlinkJoin {
inherit (idris) name;
paths = paths ++ [idris] ;
nativeBuildInputs = [ makeWrapper ];
postBuild = ''
wrapProgram $out/bin/idris \
--set IDRIS_LIBRARY_PATH $out/libs
'';
})