diff options
author | Peter Simons <simons@cryp.to> | 2015-09-24 09:48:27 +0200 |
---|---|---|
committer | Peter Simons <simons@cryp.to> | 2015-09-24 09:48:27 +0200 |
commit | aacf6e4a6ba049dbdfedb0ae5929f19011b89386 (patch) | |
tree | 829f3bca410a87cd177e83b8a5c18ba5f9341348 | |
parent | 764a767d5f263e97406c07e6341b387643e1c7ac (diff) | |
parent | 738acf065173e8b123a9ae8d8f3a83eb7ded95ab (diff) |
Merge pull request #10030 from jraygauthier/jrg/smartgit_version_freedesktop_items
smartgithg: 7.0.0 -> 7.0.2
-rw-r--r-- | pkgs/applications/version-management/smartgithg/default.nix | 7 | ||||
-rwxr-xr-x | pkgs/applications/version-management/smartgithg/install_freedesktop_items.sh | 11 |
2 files changed, 16 insertions, 2 deletions
diff --git a/pkgs/applications/version-management/smartgithg/default.nix b/pkgs/applications/version-management/smartgithg/default.nix index 40a3a3f9ae52a..778ae995f3de0 100644 --- a/pkgs/applications/version-management/smartgithg/default.nix +++ b/pkgs/applications/version-management/smartgithg/default.nix @@ -8,11 +8,11 @@ stdenv.mkDerivation rec { name = "smartgithg-${version}"; - version = "7_0_0"; + version = "7_0_2"; src = fetchurl { url = "http://www.syntevo.com/downloads/smartgit/smartgit-generic-${version}.tar.gz"; - sha256 = "099hnpczh2c0s86nsdybymmm4903n0bsjdq1fpdmm0x5w4216iy6"; + sha256 = "1jpi424aqy6niq31j750rgbspwii013c8kbi965i4jzjpba1pagi"; }; buildInputs = [ @@ -23,6 +23,7 @@ stdenv.mkDerivation rec { buildCommand = let pkg_path = "$out/${name}"; bin_path = "$out/bin"; + install_freedesktop_items = ./install_freedesktop_items.sh; runtime_paths = lib.makeSearchPath "bin" [ jre git mercurial subversion @@ -48,6 +49,8 @@ stdenv.mkDerivation rec { --prefix SMARTGITHG_JAVA_HOME : ${jre} patchShebangs $out cp ${bin_path}/smartgit ${bin_path}/smartgithg + + ${install_freedesktop_items} "${pkg_path}/bin" "$out" ''; meta = with stdenv.lib; { diff --git a/pkgs/applications/version-management/smartgithg/install_freedesktop_items.sh b/pkgs/applications/version-management/smartgithg/install_freedesktop_items.sh new file mode 100755 index 0000000000000..66fb0cf8f95a9 --- /dev/null +++ b/pkgs/applications/version-management/smartgithg/install_freedesktop_items.sh @@ -0,0 +1,11 @@ +#!/bin/sh + +inBinDir=$1 +out=$2 + +cat $inBinDir/add-menuitem.sh | \ +sed -re 's#xdg-icon-resource[ ]+install[ ]+--size[ ]+([0-9]+)[ ]+("[^"]+")[ ]+([$0-9a-zA-Z_]+)#mkdir -p '${out}'/share/icons/hicolor/\1x\1/apps \&\& cp \2 '${out}'/share/icons/hicolor/\1x\1/apps/\3\.png #' | \ +sed -re 's#xdg-desktop-menu[ ]+install[ ]+([$0-9a-zA-Z_]+)#mkdir -p '${out}'/share/applications \&\& cp \1 '${out}'/share/applications/#' | \ +sed -re 's#Exec="[^"]+"#Exec=smartgit#' | +sed -re 's#SMARTGIT_BIN=.*#'SMARTGIT_BIN=${inBinDir}'#' \ +| bash |