Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
1{ 2 lib, 3 stdenv, 4 fetchurl, 5 ghostscript, 6 libpng, 7 makeWrapper, 8 coreutils, 9 bc, 10 gnugrep, 11 gawk, 12 gnused, 13}: 14 15stdenv.mkDerivation rec { 16 pname = "fig2dev"; 17 version = "3.2.9a"; 18 19 src = fetchurl { 20 url = "mirror://sourceforge/mcj/fig2dev-${version}.tar.xz"; 21 hash = "sha256-YeGFOTF2hS8DuQGzsFsZ+8Wtglj/FC89pucLG4NRMyY="; 22 }; 23 24 patches = [ 25 ./CVE-2025-31162.patch 26 ./CVE-2025-31163.patch 27 ]; 28 29 nativeBuildInputs = [ makeWrapper ]; 30 buildInputs = [ libpng ]; 31 32 GSEXE = "${ghostscript}/bin/gs"; 33 34 configureFlags = [ "--enable-transfig" ]; 35 36 postInstall = '' 37 wrapProgram $out/bin/fig2ps2tex \ 38 --set PATH ${ 39 lib.makeBinPath [ 40 coreutils 41 bc 42 gnugrep 43 gawk 44 ] 45 } 46 wrapProgram $out/bin/pic2tpic \ 47 --set PATH ${lib.makeBinPath [ gnused ]} 48 ''; 49 50 meta = with lib; { 51 description = "Tool to convert Xfig files to other formats"; 52 homepage = "https://mcj.sourceforge.net/"; 53 license = licenses.xfig; 54 platforms = platforms.unix; 55 maintainers = with maintainers; [ lesuisse ]; 56 }; 57}