Skip to content

Commit

Permalink
Add gitg: Gnome GUI for git
Browse files Browse the repository at this point in the history
  • Loading branch information
domenkozar committed Jan 10, 2014
1 parent fd0b94d commit 153b4cc
Show file tree
Hide file tree
Showing 6 changed files with 109 additions and 0 deletions.
18 changes: 18 additions & 0 deletions pkgs/desktops/gnome-3/core/libgee/default.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
{ stdenv, fetchurl, autoconf, vala, pkgconfig, glib, gobjectIntrospection }:

stdenv.mkDerivation rec {
name = "libgee-0.13.4";

src = fetchurl {
url = "https://download.gnome.org/sources/libgee/0.13/${name}.tar.xz";
sha256 = "1gzyx8gy5m6r8km3xbb1kszz0v3p9vsbzwb78pf3fw122gwbjj4k";
};

patches = [ ./fix_introspection_paths.patch ];

buildInputs = [ autoconf vala pkgconfig glib gobjectIntrospection ];

meta = with stdenv.lib; {
platforms = platforms.linux;
};
}
13 changes: 13 additions & 0 deletions pkgs/desktops/gnome-3/core/libgee/fix_introspection_paths.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
--- fix_introspection_paths.patch/configure 2014-01-07 17:43:53.521339338 +0000
+++ fix_introspection_paths.patch/configure-fix 2014-01-07 17:45:11.068635069 +0000
@@ -12085,8 +12085,8 @@
INTROSPECTION_SCANNER=`$PKG_CONFIG --variable=g_ir_scanner gobject-introspection-1.0`
INTROSPECTION_COMPILER=`$PKG_CONFIG --variable=g_ir_compiler gobject-introspection-1.0`
INTROSPECTION_GENERATE=`$PKG_CONFIG --variable=g_ir_generate gobject-introspection-1.0`
- INTROSPECTION_GIRDIR=`$PKG_CONFIG --variable=girdir gobject-introspection-1.0`
- INTROSPECTION_TYPELIBDIR="$($PKG_CONFIG --variable=typelibdir gobject-introspection-1.0)"
+ INTROSPECTION_GIRDIR="${datadir}/gir-1.0"
+ INTROSPECTION_TYPELIBDIR="${libdir}/girepository-1.0"
INTROSPECTION_CFLAGS=`$PKG_CONFIG --cflags gobject-introspection-1.0`
INTROSPECTION_LIBS=`$PKG_CONFIG --libs gobject-introspection-1.0`
INTROSPECTION_MAKEFILE=`$PKG_CONFIG --variable=datadir gobject-introspection-1.0`/gobject-introspection-1.0/Makefile.introspection
5 changes: 5 additions & 0 deletions pkgs/desktops/gnome-3/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,8 @@ rec {

libcroco = callPackage ./core/libcroco {};

libgee = callPackage ./core/libgee { };

libpeas = callPackage ./core/libpeas {};

libgweather = callPackage ./core/libgweather { libsoup = pkgs.libsoup_2_44; };
Expand Down Expand Up @@ -74,4 +76,7 @@ rec {

goffice = callPackage ./misc/goffice { };

gitg = callPackage ./misc/gitg { };

libgit2-glib = callPackage ./misc/libgit2-glib { automake = pkgs.automake111x; };
}
50 changes: 50 additions & 0 deletions pkgs/desktops/gnome-3/misc/gitg/default.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
{ stdenv, fetchurl, fetchgit, vala, intltool, libgit2, pkgconfig, gtk3, glib
, json_glib, webkitgtk, makeWrapper, libpeas, bash, gobjectIntrospection
, gnome3, gtkspell3, shared_mime_info, libgee, libgit2-glib }:

# TODO: icons and theme still does not work
# use packaged gnome3.gnome_icon_theme_symbolic

stdenv.mkDerivation rec {
name = "gitg-0.3.2";

src = fetchurl {
url = "https://download.gnome.org/sources/gitg/0.3/${name}.tar.xz";
sha256 = "03vc59d1r3326piqdph6qjqnc40chm1lpg52lpf8466ddjs0x8vp";
};

configureFlags = [ "--disable-static" ];

preCheck = ''
substituteInPlace tests/libgitg/test-commit.c --replace "/bin/bash" "${bash}/bin/bash"
'';
doCheck = true;

makeFlags = "INTROSPECTION_GIRDIR=$(out)/share/gir-1.0/ INTROSPECTION_TYPELIBDIR=$(out)/lib/girepository-1.0";

propagatedUserEnvPkgs = [ shared_mime_info
gnome3.gnome_themes_standard ];

buildInputs = [ vala intltool libgit2 pkgconfig gtk3 glib json_glib webkitgtk libgee libpeas
libgit2-glib gtkspell3 gnome3.gsettings_desktop_schemas gnome3.gtksourceview
gobjectIntrospection makeWrapper ];

postInstall = ''
wrapProgram "$out/bin/gitg" \
--prefix GI_TYPELIB_PATH : "$GI_TYPELIB_PATH" \
--prefix XDG_DATA_DIRS : "${gtk3}/share:${gnome3.gnome_themes_standard}/share:${gnome3.gsettings_desktop_schemas}/share:$out/share"
'';

preFixup = ''
rm $out/share/icons/hicolor/icon-theme.cache
rm $out/share/gitg/icons/hicolor/icon-theme.cache
'';

meta = with stdenv.lib; {
homepage = https://wiki.gnome.org/action/show/Apps/Gitg;
description = "GNOME GUI client to view git repositories";
maintainers = with maintainers; [ iElectric ];
license = licenses.gpl2;
platforms = platforms.linux;
};
}
21 changes: 21 additions & 0 deletions pkgs/desktops/gnome-3/misc/libgit2-glib/default.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
{ stdenv, fetchurl, which, gnome3, autoconf, automake, libtool, pkgconfig
, gtk_doc, gobjectIntrospection, libgit2, glib }:

stdenv.mkDerivation rec {
name = "libgit2-glib-${version}";
version = "0.0.10";

src = fetchurl {
url = "https://github.com/GNOME/libgit2-glib/archive/v${version}.tar.gz";
sha256 = "0zn3k85jw6yks8s5ca8dyh9mwh4if1lni9gz9bd5lqlpa803ixxs";
};

configureScript = "sh ./autogen.sh";

buildInputs = [ which gnome3.gnome_common autoconf automake libtool
pkgconfig gtk_doc gobjectIntrospection libgit2 glib ];

meta = with stdenv.lib; {
platforms = platforms.linux;
};
}
2 changes: 2 additions & 0 deletions pkgs/top-level/all-packages.nix
Original file line number Diff line number Diff line change
Expand Up @@ -8045,6 +8045,8 @@ let
python = python27;
};

inherit (gnome3) gitg;

giv = callPackage ../applications/graphics/giv {
pcre = pcre.override { unicodeSupport = true; };
};
Expand Down

0 comments on commit 153b4cc

Please sign in to comment.