diff options
author | Shea Levy <shea@shealevy.com> | 2018-01-20 19:58:06 -0500 |
---|---|---|
committer | Shea Levy <shea@shealevy.com> | 2018-01-20 19:58:06 -0500 |
commit | 69d4adee1f8b6278a19708a9051f3290f8f13e04 (patch) | |
tree | a28cc915f7bde73df6c5a66e1e7d92106369ac14 /pkgs/development/idris-modules/build-idris-package.nix | |
parent | 58ff18b6b57447b0e972dcfe724713f80e84df07 (diff) | |
download | nixlib-69d4adee1f8b6278a19708a9051f3290f8f13e04.tar nixlib-69d4adee1f8b6278a19708a9051f3290f8f13e04.tar.gz nixlib-69d4adee1f8b6278a19708a9051f3290f8f13e04.tar.bz2 nixlib-69d4adee1f8b6278a19708a9051f3290f8f13e04.tar.lz nixlib-69d4adee1f8b6278a19708a9051f3290f8f13e04.tar.xz nixlib-69d4adee1f8b6278a19708a9051f3290f8f13e04.tar.zst nixlib-69d4adee1f8b6278a19708a9051f3290f8f13e04.zip |
idris: Move library setup to the setup hook.
This was broken in preHook because addEnvHooks isn't defined yet.
Diffstat (limited to 'pkgs/development/idris-modules/build-idris-package.nix')
-rw-r--r-- | pkgs/development/idris-modules/build-idris-package.nix | 27 |
1 files changed, 4 insertions, 23 deletions
diff --git a/pkgs/development/idris-modules/build-idris-package.nix b/pkgs/development/idris-modules/build-idris-package.nix index 66eddd0e3602..0048634f5b45 100644 --- a/pkgs/development/idris-modules/build-idris-package.nix +++ b/pkgs/development/idris-modules/build-idris-package.nix @@ -3,40 +3,21 @@ # args: Additional arguments to pass to mkDerivation. Generally should include at least # name and src. { stdenv, idris, gmp }: args: stdenv.mkDerivation ({ - preHook = '' - # Library import path - export IDRIS_LIBRARY_PATH=$PWD/idris-libs - mkdir -p $IDRIS_LIBRARY_PATH - - # Library install path - export IBCSUBDIR=$out/lib/${idris.name} - mkdir -p $IBCSUBDIR - - addIdrisLibs () { - if [ -d $1/lib/${idris.name} ]; then - ln -sv $1/lib/${idris.name}/* $IDRIS_LIBRARY_PATH - fi - } - - # All run-time deps - addEnvHooks 0 addIdrisLibs - ''; - buildPhase = '' - ${idris}/bin/idris --build *.ipkg + idris --build *.ipkg ''; doCheck = true; checkPhase = '' if grep -q test *.ipkg; then - ${idris}/bin/idris --testpkg *.ipkg + idris --testpkg *.ipkg fi ''; installPhase = '' - ${idris}/bin/idris --install *.ipkg --ibcsubdir $IBCSUBDIR + idris --install *.ipkg --ibcsubdir $IBCSUBDIR ''; - buildInputs = [ gmp ]; + buildInputs = [ gmp idris ]; } // args) |