2021-02-05 17:12:51 +00:00
|
|
|
{ lib
|
2020-04-24 23:36:52 +00:00
|
|
|
, fetchFromGitHub
|
2022-04-15 01:41:22 +00:00
|
|
|
, fetchpatch
|
2020-04-24 23:36:52 +00:00
|
|
|
, gtk3
|
2020-08-20 17:08:02 +00:00
|
|
|
, gettext
|
2020-04-24 23:36:52 +00:00
|
|
|
, json_c
|
|
|
|
, lcms2
|
|
|
|
, libpng
|
|
|
|
, librsvg
|
|
|
|
, gobject-introspection
|
|
|
|
, libmypaint
|
2020-09-25 04:45:31 +00:00
|
|
|
, hicolor-icon-theme
|
2020-04-24 23:36:52 +00:00
|
|
|
, mypaint-brushes
|
|
|
|
, gdk-pixbuf
|
2021-02-05 17:12:51 +00:00
|
|
|
, pkg-config
|
2020-04-24 23:36:52 +00:00
|
|
|
, python3
|
|
|
|
, swig
|
|
|
|
, wrapGAppsHook
|
|
|
|
}:
|
|
|
|
|
|
|
|
let
|
|
|
|
inherit (python3.pkgs) pycairo pygobject3 numpy buildPythonApplication;
|
|
|
|
in buildPythonApplication rec {
|
|
|
|
pname = "mypaint";
|
2020-08-20 17:08:02 +00:00
|
|
|
version = "2.0.1";
|
2022-09-30 11:47:45 +00:00
|
|
|
format = "other";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "mypaint";
|
|
|
|
repo = "mypaint";
|
|
|
|
rev = "v${version}";
|
2020-08-20 17:08:02 +00:00
|
|
|
sha256 = "rVKcxzWZRLcuxK8xRyRgvitXAh4uOEyqHswLeTdA2Mk=";
|
2020-04-24 23:36:52 +00:00
|
|
|
fetchSubmodules = true;
|
|
|
|
};
|
|
|
|
|
2022-04-15 01:41:22 +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=";
|
|
|
|
})
|
|
|
|
];
|
|
|
|
|
2020-04-24 23:36:52 +00:00
|
|
|
nativeBuildInputs = [
|
2020-08-20 17:08:02 +00:00
|
|
|
gettext
|
2021-02-05 17:12:51 +00:00
|
|
|
pkg-config
|
2020-04-24 23:36:52 +00:00
|
|
|
swig
|
|
|
|
wrapGAppsHook
|
|
|
|
gobject-introspection # for setup hook
|
2020-09-25 04:45:31 +00:00
|
|
|
hicolor-icon-theme # fór setup hook
|
2022-09-30 11:47:45 +00:00
|
|
|
python3.pkgs.setuptools
|
2020-04-24 23:36:52 +00:00
|
|
|
];
|
2020-09-25 04:45:31 +00:00
|
|
|
|
2020-04-24 23:36:52 +00:00
|
|
|
buildInputs = [
|
|
|
|
gtk3
|
|
|
|
gdk-pixbuf
|
|
|
|
libmypaint
|
|
|
|
mypaint-brushes
|
|
|
|
json_c
|
|
|
|
lcms2
|
|
|
|
libpng
|
|
|
|
librsvg
|
|
|
|
pycairo
|
|
|
|
pygobject3
|
2020-09-25 04:45:31 +00:00
|
|
|
|
|
|
|
# Mypaint checks for a presence of this theme scaffold and crashes when not present.
|
|
|
|
hicolor-icon-theme
|
2020-04-24 23:36:52 +00:00
|
|
|
];
|
|
|
|
|
|
|
|
propagatedBuildInputs = [
|
|
|
|
numpy
|
|
|
|
pycairo
|
|
|
|
pygobject3
|
|
|
|
];
|
|
|
|
|
2023-02-02 18:25:31 +00:00
|
|
|
nativeCheckInputs = [
|
2020-04-24 23:36:52 +00:00
|
|
|
gtk3
|
|
|
|
];
|
|
|
|
|
|
|
|
buildPhase = ''
|
|
|
|
runHook preBuild
|
|
|
|
|
|
|
|
${python3.interpreter} setup.py build
|
|
|
|
|
|
|
|
runHook postBuild
|
|
|
|
'';
|
|
|
|
|
|
|
|
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
|
|
|
|
'';
|
|
|
|
|
2021-01-15 22:18:51 +00:00
|
|
|
meta = with lib; {
|
2020-04-24 23:36:52 +00:00
|
|
|
description = "A graphics application for digital painters";
|
|
|
|
homepage = "http://mypaint.org/";
|
|
|
|
license = licenses.gpl2Plus;
|
|
|
|
platforms = platforms.linux;
|
|
|
|
maintainers = with maintainers; [ goibhniu jtojnar ];
|
|
|
|
};
|
|
|
|
}
|