Merge pull request #246838 from sikmir/inkscape

inkscape: fix broken patching

authored by Pol Dellaiera and committed by GitHub 13c5b2fc 286a368b

+45 -7
+9 -7
pkgs/applications/graphics/inkscape/default.nix
··· 4 4 , boost 5 5 , cairo 6 6 , cmake 7 + , desktopToDarwinBundle 7 8 , fetchurl 8 9 , gettext 9 10 , ghostscript ··· 78 79 # e.g., those from the "Effects" menu. 79 80 python3 = "${python3Env}/bin/python"; 80 81 }) 82 + (substituteAll { 83 + # Fix path to ps2pdf binary 84 + src = ./fix-ps2pdf-path.patch; 85 + inherit ghostscript; 86 + }) 81 87 ]; 82 88 83 89 postPatch = '' 84 90 patchShebangs share/extensions 85 - substituteInPlace share/extensions/eps_input.inx \ 86 - --replace "location=\"path\">ps2pdf" "location=\"absolute\">${ghostscript}/bin/ps2pdf" 87 - substituteInPlace share/extensions/ps_input.inx \ 88 - --replace "location=\"path\">ps2pdf" "location=\"absolute\">${ghostscript}/bin/ps2pdf" 89 - substituteInPlace share/extensions/ps_input.py \ 90 - --replace "call('ps2pdf'" "call('${ghostscript}/bin/ps2pdf'" 91 91 patchShebangs share/templates 92 92 patchShebangs man/fix-roff-punct 93 93 ··· 107 107 ] ++ (with perlPackages; [ 108 108 perl 109 109 XMLParser 110 - ]); 110 + ]) ++ lib.optionals stdenv.isDarwin [ 111 + desktopToDarwinBundle 112 + ]; 111 113 112 114 buildInputs = [ 113 115 boehmgc
+36
pkgs/applications/graphics/inkscape/fix-ps2pdf-path.patch
··· 1 + diff -Naur inkscape-1.2.2_2022-12-01_b0a8486541.orig/share/extensions/eps_input.inx inkscape-1.2.2_2022-12-01_b0a8486541/share/extensions/eps_input.inx 2 + --- inkscape-1.2.2_2022-12-01_b0a8486541.orig/share/extensions/eps_input.inx 2023-08-02 22:22:32.000000000 +0400 3 + +++ inkscape-1.2.2_2022-12-01_b0a8486541/share/extensions/eps_input.inx 2023-08-02 22:23:34.000000000 +0400 4 + @@ -3,7 +3,7 @@ 5 + <name>EPS Input</name> 6 + <id>org.inkscape.input.eps</id> 7 + <dependency type="extension">org.inkscape.input.pdf</dependency> 8 + - <dependency type="executable" location="path">ps2pdf</dependency> 9 + + <dependency type="executable" location="path">@ghostscript@/bin/ps2pdf</dependency> 10 + <param name="crop" type="bool" gui-hidden="true">true</param> 11 + <param name="autorotate" type="optiongroup" appearance="combo" gui-text="Determine page orientation from text direction" 12 + gui-description="The PS/EPS importer can try to determine the page orientation such that the majority of the text runs left-to-right."> 13 + diff -Naur inkscape-1.2.2_2022-12-01_b0a8486541.orig/share/extensions/ps_input.inx inkscape-1.2.2_2022-12-01_b0a8486541/share/extensions/ps_input.inx 14 + --- inkscape-1.2.2_2022-12-01_b0a8486541.orig/share/extensions/ps_input.inx 2023-08-02 22:22:33.000000000 +0400 15 + +++ inkscape-1.2.2_2022-12-01_b0a8486541/share/extensions/ps_input.inx 2023-08-02 22:24:00.000000000 +0400 16 + @@ -3,7 +3,7 @@ 17 + <name>PostScript Input</name> 18 + <id>org.inkscape.input.postscript_input</id> 19 + <dependency type="extension">org.inkscape.input.pdf</dependency> 20 + - <dependency type="executable" location="path">ps2pdf</dependency> 21 + + <dependency type="executable" location="path">@ghostscript@/bin/ps2pdf</dependency> 22 + <param name="autorotate" type="optiongroup" appearance="combo" gui-text="Determine page orientation from text direction" 23 + gui-description="The PS/EPS importer can try to determine the page orientation such that the majority of the text runs left-to-right."> 24 + <option value="None">Disabled</option> 25 + diff -Naur inkscape-1.2.2_2022-12-01_b0a8486541.orig/share/extensions/ps_input.py inkscape-1.2.2_2022-12-01_b0a8486541/share/extensions/ps_input.py 26 + --- inkscape-1.2.2_2022-12-01_b0a8486541.orig/share/extensions/ps_input.py 2023-08-02 22:22:32.000000000 +0400 27 + +++ inkscape-1.2.2_2022-12-01_b0a8486541/share/extensions/ps_input.py 2023-08-02 22:23:48.000000000 +0400 28 + @@ -79,7 +79,7 @@ 29 + else: 30 + try: 31 + call( 32 + - "ps2pdf", 33 + + "@ghostscript@/bin/ps2pdf", 34 + crop, 35 + "-dAutoRotatePages=/" + self.options.autorotate, 36 + input_file,