git.iko.soy/typeable/nixpkgs
on master help sign in
Adds a new package: cherrytree - A hierarchical note taking application

cherrytree - A hierarchical note taking application, featuring rich text and syntax highlighting, storing data in a single xml or sqlite file. This commit also adds PyGtkSourceView - a Python wrapper for the GtkSourceView widget library. Official page http://www.giuspen.com/cherrytree

commit9f623a820d75de957158afd4c2181012cea8baf4 authorAndrey Arapov <arno@nixaid.com> dateSat 31 Jan 2015, 02:17 (12 years ago) parent0b9e2f8
6 files changed+97
pkgs/applications/misc/cherrytree/default.nix+36 pkgs/applications/misc/cherrytree/subprocess.patch+15 pkgs/development/python-modules/pygtksourceview/codegendir.patch+25 pkgs/development/python-modules/pygtksourceview/default.nix+16 pkgs/top-level/all-packages.nix+4 pkgs/top-level/release-python.nix+1
pkgs/applications/misc/cherrytree/default.nixnew file+36
@@ -0,0 +1,36 @@
1+{ stdenv, fetchurl, python, pythonPackages, gettext, pygtksourceview, sqlite }:
2+
3+stdenv.mkDerivation rec {
4+ name = "cherrytree-0.35.6";
5+
6+ src = fetchurl {
7+ url = "http://www.giuspen.com/software/${name}.tar.xz";
8+ sha256 = "1nfrnnwaxb07jf5c3id8zimr3q3rbhvzjlmpb99d41d7hqrd2bxj";
9+ };
10+
11+ propagatedBuildInputs = [ pythonPackages.sqlite3 ];
12+
13+ buildInputs = with pythonPackages; [ python gettext wrapPython pygtk dbus pygtksourceview ];
14+
15+ pythonPath = with pythonPackages; [ pygtk dbus pygtksourceview ];
16+
17+ patches = [ ./subprocess.patch ];
18+
19+ installPhase = ''
20+ python setup.py install --prefix="$out"
21+
22+ for file in "$out"/bin/*; do
23+ wrapProgram "$file" \
24+ --prefix PYTHONPATH : "$(toPythonPath $out):$PYTHONPATH"
25+ done
26+ '';
27+
28+ doCheck = false;
29+
30+ meta = {
31+ description = "A hierarchical note taking application, featuring rich text and syntax highlighting, storing data in a single xml or sqlite file";
32+ homepage = http://www.giuspen.com/cherrytree;
33+ license = stdenv.lib.licenses.gpl3;
34+ platforms = with stdenv.lib.platforms; linux;
35+ };
36+}
pkgs/applications/misc/cherrytree/subprocess.patchnew file+15
@@ -0,0 +1,15 @@
1+diff -Naur cherrytree-0.35.6-orig/setup.py cherrytree-0.35.6/setup.py
2+--- cherrytree-0.35.6-orig/setup.py 2014-05-30 23:25:11.000000000 +0200
3++++ cherrytree-0.35.6/setup.py 2015-01-29 07:35:32.785904009 +0100
4+@@ -205,4 +205,9 @@
5+ },
6+ distclass=CherryTreeDist
7+ )
8+- subprocess.call("update-desktop-database")
9++ try:
10++ subprocess.check_call(['update-desktop-database'])
11++ except subprocess.CalledProcessError:
12++ pass # handle errors in the called executable
13++ except OSError:
14++ pass # executable not found
15+
pkgs/development/python-modules/pygtksourceview/codegendir.patchnew file+25
@@ -0,0 +1,25 @@
1+diff -Nur pygtksourceview-2.10.1-orig/configure pygtksourceview-2.10.1/configure
2+--- pygtksourceview-2.10.1-orig/configure 2010-04-18 15:29:55.000000000 +0200
3++++ pygtksourceview-2.10.1/configure 2015-01-30 20:36:31.784541887 +0100
4+@@ -12950,7 +12950,7 @@
5+
6+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pygtk codegen" >&5
7+ $as_echo_n "checking for pygtk codegen... " >&6; }
8+-CODEGENDIR=`$PKG_CONFIG --variable=codegendir pygtk-2.0`
9++CODEGENDIR=`$PKG_CONFIG --variable=codegendir pygobject-2.0`
10+ echo $CODEGENDIR
11+ if test -f $CODEGENDIR/codegen.py; then
12+ CODEGEN=$CODEGENDIR/codegen.py
13+diff -Nur pygtksourceview-2.10.1-orig/configure.ac pygtksourceview-2.10.1/configure.ac
14+--- pygtksourceview-2.10.1-orig/configure.ac 2010-04-18 15:28:39.000000000 +0200
15++++ pygtksourceview-2.10.1/configure.ac 2015-01-30 20:36:42.781648830 +0100
16+@@ -116,7 +116,7 @@
17+
18+ dnl codegen
19+ AC_MSG_CHECKING(for pygtk codegen)
20+-CODEGENDIR=`$PKG_CONFIG --variable=codegendir pygtk-2.0`
21++CODEGENDIR=`$PKG_CONFIG --variable=codegendir pygobject-2.0`
22+ echo $CODEGENDIR
23+ if test -f $CODEGENDIR/codegen.py; then
24+ CODEGEN=$CODEGENDIR/codegen.py
25+
pkgs/development/python-modules/pygtksourceview/default.nixnew file+16
@@ -0,0 +1,16 @@
1+{ stdenv, fetchurl, python, pkgconfig, pygobject, glib, pygtk, gnome2 }:
2+
3+let version = "2.10.1"; in
4+
5+stdenv.mkDerivation {
6+ name = "pygtksourceview-${version}";
7+
8+ src = fetchurl {
9+ url = "http://ftp.gnome.org/pub/gnome/sources/pygtksourceview/2.10/pygtksourceview-${version}.tar.bz2";
10+ sha256 = "0x2r9k547ad68sfddr5am341ap6zvy8k0rh3rd0n38k7xdd7rd5l";
11+ };
12+
13+ patches = [ ./codegendir.patch ];
14+
15+ buildInputs = [ python pkgconfig pygobject glib pygtk gnome2.gtksourceview ];
16+}
pkgs/top-level/all-packages.nix+4
@@ -691,6 +691,8 @@ let
691691
692692 corosync = callPackage ../servers/corosync { };
693693
694+ cherrytree = callPackage ../applications/misc/cherrytree { };
695+
694696 chntpw = callPackage ../tools/security/chntpw { };
695697
696698 coprthr = callPackage ../development/libraries/coprthr {
@@ -7696,6 +7698,8 @@ let
76967698
76977699 pygtk = pythonPackages.pygtk;
76987700
7701+ pygtksourceview = callPackage ../development/python-modules/pygtksourceview { };
7702+
76997703 pyGtkGlade = pythonPackages.pyGtkGlade;
77007704
77017705 pylint = callPackage ../development/python-modules/pylint { };
pkgs/top-level/release-python.nix+1
@@ -38,6 +38,7 @@ let
3838 pygame = { type = "job"; systems = ["x86_64-linux"]; schedulingPriority = 4; };
3939 pygobject = { type = "job"; systems = ["x86_64-linux"]; schedulingPriority = 4; };
4040 pygtk = { type = "job"; systems = ["x86_64-linux"]; schedulingPriority = 4; };
41+ pygtksourceview = { type = "job"; systems = ["x86_64-linux"]; schedulingPriority = 4; };
4142 pyGtkGlade = { type = "job"; systems = ["x86_64-linux"]; schedulingPriority = 4; };
4243 pyIRCt = { type = "job"; systems = ["x86_64-linux"]; schedulingPriority = 4; };
4344 pyMAILt = { type = "job"; systems = ["x86_64-linux"]; schedulingPriority = 4; };