{ stdenv, fetchurl, bash, pharo-vm, unzip, makeDesktopItem }: stdenv.mkDerivation rec { version = "0.2.7-2015.04.20"; name = "pharo-launcher-${version}"; src = fetchurl { url = "http://files.pharo.org/platform/launcher/blessed/PharoLauncher-user-${version}.zip"; sha256 = "0qz8469hadlv6mj8b0hp0jas153alwmja7fr4099jv1b0sx4s0kf"; }; 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} <