summary refs log tree commit diff
path: root/pkgs/development/idris-modules/with-packages.nix
blob: 47136839d01abe479ba0bfb79df068ba87ff3ec9 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
# 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
  '';

})