Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
68 changes: 55 additions & 13 deletions pkgs/applications/graphics/mypaint/default.nix
Original file line number Diff line number Diff line change
@@ -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; {
Expand All @@ -32,4 +74,4 @@ stdenv.mkDerivation rec {
platforms = platforms.linux;
maintainers = [ maintainers.goibhniu ];
};
}
})
9 changes: 8 additions & 1 deletion pkgs/desktops/gnome-2/platform/gnome-common/default.nix
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{ stdenv, fetchurl_gnome }:
{ stdenv, fetchurl, fetchurl_gnome, which }:
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm just curious -- any reason for adding fetchurl_gnome?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

obviously not.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah, sorry, you weren't adding it, and it's used. I was confused by my diff which used the prefix from fetchurl_gnome for fetchurl :-)


stdenv.mkDerivation rec {
name = src.pkgname;
Expand All @@ -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";
})];
}
42 changes: 33 additions & 9 deletions pkgs/development/python-modules/pygobject/3.nix
Original file line number Diff line number Diff line change
@@ -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 ];

Expand Down
55 changes: 55 additions & 0 deletions pkgs/tools/graphics/dispcalgui/default.nix
Original file line number Diff line number Diff line change
@@ -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;
};
}
6 changes: 6 additions & 0 deletions pkgs/top-level/all-packages.nix
Original file line number Diff line number Diff line change
Expand Up @@ -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++
Expand Down Expand Up @@ -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 { };

Expand Down
5 changes: 2 additions & 3 deletions pkgs/top-level/python-packages.nix
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down