2015-11-27 19:17:17 +01:00
|
|
|
# Build a version of idris with a set of packages visible
|
|
|
|
# packages: The packages visible to idris
|
2017-11-06 19:18:59 +01:00
|
|
|
{ stdenv, idris, symlinkJoin, makeWrapper }: packages:
|
2015-11-27 13:56:11 +01:00
|
|
|
|
2017-11-06 19:18:59 +01:00
|
|
|
let paths = stdenv.lib.closePropagation packages;
|
|
|
|
in
|
|
|
|
symlinkJoin {
|
2015-11-27 15:35:59 +01:00
|
|
|
|
2017-11-06 19:18:59 +01:00
|
|
|
name = idris.name + "-with-packages";
|
2015-11-27 15:35:59 +01:00
|
|
|
|
2017-11-06 19:18:59 +01:00
|
|
|
paths = paths ++ [idris] ;
|
2015-11-27 15:35:59 +01:00
|
|
|
|
2017-11-06 19:18:59 +01:00
|
|
|
buildInputs = [ makeWrapper ];
|
2015-11-27 13:56:11 +01:00
|
|
|
|
2017-11-06 19:18:59 +01:00
|
|
|
postBuild = ''
|
|
|
|
wrapProgram $out/bin/idris \
|
|
|
|
--set IDRIS_LIBRARY_PATH $out/libs
|
|
|
|
'';
|
2015-11-27 13:56:11 +01:00
|
|
|
|
|
|
|
}
|