nixpkgs/pkgs/applications/graphics/mypaint/default.nix

101 lines
1.7 KiB
Nix
Raw Normal View History

2019-11-28 14:33:15 +01:00
{ stdenv
, fetchFromGitHub
, gtk3
, gettext
2019-11-28 14:33:15 +01:00
, json_c
, lcms2
, libpng
, librsvg
, gobject-introspection
2019-01-27 10:25:23 +01:00
, libmypaint
, hicolor-icon-theme
2019-01-27 10:25:23 +01:00
, mypaint-brushes
2019-11-28 14:33:15 +01:00
, gdk-pixbuf
, pkgconfig
2019-01-27 10:25:23 +01:00
, python3
2019-11-28 14:33:15 +01:00
, swig
, wrapGAppsHook
}:
let
2019-01-27 10:25:23 +01:00
inherit (python3.pkgs) pycairo pygobject3 numpy buildPythonApplication;
in buildPythonApplication rec {
pname = "mypaint";
version = "2.0.1";
2017-07-03 21:21:50 +02:00
src = fetchFromGitHub {
owner = "mypaint";
repo = "mypaint";
2019-01-27 10:25:23 +01:00
rev = "v${version}";
sha256 = "rVKcxzWZRLcuxK8xRyRgvitXAh4uOEyqHswLeTdA2Mk=";
2017-07-03 21:21:50 +02:00
fetchSubmodules = true;
};
nativeBuildInputs = [
gettext
2019-11-28 14:33:15 +01:00
pkgconfig
swig
wrapGAppsHook
gobject-introspection # for setup hook
hicolor-icon-theme # fór setup hook
];
buildInputs = [
2019-11-28 14:33:15 +01:00
gtk3
gdk-pixbuf
2019-01-27 10:25:23 +01:00
libmypaint
mypaint-brushes
2019-11-28 14:33:15 +01:00
json_c
lcms2
libpng
librsvg
pycairo
pygobject3
# Mypaint checks for a presence of this theme scaffold and crashes when not present.
hicolor-icon-theme
];
2017-07-03 21:21:50 +02:00
2019-11-28 14:33:15 +01:00
propagatedBuildInputs = [
numpy
2019-01-27 10:25:23 +01:00
pycairo
pygobject3
2019-11-28 14:33:15 +01:00
];
2019-01-27 10:25:23 +01:00
checkInputs = [
gtk3
];
buildPhase = ''
runHook preBuild
${python3.interpreter} setup.py build
runHook postBuild
2017-07-03 21:21:50 +02:00
'';
2019-01-27 10:25:23 +01: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
'';
meta = with stdenv.lib; {
description = "A graphics application for digital painters";
2019-11-28 14:33:15 +01:00
homepage = "http://mypaint.org/";
license = licenses.gpl2Plus;
platforms = platforms.linux;
2017-07-03 21:21:50 +02:00
maintainers = with maintainers; [ goibhniu jtojnar ];
};
}