mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-12-24 19:08:30 +00:00
947e7d80b4
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.
21 lines
433 B
Nix
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
|
|
'';
|
|
|
|
}
|