66} :
77let
88 version = "3.1.0" ;
9- in
10- python3 . pkgs . buildPythonApplication rec {
11- pname = "inkstitch" ;
12- inherit version ;
13- pyproject = false ; # Uses a Makefile (yikes)
14-
15- src = fetchFromGitHub {
16- owner = "inkstitch" ;
17- repo = "inkstitch" ;
18- rev = "refs/tags/v${ version } " ;
19- hash = "sha256-CGhJsDRhElgemNv2BXqZr6Vi5EyBArFak7Duz545ivY=" ;
20- } ;
21-
22- nativeBuildInputs = [
23- gettext
24- ] ;
25-
269 dependencies =
2710 with python3 . pkgs ;
2811 [
@@ -47,6 +30,26 @@ python3.pkgs.buildPythonApplication rec {
4730 ]
4831 # Inkstitch uses the builtin tomllib instead when Python >=3.11
4932 ++ lib . optional ( pythonOlder "3.11" ) tomli ;
33+ pyEnv = python3 . withPackages ( _ : dependencies ) ;
34+ in
35+ python3 . pkgs . buildPythonApplication {
36+ pname = "inkstitch" ;
37+ inherit version ;
38+ pyproject = false ; # Uses a Makefile (yikes)
39+
40+ src = fetchFromGitHub {
41+ owner = "inkstitch" ;
42+ repo = "inkstitch" ;
43+ rev = "refs/tags/v${ version } " ;
44+ hash = "sha256-CGhJsDRhElgemNv2BXqZr6Vi5EyBArFak7Duz545ivY=" ;
45+ } ;
46+
47+ nativeBuildInputs = [
48+ gettext
49+ pyEnv
50+ ] ;
51+
52+ inherit dependencies ;
5053
5154 makeFlags = [ "manual" ] ;
5255
@@ -64,16 +67,12 @@ python3.pkgs.buildPythonApplication rec {
6467 ./0002-plugin-invocation-use-python-script-as-entrypoint.patch
6568 ] ;
6669
67- postPatch =
68- let
69- pyEnv = python3 . withPackages ( _ : dependencies ) ;
70- in
71- ''
72- # Add shebang with python dependencies
73- substituteInPlace lib/inx/utils.py --replace-fail ' interpreter="python"' ""
74- sed -i -e '1i#!${ pyEnv . interpreter } ' inkstitch.py
75- chmod a+x inkstitch.py
76- '' ;
70+ postPatch = ''
71+ # Add shebang with python dependencies
72+ substituteInPlace lib/inx/utils.py --replace-fail ' interpreter="python"' ""
73+ sed -i -e '1i#!${ pyEnv . interpreter } ' inkstitch.py
74+ chmod a+x inkstitch.py
75+ '' ;
7776
7877 nativeCheckInputs = with python3 . pkgs ; [
7978 pytestCheckHook
0 commit comments