diff --git a/pkgs/applications/graphics/jbrout/default.nix b/pkgs/applications/graphics/jbrout/default.nix new file mode 100644 index 000000000000..7c3826369ee9 --- /dev/null +++ b/pkgs/applications/graphics/jbrout/default.nix @@ -0,0 +1,38 @@ +{ stdenv, fetchsvn, buildPythonPackage, python, pyGtkGlade, makeWrapper, pyexiv2, lxml, pil, fbida, which }: + +buildPythonPackage { + name = "jbrout-338"; + version = "338"; + src = fetchsvn { + url = "http://jbrout.googlecode.com/svn/trunk"; + rev = "338"; + sha256 = "0257ni4vkxgd0qhs73fw5ppw1qpf11j8fgwsqc03b1k1yv3hk4hf"; + }; + + doCheck = false; +# XXX: preConfigure to avoid this +# File "/nix/store/vnyjxn6h3rbrn49m25yyw7i1chlxglhw-python-2.7.1/lib/python2.7/zipfile.py", line 348, in FileHeader +# len(filename), len(extra)) +#struct.error: ushort format requires 0 <= number <= USHRT_MAX + + preConfigure = '' + find | xargs touch + ''; + + postInstall = '' + ensureDir $out/bin + echo '#!/bin/sh' > $out/bin/jbrout + echo "python $out/lib/python2.7/site-packages/jbrout-src-py2.7.egg/jbrout/jbrout.py" >> $out/bin/jbrout + chmod +x $out/bin/jbrout + + wrapProgram $out/bin/jbrout \ + --set PYTHONPATH "$out/lib/python:$(toPythonPath ${pyGtkGlade})/gtk-2.0:$(toPythonPath ${pyexiv2}):$(toPythonPath ${lxml}):$(toPythonPath ${pil}):$PYTHONPATH" \ + --set PATH "${fbida}/bin:${which}/bin:$PATH" + ''; + + buildInputs = [ python pyGtkGlade makeWrapper pyexiv2 lxml pil fbida which ]; + meta = { + homepage = "http://code.google.com/p/jbrout"; + description = "jBrout is a photo manager"; + }; +} diff --git a/pkgs/development/python-modules/pyexiv2/default.nix b/pkgs/development/python-modules/pyexiv2/default.nix new file mode 100644 index 000000000000..ab086aed3bf9 --- /dev/null +++ b/pkgs/development/python-modules/pyexiv2/default.nix @@ -0,0 +1,23 @@ +{ stdenv, fetchurl, python, exiv2, scons, boost }: + +let version = "0.3.0"; in + +stdenv.mkDerivation { + name = "pyexiv2-${version}"; + + src = fetchurl { + url = "http://launchpad.net/pyexiv2/0.3.x/0.3/+download/pyexiv2-0.3.0.tar.bz2"; + sha256 = "1y7r2z0ja166cx8fmykq7gaif02drknqqbxaf18fhv9nmgz4jrg9"; + }; + + buildPhase = '' + sed -i -e "s@env = Environment()@env = Environment( ENV = os.environ )@" src/SConscript + scons + ''; + installPhase = '' + sed -i -e "s@ python_lib_path = get_python_lib(plat_specific=True)@ python_lib_path = \'/lib/python2.7/site-packages\'@" src/SConscript + scons install DESTDIR=$out + ''; + + buildInputs = [ python exiv2 scons boost ]; +} diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index d5af3c179c54..ca90a6f1b806 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -4709,6 +4709,8 @@ let pycups = callPackage ../development/python-modules/pycups { }; + pyexiv2 = callPackage ../development/python-modules/pyexiv2 { }; + pygame = callPackage ../development/python-modules/pygame { }; pygobject = callPackage ../development/python-modules/pygobject { }; @@ -6765,6 +6767,10 @@ let joe = callPackage ../applications/editors/joe { }; + jbrout = callPackage ../applications/graphics/jbrout { + inherit (pythonPackages) lxml; + }; + jwm = callPackage ../applications/window-managers/jwm { }; k3b = newScope pkgs.kde4 ../applications/misc/k3b { };