diff --git a/pkgs/development/pharo/launcher/default.nix b/pkgs/development/pharo/launcher/default.nix new file mode 100644 index 000000000000..928a5d33f8f4 --- /dev/null +++ b/pkgs/development/pharo/launcher/default.nix @@ -0,0 +1,71 @@ +{ stdenv, fetchurl, bash, pharo-vm, unzip, makeDesktopItem }: + +stdenv.mkDerivation rec { + version = "0.2.1-2014.09.29"; + name = "pharo-launcher-${version}"; + src = fetchurl { + url = "http://files.pharo.org/platform/launcher/blessed/PharoLauncher-user-${version}.zip"; + md5 = "10945989c2b323c7f09a3b4e42ee7f2d"; + }; + + 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} <