From c928d1b4bcfa397d597e7c776d280f93bfb0761c Mon Sep 17 00:00:00 2001 From: Luca Bruno Date: Wed, 2 Apr 2014 13:57:33 +0200 Subject: [PATCH] gnome-calculator: new package Application that solves mathematical equations and is suitable as a default application in a Desktop environment https://wiki.gnome.org/action/show/Apps/Calculator --- .../gnome-3/core/gnome-calculator/default.nix | 38 +++++++++++++++++++ pkgs/desktops/gnome-3/default.nix | 2 + 2 files changed, 40 insertions(+) create mode 100644 pkgs/desktops/gnome-3/core/gnome-calculator/default.nix diff --git a/pkgs/desktops/gnome-3/core/gnome-calculator/default.nix b/pkgs/desktops/gnome-3/core/gnome-calculator/default.nix new file mode 100644 index 000000000000..805f0e5276d1 --- /dev/null +++ b/pkgs/desktops/gnome-3/core/gnome-calculator/default.nix @@ -0,0 +1,38 @@ +{ stdenv, intltool, fetchurl, pkgconfig, libxml2 +, bash, gtk3, glib, hicolor_icon_theme, makeWrapper +, itstool, gnome3, librsvg, gdk_pixbuf }: + +stdenv.mkDerivation rec { + name = "gnome-calculator-3.12.0"; + + src = fetchurl { + url = "mirror://gnome/sources/gnome-calculator/3.12/${name}.tar.xz"; + sha256 = "22882c770251203be85f728d73b0d3946728774fd437cf460cd6d958fc4b4dc5"; + }; + + NIX_CFLAGS_COMPILE = "-I${gnome3.glib}/include/gio-unix-2.0"; + + propagatedUserEnvPkgs = [ gnome3.gnome_themes_standard ]; + propagatedBuildInputs = [ gdk_pixbuf gnome3.gnome_icon_theme librsvg + hicolor_icon_theme gnome3.gnome_icon_theme_symbolic ]; + + buildInputs = [ bash pkgconfig gtk3 glib intltool itstool + libxml2 gnome3.gtksourceview + gnome3.gsettings_desktop_schemas makeWrapper ]; + + installFlags = "gsettingsschemadir=\${out}/share/gnome-calculator/glib-2.0/schemas/"; + + postInstall = '' + wrapProgram "$out/bin/gnome-calculator" \ + --set GDK_PIXBUF_MODULE_FILE "$GDK_PIXBUF_MODULE_FILE" \ + --prefix XDG_DATA_DIRS : "${gtk3}/share:${gnome3.gnome_themes_standard}/share:${gnome3.gsettings_desktop_schemas}/share:$out/share:$out/share/gnome-calculator:$XDG_ICON_DIRS" + ''; + + meta = with stdenv.lib; { + homepage = https://wiki.gnome.org/action/show/Apps/Calculator; + description = "Application that solves mathematical equations and is suitable as a default application in a Desktop environment"; + maintainers = with maintainers; [ lethalman ]; + license = licenses.gpl2; + platforms = platforms.linux; + }; +} diff --git a/pkgs/desktops/gnome-3/default.nix b/pkgs/desktops/gnome-3/default.nix index 9e79460ec42d..b46e0821068f 100644 --- a/pkgs/desktops/gnome-3/default.nix +++ b/pkgs/desktops/gnome-3/default.nix @@ -40,6 +40,8 @@ rec { gnome_control_center = callPackage ./core/gnome-control-center { }; + gnome-calculator = callPackage ./core/gnome-calculator { }; + gnome_common = callPackage ./core/gnome-common { }; gnome_icon_theme = callPackage ./core/gnome-icon-theme { };