diff --git a/pkgs/applications/graphics/mypaint/default.nix b/pkgs/applications/graphics/mypaint/default.nix index a59498b8f1411..4414f64029043 100644 --- a/pkgs/applications/graphics/mypaint/default.nix +++ b/pkgs/applications/graphics/mypaint/default.nix @@ -1,28 +1,70 @@ -{ stdenv, fetchurl, gettext, glib, gtk, json_c, lcms2, libpng -, makeWrapper, pkgconfig, pygtk, python, pythonPackages, scons, swig +{ stdenv, fetchurl, fetchgit, gettext, glib, gtk, gtk3, json_c, lcms2, libpng +, makeWrapper, pkgconfig, pygtk, python, scons, swig + +, pythonPackages, protobuf, gobjectIntrospection, cairo +, version ? "1.1.0" }: -stdenv.mkDerivation rec { - name = "mypaint-${version}"; - version = "1.1.0"; +let + gtk_libs_old = [ glib gtk pygtk ]; + gtk_libs_new = [ glib gtk3 pythonPackages.pygobject3 gobjectIntrospection ]; +in + +stdenv.mkDerivation (stdenv.lib.mergeAttrsByVersion "mypaint" version +{ + "1.1.0" = rec { + name = "mypaint-${version}"; + version = "1.1.0"; + + src = fetchurl { + url = "http://download.gna.org/mypaint/${name}.tar.bz2"; + sha256 = "0f7848hr65h909c0jkcx616flc0r4qh53g3kd1cgs2nr1pjmf3bq"; + }; + buildInputs = gtk_libs_old; + }; + + "git" = { + # REGION AUTO UPDATE: { name="my-paint-git"; type="git"; url="git://gitorious.org/mypaint/mypaint.git"; groups = "mypaint"; } + src = (fetchurl { url = "http://mawercer.de/~nix/repos/my-paint-git-git-6993d.tar.bz2"; sha256 = "958eb83efbf2b18d5b26b850f416657d081d76008c80ef811352c94c991ca05d"; }); + name = "my-paint-git-git-6993d"; + # END + + buildInputs = gtk_libs_new ++ [ pythonPackages.pycairo ]; - src = fetchurl { - url = "http://download.gna.org/mypaint/${name}.tar.bz2"; - sha256 = "0f7848hr65h909c0jkcx616flc0r4qh53g3kd1cgs2nr1pjmf3bq"; + postInstall = '' + ''; }; + "git-animation" = { + # while it works its based on a very old mypaint version .. - buildInputs = [ - gettext glib gtk json_c lcms2 libpng makeWrapper pkgconfig pygtk + # REGION AUTO UPDATE: { name="my-paint-git-animation"; type="git"; url="git://gitorious.org/~charbelinho/mypaint/charbelinho-mypaint.git"; branch = "animation"; groups = "mypaint"; } + src = (fetchurl { url = "http://mawercer.de/~nix/repos/my-paint-git-animation-git-29a88.tar.bz2"; sha256 = "e36a5f843b7391a3a5f149a89b6f516f3c678d69eb855f59ad8fb612fc0efd01"; }); + name = "my-paint-git-animation-git-29a88"; + # END + + buildInputs = gtk_libs_old ++ [ protobuf pythonPackages.pygobject pythonPackages.protobuf pythonPackages.setuptools ]; + + preConfigure = "sed -e 's/-WAll//' -e 's/-Wstrict-prototypes//' -i SConstruct"; + }; + +} { + + buildInputs = [ + gettext json_c lcms2 libpng makeWrapper pkgconfig python scons swig ]; - + propagatedBuildInputs = [ pythonPackages.numpy ]; buildPhase = "scons prefix=$out"; + # 1.1.0 does not require XDG_DATA_DIRS, does not hurt either installPhase = '' scons prefix=$out install - wrapProgram $out/bin/mypaint --prefix PYTHONPATH : $PYTHONPATH + wrapProgram $out/bin/mypaint \ + --prefix PYTHONPATH : "$PYTHONPATH" \ + --prefix XDG_DATA_DIRS : "$XDG_DATA_DIRS" \ + --prefix GI_TYPELIB_PATH : "$GI_TYPELIB_PATH" ''; meta = with stdenv.lib; { @@ -32,4 +74,4 @@ stdenv.mkDerivation rec { platforms = platforms.linux; maintainers = [ maintainers.goibhniu ]; }; -} +}) diff --git a/pkgs/desktops/gnome-2/platform/gnome-common/default.nix b/pkgs/desktops/gnome-2/platform/gnome-common/default.nix index 548783abf793e..929ed44b7529b 100644 --- a/pkgs/desktops/gnome-2/platform/gnome-common/default.nix +++ b/pkgs/desktops/gnome-2/platform/gnome-common/default.nix @@ -1,4 +1,4 @@ -{ stdenv, fetchurl_gnome }: +{ stdenv, fetchurl, fetchurl_gnome, which }: stdenv.mkDerivation rec { name = src.pkgname; @@ -8,4 +8,11 @@ stdenv.mkDerivation rec { major = "2"; minor = "34"; patchlevel = "0"; sha256 = "1pz13mpp09q5s3bikm8ml92s1g0scihsm4iipqv1ql3mp6d4z73s"; }; + + propagatedBuildInputs = [ which ]; # autogen.sh which is using gnome_common tends to require which + + patches = [(fetchurl { + url = "https://bug697543.bugzilla-attachments.gnome.org/attachment.cgi?id=240935"; + sha256 = "17abp7czfzirjm7qsn2czd03hdv9kbyhk3lkjxg2xsf5fky7z7jl"; + })]; } diff --git a/pkgs/development/python-modules/pygobject/3.nix b/pkgs/development/python-modules/pygobject/3.nix index ffbe906a9007a..d24ba44587bbe 100644 --- a/pkgs/development/python-modules/pygobject/3.nix +++ b/pkgs/development/python-modules/pygobject/3.nix @@ -1,14 +1,38 @@ -{ stdenv, fetchurl, python, pkgconfig, glib, gobjectIntrospection, pycairo, cairo }: - -stdenv.mkDerivation rec { - name = "pygobject-3.0.4"; - - src = fetchurl { - url = "mirror://gnome/sources/pygobject/3.0/${name}.tar.xz"; - sha256 = "f457b1d7f6b8bfa727593c3696d2b405da66b4a8d34cd7d3362ebda1221f0661"; +{ pkgs, pycairo +, version ? "stable" +, ... +}: + +let inherit (pkgs) stdenv fetchurl pkgconfig glib gobjectIntrospection cairo versionedDerivation lcov autoconf automake111x libtool python; +in + +versionedDerivation "pygobject" version { + "stable" = rec { + name = "pygobject-3.0.4"; + src = fetchurl { + url = "http://ftp.gnome.org/pub/GNOME/sources/pygobject/3.0/${name}.tar.xz"; + sha256 = "f457b1d7f6b8bfa727593c3696d2b405da66b4a8d34cd7d3362ebda1221f0661"; + }; + configureFlags = "--disable-introspection"; }; - configureFlags = "--disable-introspection"; + # only used by mypaint-git + "git" = { + # REGION AUTO UPDATE: { name="pygobject"; type="git"; url="git://git.gnome.org/pygobject"; } + src = (fetchurl { url = "http://mawercer.de/~nix/repos/pygobject-git-94167.tar.bz2"; sha256 = "b50f9ef3021597dd00f28ec094761e1ac1283026d141c2747079d6eda4e62fd4"; }); + name = "pygobject-git-94167"; + # END + + buildInputs = [pkgs.gnome.gnome_common lcov autoconf automake111x libtool]; + + # this is what autogen.sh would run: + preConfigure = '' + sh gnome-autogen.sh --enable-code-coverage + ''; + }; + +} +{ buildInputs = [ python pkgconfig glib gobjectIntrospection pycairo cairo ]; diff --git a/pkgs/tools/graphics/dispcalgui/default.nix b/pkgs/tools/graphics/dispcalgui/default.nix new file mode 100644 index 0000000000000..4c60dac8953c3 --- /dev/null +++ b/pkgs/tools/graphics/dispcalgui/default.nix @@ -0,0 +1,55 @@ +{stdenv, fetchurl, fetchsvn, pythonPackages, xorg, pkgconfig, makeWrapper, argyllcms}: + +pythonPackages.buildPythonPackage { + + # REGION AUTO UPDATE: { name="dispcalgui"; type="svn"; url="svn://svn.code.sf.net/p/dispcalgui/code/trunk"; } + src = (fetchurl { url = "http://mawercer.de/~nix/repos/dispcalgui-svn-1425.tar.bz2"; sha256 = "9e07c59c9d6bc6162eddad44bd5c6241ea46136e48683183d57d8cc00ee78d87"; }); + name = "dispcalgui-svn-1425"; + # END + + # name = "dispcal-gui"; + # src = fetchsvn { + # url = "svn://svn.code.sf.net/p/dispcalgui/code/trunk"; + # rev = "HEAD"; + # sha256 = "1ky6iq2mddlz5bav9py45fcjmmh1d52sgk8974b2pngjm5ryamrp"; + # }; + + doCheck = false; + + preConfigure = '' + mkdir home + export HOME=`pwd`/home + sed -i 's@X11/extensions/dpms.h@xcb/dpms.h@' dispcalGUI/RealDisplaySizeMM.c + sed -i "s@/etc/udev/rules.d@$out/etc/udev/rules.d@" setup.py dispcalGUI/setup.py + + # make it always look for argyllcms binaries in the argyllcms/bin store path + sed -i 's@""" Find a single Argyll utility. Return the full path. """@return "'${argyllcms}'/bin/%s" % name@' dispcalGUI/worker.py + ''; + + buildInputs = [ + pkgconfig + xorg.libX11 + xorg.libXxf86vm + xorg.libxcb + xorg.libXinerama + xorg.libXrandr + xorg.libXrender + + makeWrapper + pythonPackages.numpy + pythonPackages.wxPython + ]; + + postInstall = '' + wrapProgram $out/bin/dispcalGUI \ + --prefix PYTHONPATH ":" $PYTHONPATH + ''; + + meta = { + description = "Open Source Display Calibration and Characterization powered by Argyll CMS"; + homepage = http://dispcalgui.hoech.net/; + license = stdenv.lib.licenses.gpl3Plus; + maintainers = [stdenv.lib.maintainers.marcweber]; + platforms = stdenv.lib.platforms.linux; + }; +} diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 2db066ac23db5..c3eb60cacbd46 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -3473,6 +3473,8 @@ let ddd = callPackage ../development/tools/misc/ddd { }; + dispcalgui = callPackage ../tools/graphics/dispcalgui { }; + distcc = callPackage ../development/tools/misc/distcc { }; # distccWrapper: wrapper that works as gcc or g++ @@ -8243,6 +8245,10 @@ let mupdf = callPackage ../applications/misc/mupdf { }; mypaint = callPackage ../applications/graphics/mypaint { }; + mypaintGit = (mypaint.override { version = "git"; }).deepOverride { + pythonPackages = pythonPackages // { pygobject3 = pythonPackages.pygobject3.override { version = "git"; }; }; + gtk = gtk3; + }; mythtv = callPackage ../applications/video/mythtv { }; diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index c6e9f5b7fa5b8..97a071ea1af6f 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -106,9 +106,8 @@ pythonPackages = modules // import ./python-packages-generated.nix { inherit python; }; - pygobject3 = import ../development/python-modules/pygobject/3.nix { - inherit (pkgs) stdenv fetchurl pkgconfig glib gobjectIntrospection cairo; - inherit python pycairo; + pygobject3 = callPackage ../development/python-modules/pygobject/3.nix { + inherit pkgs pycairo; }; pygtk = import ../development/python-modules/pygtk {