From eeaad8d225d21ee2bc52743f9d40506846e077a1 Mon Sep 17 00:00:00 2001 From: Jan Tojnar Date: Sun, 27 Jan 2019 10:12:49 +0100 Subject: [PATCH 1/2] =?UTF-8?q?mypaint-brushes:=201.3.0=20=E2=86=92=202.0.?= =?UTF-8?q?2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pkgs/applications/graphics/gimp/default.nix | 4 +- .../libraries/mypaint-brushes/1.0.nix | 43 +++++++++++++++++++ .../libraries/mypaint-brushes/default.nix | 13 +----- pkgs/top-level/all-packages.nix | 2 + 4 files changed, 49 insertions(+), 13 deletions(-) create mode 100644 pkgs/development/libraries/mypaint-brushes/1.0.nix diff --git a/pkgs/applications/graphics/gimp/default.nix b/pkgs/applications/graphics/gimp/default.nix index 2b3b992d24b5..d3950c06c339 100644 --- a/pkgs/applications/graphics/gimp/default.nix +++ b/pkgs/applications/graphics/gimp/default.nix @@ -36,7 +36,7 @@ , libmypaint , gexiv2 , harfbuzz -, mypaint-brushes +, mypaint-brushes1 , libwebp , libheif , libgudev @@ -102,7 +102,7 @@ in stdenv.mkDerivation rec { xorg.libXpm glib-networking libmypaint - mypaint-brushes + mypaint-brushes1 ] ++ lib.optionals stdenv.isDarwin [ AppKit Cocoa diff --git a/pkgs/development/libraries/mypaint-brushes/1.0.nix b/pkgs/development/libraries/mypaint-brushes/1.0.nix new file mode 100644 index 000000000000..115d818d9365 --- /dev/null +++ b/pkgs/development/libraries/mypaint-brushes/1.0.nix @@ -0,0 +1,43 @@ +{ stdenv +, fetchpatch +, autoconf +, automake +, fetchFromGitHub +, pkgconfig +}: + +stdenv.mkDerivation rec { + pname = "mypaint-brushes"; + version = "1.3.0"; + + src = fetchFromGitHub { + owner = "mypaint"; + repo = pname; + rev = "v${version}"; + sha256 = "1iz89z6v2mp8j1lrf942k561s8311i3s34ap36wh4rybb2lq15m0"; + }; + + patches = [ + # build with automake 1.16 + (fetchpatch { + url = https://github.com/Jehan/mypaint-brushes/commit/1e9109dde3bffd416ed351c3f30ecd6ffd0ca2cd.patch; + sha256 = "0mi8rwbirl0ib22f2hz7kdlgi4hw8s3ab29b003dsshdyzn5iha9"; + }) + ]; + + nativeBuildInputs = [ + autoconf + automake + pkgconfig + ]; + + preConfigure = "./autogen.sh"; + + meta = with stdenv.lib; { + homepage = "http://mypaint.org/"; + description = "Brushes used by MyPaint and other software using libmypaint."; + license = licenses.cc0; + maintainers = with maintainers; [ jtojnar ]; + platforms = platforms.unix; + }; +} diff --git a/pkgs/development/libraries/mypaint-brushes/default.nix b/pkgs/development/libraries/mypaint-brushes/default.nix index 115d818d9365..20caf6e57752 100644 --- a/pkgs/development/libraries/mypaint-brushes/default.nix +++ b/pkgs/development/libraries/mypaint-brushes/default.nix @@ -1,5 +1,4 @@ { stdenv -, fetchpatch , autoconf , automake , fetchFromGitHub @@ -8,23 +7,15 @@ stdenv.mkDerivation rec { pname = "mypaint-brushes"; - version = "1.3.0"; + version = "2.0.2"; src = fetchFromGitHub { owner = "mypaint"; repo = pname; rev = "v${version}"; - sha256 = "1iz89z6v2mp8j1lrf942k561s8311i3s34ap36wh4rybb2lq15m0"; + sha256 = "0kcqz13vzpy24dhmrx9hbs6s7hqb8y305vciznm15h277sabpmw9"; }; - patches = [ - # build with automake 1.16 - (fetchpatch { - url = https://github.com/Jehan/mypaint-brushes/commit/1e9109dde3bffd416ed351c3f30ecd6ffd0ca2cd.patch; - sha256 = "0mi8rwbirl0ib22f2hz7kdlgi4hw8s3ab29b003dsshdyzn5iha9"; - }) - ]; - nativeBuildInputs = [ autoconf automake diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index d1994c2eafec..26701c9301b0 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -20645,6 +20645,8 @@ in mypaint = callPackage ../applications/graphics/mypaint { }; + mypaint-brushes1 = callPackage ../development/libraries/mypaint-brushes/1.0.nix { }; + mypaint-brushes = callPackage ../development/libraries/mypaint-brushes { }; mythtv = libsForQt5.callPackage ../applications/video/mythtv { From 6fecb16af6682bf847a73002ef246b513f1ab679 Mon Sep 17 00:00:00 2001 From: Jan Tojnar Date: Sun, 27 Jan 2019 10:25:23 +0100 Subject: [PATCH 2/2] =?UTF-8?q?mypaint:=201.2.1=20=E2=86=92=202.0.0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../applications/graphics/mypaint/default.nix | 50 +++++++++++++------ 1 file changed, 36 insertions(+), 14 deletions(-) diff --git a/pkgs/applications/graphics/mypaint/default.nix b/pkgs/applications/graphics/mypaint/default.nix index 1acaf4850ebe..5ebbee0e4d6f 100644 --- a/pkgs/applications/graphics/mypaint/default.nix +++ b/pkgs/applications/graphics/mypaint/default.nix @@ -7,59 +7,81 @@ , libpng , librsvg , gobject-introspection +, libmypaint +, mypaint-brushes , gdk-pixbuf , pkgconfig -, python2 -, scons +, python3 , swig , wrapGAppsHook }: let - inherit (python2.pkgs) pycairo pygobject3 numpy; -in stdenv.mkDerivation { + inherit (python3.pkgs) pycairo pygobject3 numpy buildPythonApplication; +in buildPythonApplication rec { pname = "mypaint"; - version = "1.2.1"; + version = "2.0.0"; src = fetchFromGitHub { owner = "mypaint"; repo = "mypaint"; - rev = "bcf5a28d38bbd586cc9d4cee223f849fa303864f"; - sha256 = "1zwx7n629vz1jcrqjqmw6vl6sxdf81fq6a5jzqiga8167gg8s9pf"; + rev = "v${version}"; + sha256 = "180kyilhf81ndhwl1hlvy82gh6hxpcvka2d1nkghbpgy431rls6r"; fetchSubmodules = true; }; nativeBuildInputs = [ intltool pkgconfig - scons swig wrapGAppsHook gobject-introspection # for setup hook ]; - buildInputs = [ gtk3 gdk-pixbuf + libmypaint + mypaint-brushes json_c lcms2 libpng librsvg pycairo pygobject3 - python2 ]; propagatedBuildInputs = [ numpy + pycairo + pygobject3 ]; - postInstall = '' - sed -i -e 's|/usr/bin/env python2.7|${python2}/bin/python|' $out/bin/mypaint + checkInputs = [ + gtk3 + ]; + + buildPhase = '' + runHook preBuild + + ${python3.interpreter} setup.py build + + runHook postBuild ''; - preFixup = '' - gappsWrapperArgs+=(--prefix PYTHONPATH : $PYTHONPATH) + installPhase = '' + runHook preInstall + + ${python3.interpreter} setup.py managed_install --prefix=$out + + runHook postInstall + ''; + + checkPhase = '' + runHook preCheck + + HOME=$TEMPDIR ${python3.interpreter} setup.py test + + runHook postCheck ''; meta = with stdenv.lib; {