Merge pull request #60373 from Infinisil/idris-binaries

idrisPackages.build-idris-package: Install binaries
This commit is contained in:
Silvan Mosberger 2019-05-01 00:28:36 +02:00 committed by GitHub
commit d7d89c5eac
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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
'';