2021-01-25 08:26:54 +00:00
|
|
|
{ lib
|
2019-11-28 13:33:15 +00:00
|
|
|
, fetchFromGitHub
|
2022-04-06 21:21:37 +00:00
|
|
|
, fetchpatch
|
2019-11-28 13:33:15 +00:00
|
|
|
, gtk3
|
2020-07-19 23:58:24 +00:00
|
|
|
, gettext
|
2019-11-28 13:33:15 +00:00
|
|
|
, json_c
|
|
|
|
, lcms2
|
|
|
|
, libpng
|
|
|
|
, librsvg
|
|
|
|
, gobject-introspection
|
2019-01-27 09:25:23 +00:00
|
|
|
, libmypaint
|
2020-09-08 03:35:27 +00:00
|
|
|
, hicolor-icon-theme
|
2019-01-27 09:25:23 +00:00
|
|
|
, mypaint-brushes
|
2019-11-28 13:33:15 +00:00
|
|
|
, gdk-pixbuf
|
2021-01-19 06:50:56 +00:00
|
|
|
, pkg-config
|
2019-01-27 09:25:23 +00:00
|
|
|
, python3
|
2019-11-28 13:33:15 +00:00
|
|
|
, swig
|
|
|
|
, wrapGAppsHook
|
|
|
|
}:
|
2013-03-06 22:08:30 +00:00
|
|
|
|
2016-09-26 07:45:33 +00:00
|
|
|
let
|
2019-01-27 09:25:23 +00:00
|
|
|
inherit (python3.pkgs) pycairo pygobject3 numpy buildPythonApplication;
|
|
|
|
in buildPythonApplication rec {
|
2019-08-15 12:41:18 +00:00
|
|
|
pname = "mypaint";
|
2020-07-19 23:58:24 +00:00
|
|
|
version = "2.0.1";
|
2022-09-19 03:03:55 +00:00
|
|
|
format = "other";
|
2013-03-06 22:08:30 +00:00
|
|
|
|
2017-07-03 19:21:50 +00:00
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "mypaint";
|
|
|
|
repo = "mypaint";
|
2019-01-27 09:25:23 +00:00
|
|
|
rev = "v${version}";
|
2020-07-19 23:58:24 +00:00
|
|
|
sha256 = "rVKcxzWZRLcuxK8xRyRgvitXAh4uOEyqHswLeTdA2Mk=";
|
2017-07-03 19:21:50 +00:00
|
|
|
fetchSubmodules = true;
|
2013-03-06 22:08:30 +00:00
|
|
|
};
|
|
|
|
|
2022-04-06 21:21:37 +00:00
|
|
|
patches = [
|
|
|
|
# Fix build due to setuptools issue.
|
|
|
|
# https://github.com/mypaint/mypaint/pull/1183
|
|
|
|
(fetchpatch {
|
|
|
|
url = "https://github.com/mypaint/mypaint/commit/423950bec96d6057eac70442de577364d784a847.patch";
|
|
|
|
sha256 = "OxJJOi20bFMRibL59zx6svtMrkgeMYyEvbdSXbZHqpc=";
|
|
|
|
})
|
|
|
|
];
|
|
|
|
|
2018-06-06 10:13:15 +00:00
|
|
|
nativeBuildInputs = [
|
2020-07-19 23:58:24 +00:00
|
|
|
gettext
|
2021-01-19 06:50:56 +00:00
|
|
|
pkg-config
|
2019-11-28 13:33:15 +00:00
|
|
|
swig
|
|
|
|
wrapGAppsHook
|
2018-12-02 11:41:15 +00:00
|
|
|
gobject-introspection # for setup hook
|
2020-09-08 03:35:27 +00:00
|
|
|
hicolor-icon-theme # fór setup hook
|
2022-09-19 03:03:55 +00:00
|
|
|
python3.pkgs.setuptools
|
2018-06-06 10:13:15 +00:00
|
|
|
];
|
2020-09-08 03:35:27 +00:00
|
|
|
|
2018-06-06 10:13:15 +00:00
|
|
|
buildInputs = [
|
2019-11-28 13:33:15 +00:00
|
|
|
gtk3
|
|
|
|
gdk-pixbuf
|
2019-01-27 09:25:23 +00:00
|
|
|
libmypaint
|
|
|
|
mypaint-brushes
|
2019-11-28 13:33:15 +00:00
|
|
|
json_c
|
|
|
|
lcms2
|
|
|
|
libpng
|
|
|
|
librsvg
|
|
|
|
pycairo
|
|
|
|
pygobject3
|
2020-09-08 03:35:27 +00:00
|
|
|
|
|
|
|
# Mypaint checks for a presence of this theme scaffold and crashes when not present.
|
|
|
|
hicolor-icon-theme
|
2018-06-06 10:13:15 +00:00
|
|
|
];
|
2017-07-03 19:21:50 +00:00
|
|
|
|
2019-11-28 13:33:15 +00:00
|
|
|
propagatedBuildInputs = [
|
|
|
|
numpy
|
2019-01-27 09:25:23 +00:00
|
|
|
pycairo
|
|
|
|
pygobject3
|
2019-11-28 13:33:15 +00:00
|
|
|
];
|
2013-03-06 22:08:30 +00:00
|
|
|
|
2019-01-27 09:25:23 +00:00
|
|
|
checkInputs = [
|
|
|
|
gtk3
|
|
|
|
];
|
|
|
|
|
|
|
|
buildPhase = ''
|
|
|
|
runHook preBuild
|
|
|
|
|
|
|
|
${python3.interpreter} setup.py build
|
|
|
|
|
|
|
|
runHook postBuild
|
2017-07-03 19:21:50 +00:00
|
|
|
'';
|
|
|
|
|
2019-01-27 09:25:23 +00:00
|
|
|
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
|
2013-03-06 22:08:30 +00:00
|
|
|
'';
|
|
|
|
|
2021-01-11 07:54:33 +00:00
|
|
|
meta = with lib; {
|
2013-03-06 22:08:30 +00:00
|
|
|
description = "A graphics application for digital painters";
|
2019-11-28 13:33:15 +00:00
|
|
|
homepage = "http://mypaint.org/";
|
2013-03-06 22:08:30 +00:00
|
|
|
license = licenses.gpl2Plus;
|
|
|
|
platforms = platforms.linux;
|
2017-07-03 19:21:50 +00:00
|
|
|
maintainers = with maintainers; [ goibhniu jtojnar ];
|
2013-03-06 22:08:30 +00:00
|
|
|
};
|
|
|
|
}
|