Some checks failed
Periodic Merges (6h) / master → staging-nixos (push) Failing after 12m50s
Periodic Merges (6h) / master → staging-next (push) Failing after 12m54s
Periodic Merges (24h) / merge-base(master,staging) → haskell-updates (push) Failing after 11m54s
Periodic Merges (6h) / staging-next → staging (push) Failing after 12m13s
Periodic Merges (24h) / staging-next-25.05 → staging-25.05 (push) Failing after 13m24s
Periodic Merges (24h) / release-25.05 → staging-next-25.05 (push) Failing after 14m28s
67 lines
1.5 KiB
Nix
67 lines
1.5 KiB
Nix
{
|
|
lib,
|
|
stdenv,
|
|
fetchpatch,
|
|
fetchurl,
|
|
ghostscript,
|
|
libpng,
|
|
makeWrapper,
|
|
coreutils,
|
|
bc,
|
|
gnugrep,
|
|
gawk,
|
|
gnused,
|
|
}:
|
|
|
|
stdenv.mkDerivation rec {
|
|
pname = "fig2dev";
|
|
version = "3.2.9a";
|
|
|
|
src = fetchurl {
|
|
url = "mirror://sourceforge/mcj/fig2dev-${version}.tar.xz";
|
|
hash = "sha256-YeGFOTF2hS8DuQGzsFsZ+8Wtglj/FC89pucLG4NRMyY=";
|
|
};
|
|
|
|
patches = [
|
|
./CVE-2025-31162.patch
|
|
./CVE-2025-31163.patch
|
|
|
|
# Fix build with gcc15
|
|
# https://sourceforge.net/p/mcj/fig2dev/ci/ab4eee3cf0d0c1d861d64b9569a5d1497800cae2
|
|
(fetchpatch {
|
|
name = "fig2dev-prototypes.patch";
|
|
url = "https://gitweb.gentoo.org/repo/gentoo.git/plain/media-gfx/fig2dev/files/fig2dev-3.2.9a-prototypes.patch?id=93644497325b6df7a17f8bd05ad0495607aa5c34";
|
|
hash = "sha256-F6z0m3Ez9JpgZg+TjVjuIZhAyTMHodB7O/l8lDTOL54=";
|
|
})
|
|
];
|
|
|
|
nativeBuildInputs = [ makeWrapper ];
|
|
buildInputs = [ libpng ];
|
|
|
|
GSEXE = "${ghostscript}/bin/gs";
|
|
|
|
configureFlags = [ "--enable-transfig" ];
|
|
|
|
postInstall = ''
|
|
wrapProgram $out/bin/fig2ps2tex \
|
|
--set PATH ${
|
|
lib.makeBinPath [
|
|
coreutils
|
|
bc
|
|
gnugrep
|
|
gawk
|
|
]
|
|
}
|
|
wrapProgram $out/bin/pic2tpic \
|
|
--set PATH ${lib.makeBinPath [ gnused ]}
|
|
'';
|
|
|
|
meta = with lib; {
|
|
description = "Tool to convert Xfig files to other formats";
|
|
homepage = "https://mcj.sourceforge.net/";
|
|
license = licenses.xfig;
|
|
platforms = platforms.unix;
|
|
maintainers = with maintainers; [ lesuisse ];
|
|
};
|
|
}
|