{ stdenv, fetchurl, bash, pharo-vm, unzip, makeDesktopItem }: stdenv.mkDerivation rec { version = "0.2.4-2015.02.13"; name = "pharo-launcher-${version}"; src = fetchurl { url = "http://files.pharo.org/platform/launcher/blessed/PharoLauncher-user-${version}.zip"; md5 = "064f53cd20c7f189ba2d01f9e4b17d36"; }; executable-name = "pharo-launcher"; desktopItem = makeDesktopItem { name = "Pharo"; exec = "${executable-name}"; icon = "pharo"; comment = "Launcher for Pharo distributions"; desktopName = "Pharo"; genericName = "Pharo"; categories = "Development;"; }; # because upstream tarball has no top-level directory. sourceRoot = "."; buildInputs = [ bash pharo-vm unzip ]; installPhase = '' mkdir -p $prefix/share/pharo-launcher mkdir -p $prefix/bin mv PharoLauncher.image $prefix/share/pharo-launcher/pharo-launcher.image mv PharoLauncher.changes $prefix/share/pharo-launcher/pharo-launcher.changes mkdir -p $prefix/share/applications cp "${desktopItem}/share/applications/"* $out/share/applications cat > $prefix/bin/${executable-name} <