2020-04-24 23:36:52 +00:00
|
|
|
# Build a version of idris with a set of packages visible
|
|
|
|
# packages: The packages visible to idris
|
2021-02-05 17:12:51 +00:00
|
|
|
{ lib, idris, symlinkJoin, makeWrapper }: packages:
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2021-02-05 17:12:51 +00:00
|
|
|
let paths = lib.closePropagation packages;
|
2020-04-24 23:36:52 +00:00
|
|
|
in
|
2021-02-05 17:12:51 +00:00
|
|
|
lib.appendToName "with-packages" (symlinkJoin {
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
inherit (idris) name;
|
|
|
|
|
|
|
|
paths = paths ++ [idris] ;
|
|
|
|
|
2022-09-09 14:08:57 +00:00
|
|
|
nativeBuildInputs = [ makeWrapper ];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
postBuild = ''
|
|
|
|
wrapProgram $out/bin/idris \
|
|
|
|
--set IDRIS_LIBRARY_PATH $out/libs
|
|
|
|
'';
|
|
|
|
|
|
|
|
})
|