nixpkgs/pkgs/development/idris-modules/with-packages.nix
Matthew Pickering 947e7d80b4 Refactor Idris packaging infrastructure
The main two changes are

1. Completely rewrite how with-packages works to remove use of envHooks
2. The package description is now an idris specific set rather than
    being a subset of the arguments to mkDerivation. This mirrors the
    way Haskell packages are treated.
2018-02-07 19:25:50 +00:00

21 lines
433 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
symlinkJoin {
name = idris.name + "-with-packages";
paths = paths ++ [idris] ;
buildInputs = [ makeWrapper ];
postBuild = ''
wrapProgram $out/bin/idris \
--set IDRIS_LIBRARY_PATH $out/libs
'';
}