1
0
Fork 1
mirror of https://github.com/NixOS/nixpkgs.git synced 2024-12-01 10:00:56 +00:00
nixpkgs/pkgs/development/idris-modules/with-packages.nix
2018-07-02 06:13:01 +02:00

21 lines
455 B
Nix

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