Merge pull request #165317 from fedeinthemix/xfig-icons

authored by

Artturi and committed by
GitHub
31747079 e9ac4b07

+13 -2
+13 -2
pkgs/applications/graphics/xfig/default.nix
··· 3 3 , fetchurl 4 4 , xlibsWrapper 5 5 , makeWrapper 6 + , imagemagick 6 7 , libXpm 7 8 , libXmu 8 9 , libXi ··· 21 22 sha256 = "0fndgbm1mkqb1sn2v2kj3nx9mxj70jbp31y2bjvzcmmkry0q3k5j"; 22 23 }; 23 24 24 - nativeBuildInputs = [ makeWrapper ]; 25 + nativeBuildInputs = [ imagemagick makeWrapper ]; 25 26 26 27 buildInputs = [ 27 28 xlibsWrapper ··· 34 35 ]; 35 36 36 37 postPatch = '' 37 - sed -i 's:"fig2dev":"${fig2dev}/bin/fig2dev":' src/main.c 38 + substituteInPlace src/main.c --replace '"fig2dev"' '"${fig2dev}/bin/fig2dev"' 39 + substituteInPlace xfig.desktop --replace "/usr/bin/" "$out/bin/" 38 40 ''; 39 41 40 42 postInstall = '' ··· 43 45 44 46 wrapProgram $out/bin/xfig \ 45 47 --set XAPPLRESDIR $out/share/X11/app-defaults 48 + 49 + mkdir -p $out/share/icons/hicolor/{16x16,22x22,48x48,64x64}/apps 50 + 51 + for dimension in 16x16 22x22 48x48; do 52 + convert doc/html/images/xfig-logo.png -geometry $dimension\ 53 + $out/share/icons/hicolor/16x16/apps/xfig.png 54 + done 55 + install doc/html/images/xfig-logo.png \ 56 + $out/share/icons/hicolor/64x64/apps/xfig.png 46 57 ''; 47 58 48 59 enableParallelBuilding = true;