2015-11-27 10:17:17 -08:00
|
|
|
# Build a version of idris with a set of packages visible
|
|
|
|
# packages: The packages visible to idris
|
2017-11-06 10:18:59 -08:00
|
|
|
{ stdenv, idris, symlinkJoin, makeWrapper }: packages:
|
2015-11-27 04:56:11 -08:00
|
|
|
|
2017-11-06 10:18:59 -08:00
|
|
|
let paths = stdenv.lib.closePropagation packages;
|
|
|
|
in
|
2018-05-25 02:21:47 -07:00
|
|
|
stdenv.lib.appendToName "with-packages" (symlinkJoin {
|
2015-11-27 06:35:59 -08:00
|
|
|
|
2018-05-25 02:21:47 -07:00
|
|
|
inherit (idris) name;
|
2015-11-27 06:35:59 -08:00
|
|
|
|
2017-11-06 10:18:59 -08:00
|
|
|
paths = paths ++ [idris] ;
|
2015-11-27 06:35:59 -08:00
|
|
|
|
2017-11-06 10:18:59 -08:00
|
|
|
buildInputs = [ makeWrapper ];
|
2015-11-27 04:56:11 -08:00
|
|
|
|
2017-11-06 10:18:59 -08:00
|
|
|
postBuild = ''
|
|
|
|
wrapProgram $out/bin/idris \
|
|
|
|
--set IDRIS_LIBRARY_PATH $out/libs
|
2018-07-01 20:18:08 -07:00
|
|
|
'';
|
2015-11-27 04:56:11 -08:00
|
|
|
|
2018-05-25 02:21:47 -07:00
|
|
|
})
|