diff options
Diffstat (limited to 'pkgs/development/idris-modules/build-idris-package.nix')
-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 ''; |