[Nix-dev] smartgithg: new package

John Kennerson nobody at isis.cpunk.us
Mon Sep 8 03:57:18 CEST 2014


smartgithg: new package
---

diff --git a/pkgs/applications/version-management/smartgithg/default.nix b/pkgs/applications/version-management/smartgithg/default.nix
new file mode 100644
index 0000000..c62a5a8
--- /dev/null
+++ b/pkgs/applications/version-management/smartgithg/default.nix
@@ -0,0 +1,58 @@
+{ stdenv, fetchurl, lib, makeWrapper
+, jdk
+, gtk, glib
+, libXtst
+, git, mercurial, subversion
+, which
+}:
+
+let
+  the_version = "6_0_6";
+
+in
+
+stdenv.mkDerivation rec {
+  name = "smartgithg-${the_version}";
+
+  src = fetchurl {
+    url = "http://www.syntevo.com/download/smartgithg/" +
+          "smartgithg-generic-${the_version}.tar.gz";
+    sha256 = "13e41560138ef18395fbe0bf56d4d29e8614eee004d51d7dd03381080d8426e6";
+  };
+
+  buildInputs = [
+    makeWrapper
+    jdk
+  ];
+
+  buildCommand = let
+    pkg_path = "$out/${name}";
+    bin_path = "$out/bin";
+    runtime_paths = lib.makeSearchPath "bin" [
+      jdk
+      git mercurial subversion
+      which
+    ];
+    runtime_lib_paths = lib.makeLibraryPath [
+      gtk glib
+      libXtst
+    ];
+  in ''
+    tar xvzf $src
+    mkdir -pv $out
+    # unpacking should have produced a dir named ${name}
+    cp -a ${name} $out
+    mkdir -pv ${bin_path}
+    makeWrapper ${pkg_path}/bin/smartgithg.sh ${bin_path}/smartgithg \
+      --prefix PATH : ${runtime_paths} \
+      --prefix LD_LIBRARY_PATH : ${runtime_lib_paths} \
+      --prefix JDK_HOME : ${jdk}/lib/openjdk
+    patchShebangs $out
+  '';
+
+  meta = {
+    description = "GUI for Git, Mercurial, Subversion";
+    homepage = http://www.syntevo.com/smartgithg/;
+    license = stdenv.lib.licenses.unfree;
+  };
+}
diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix
index aeddc08..12ff576 100644
--- a/pkgs/top-level/all-packages.nix
+++ b/pkgs/top-level/all-packages.nix
@@ -9893,6 +9893,8 @@ let
     libpng = libpng12;
   };
 
+  smartgithg = callPackage ../applications/version-management/smartgithg { };
+
   smartdeblur = callPackage ../applications/graphics/smartdeblur { };
 
   snd = callPackage ../applications/audio/snd { };



More information about the nix-dev mailing list