From daffd3c90cc499af9daffbfff1c36ae38e1ad2c5 Mon Sep 17 00:00:00 2001 From: Damien Cassou Date: Tue, 2 Sep 2014 18:34:53 +0200 Subject: [PATCH] New package: pharo launcher http://pharo.org Closes #4315 --- pkgs/development/pharo/launcher/default.nix | 71 +++++++++++++++++++++ pkgs/top-level/all-packages.nix | 1 + 2 files changed, 72 insertions(+) create mode 100644 pkgs/development/pharo/launcher/default.nix 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} <