3
0
Fork 0
forked from mirrors/nixpkgs

Add gitg: Gnome GUI for git

This commit is contained in:
Domen Kožar 2014-01-10 16:15:21 +01:00
parent fd0b94dd6a
commit 153b4ccf71
6 changed files with 109 additions and 0 deletions

View file

@ -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;
};
}

View file

@ -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

View file

@ -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; };
@ -74,4 +76,7 @@ rec {
goffice = callPackage ./misc/goffice { };
gitg = callPackage ./misc/gitg { };
libgit2-glib = callPackage ./misc/libgit2-glib { automake = pkgs.automake111x; };
}

View file

@ -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;
};
}

View file

@ -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;
};
}

View file

@ -8045,6 +8045,8 @@ let
python = python27;
};
inherit (gnome3) gitg;
giv = callPackage ../applications/graphics/giv {
pcre = pcre.override { unicodeSupport = true; };
};