Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
at netboot-syslinux-multiplatform 112 lines 2.1 kB view raw
1{ lib 2, fetchFromGitHub 3, fetchpatch 4, gtk3 5, gettext 6, json_c 7, lcms2 8, libpng 9, librsvg 10, gobject-introspection 11, libmypaint 12, hicolor-icon-theme 13, mypaint-brushes 14, gdk-pixbuf 15, pkg-config 16, python3 17, swig 18, wrapGAppsHook 19}: 20 21let 22 inherit (python3.pkgs) pycairo pygobject3 numpy buildPythonApplication; 23in buildPythonApplication rec { 24 pname = "mypaint"; 25 version = "2.0.1"; 26 format = "other"; 27 28 src = fetchFromGitHub { 29 owner = "mypaint"; 30 repo = "mypaint"; 31 rev = "v${version}"; 32 sha256 = "rVKcxzWZRLcuxK8xRyRgvitXAh4uOEyqHswLeTdA2Mk="; 33 fetchSubmodules = true; 34 }; 35 36 patches = [ 37 # Fix build due to setuptools issue. 38 # https://github.com/mypaint/mypaint/pull/1183 39 (fetchpatch { 40 url = "https://github.com/mypaint/mypaint/commit/423950bec96d6057eac70442de577364d784a847.patch"; 41 sha256 = "OxJJOi20bFMRibL59zx6svtMrkgeMYyEvbdSXbZHqpc="; 42 }) 43 ]; 44 45 nativeBuildInputs = [ 46 gettext 47 pkg-config 48 swig 49 wrapGAppsHook 50 gobject-introspection # for setup hook 51 hicolor-icon-theme # fór setup hook 52 python3.pkgs.setuptools 53 ]; 54 55 buildInputs = [ 56 gtk3 57 gdk-pixbuf 58 libmypaint 59 mypaint-brushes 60 json_c 61 lcms2 62 libpng 63 librsvg 64 pycairo 65 pygobject3 66 67 # Mypaint checks for a presence of this theme scaffold and crashes when not present. 68 hicolor-icon-theme 69 ]; 70 71 propagatedBuildInputs = [ 72 numpy 73 pycairo 74 pygobject3 75 ]; 76 77 nativeCheckInputs = [ 78 gtk3 79 ]; 80 81 buildPhase = '' 82 runHook preBuild 83 84 ${python3.interpreter} setup.py build 85 86 runHook postBuild 87 ''; 88 89 installPhase = '' 90 runHook preInstall 91 92 ${python3.interpreter} setup.py managed_install --prefix=$out 93 94 runHook postInstall 95 ''; 96 97 checkPhase = '' 98 runHook preCheck 99 100 HOME=$TEMPDIR ${python3.interpreter} setup.py test 101 102 runHook postCheck 103 ''; 104 105 meta = with lib; { 106 description = "A graphics application for digital painters"; 107 homepage = "http://mypaint.org/"; 108 license = licenses.gpl2Plus; 109 platforms = platforms.linux; 110 maintainers = with maintainers; [ goibhniu jtojnar ]; 111 }; 112}