depot/third_party/nixpkgs/pkgs/development/idris-modules/with-packages.nix
Default email ae91cbe6cc Project import generated by Copybara.
GitOrigin-RevId: 536fe36e23ab0fc8b7f35c24603422eee9fc17a2
2021-02-05 18:12:51 +01:00

20 lines
438 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] ;
buildInputs = [ makeWrapper ];
postBuild = ''
wrapProgram $out/bin/idris \
--set IDRIS_LIBRARY_PATH $out/libs
'';
})