diff options
author | Silvan Mosberger <infinisil@icloud.com> | 2019-04-28 16:54:32 +0200 |
---|---|---|
committer | Silvan Mosberger <infinisil@icloud.com> | 2019-04-28 16:54:32 +0200 |
commit | adfd54a8f21aec69556b8cf45b3125306769d7ea (patch) | |
tree | 5ef53ac133dbc4a282714455d2bf1c6de4bd7366 /pkgs/development/idris-modules | |
parent | 24f15a7f9e0ffef4e388d101aeec9a6ac0e5728a (diff) | |
download | nixpkgs-adfd54a8f21aec69556b8cf45b3125306769d7ea.tar nixpkgs-adfd54a8f21aec69556b8cf45b3125306769d7ea.tar.gz nixpkgs-adfd54a8f21aec69556b8cf45b3125306769d7ea.tar.bz2 nixpkgs-adfd54a8f21aec69556b8cf45b3125306769d7ea.tar.lz nixpkgs-adfd54a8f21aec69556b8cf45b3125306769d7ea.tar.xz nixpkgs-adfd54a8f21aec69556b8cf45b3125306769d7ea.tar.zst nixpkgs-adfd54a8f21aec69556b8cf45b3125306769d7ea.zip |
idrisPackages.build-idris-package: Install binaries
Diffstat (limited to 'pkgs/development/idris-modules')
-rw-r--r-- | pkgs/development/idris-modules/build-idris-package.nix | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/pkgs/development/idris-modules/build-idris-package.nix b/pkgs/development/idris-modules/build-idris-package.nix index 5e1288685a7..c67d53f8d9c 100644 --- a/pkgs/development/idris-modules/build-idris-package.nix +++ b/pkgs/development/idris-modules/build-idris-package.nix @@ -53,8 +53,20 @@ stdenv.mkDerivation ({ installPhase = '' runHook preInstall + idris --install ${ipkgName}.ipkg --ibcsubdir $out/libs + IDRIS_DOC_PATH=$out/doc idris --installdoc ${ipkgName}.ipkg || true + + # If the ipkg file defines an executable, install that + executable=$(grep -Po '^executable = \K.*' ${ipkgName}.ipkg || true) + # $executable intentionally not quoted because it must be quoted correctly + # in the ipkg file already + if [ ! -z "$executable" ] && [ -f $executable ]; then + mkdir -p $out/bin + mv $executable $out/bin/$executable + fi + runHook postInstall ''; |