mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-04-13 17:07:34 +00:00
gif2apng: init at 1.9
This commit is contained in:
parent
b606e81166
commit
0c77de452c
69
pkgs/tools/graphics/gif2apng/default.nix
Normal file
69
pkgs/tools/graphics/gif2apng/default.nix
Normal file
@ -0,0 +1,69 @@
|
||||
{ lib
|
||||
, stdenv
|
||||
, fetchzip
|
||||
, fetchpatch
|
||||
, zlib
|
||||
, zopfli
|
||||
}:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "gif2apng";
|
||||
version = "1.9";
|
||||
|
||||
src = fetchzip {
|
||||
url = "mirror://sourceforge/gif2apng/gif2apng-${version}-src.zip";
|
||||
stripRoot = false;
|
||||
hash = "sha256-rt1Vp4hjeFAVWJOU04BdU2YvBwECe9Q1c7EpNpIN+uE=";
|
||||
};
|
||||
|
||||
patches = [
|
||||
(fetchpatch {
|
||||
url = "https://sources.debian.org/data/main/g/gif2apng/1.9%2Bsrconly-3%2Bdeb11u1/debian/patches/10-7z.patch";
|
||||
hash = "sha256-zQgSWP/CIGaTUIxP/X92zpAQVSGgVo8gQEoCCMn+XT0=";
|
||||
})
|
||||
(fetchpatch {
|
||||
url = "https://sources.debian.org/data/main/g/gif2apng/1.9%2Bsrconly-3%2Bdeb11u1/debian/patches/CVE-2021-45909.patch";
|
||||
hash = "sha256-ZDN3xgvktgahDEtrEpyVsL+4u+97Fo9vAB1RSKhu8KA=";
|
||||
})
|
||||
(fetchpatch {
|
||||
url = "https://sources.debian.org/data/main/g/gif2apng/1.9%2Bsrconly-3%2Bdeb11u1/debian/patches/CVE-2021-45910.patch";
|
||||
hash = "sha256-MzOUOC7kqH22DmTMXoDu+jZAMBJPndnFNJGAQv5FcdI=";
|
||||
})
|
||||
(fetchpatch {
|
||||
url = "https://sources.debian.org/data/main/g/gif2apng/1.9%2Bsrconly-3%2Bdeb11u1/debian/patches/CVE-2021-45911.patch";
|
||||
hash = "sha256-o2YDHsSaorCx/6bQQfudzkLHo9pakgyvs2Pbafplnek=";
|
||||
})
|
||||
];
|
||||
|
||||
# Remove bundled libs
|
||||
postPatch = ''
|
||||
rm -r 7z zlib zopfli
|
||||
'';
|
||||
|
||||
buildInputs = [
|
||||
zlib
|
||||
zopfli
|
||||
];
|
||||
|
||||
preBuild = ''
|
||||
buildFlagsArray+=("LIBS=-lzopfli -lstdc++ -lz")
|
||||
'';
|
||||
|
||||
makeFlags = [ "CC=${stdenv.cc.targetPrefix}c++" ];
|
||||
|
||||
NIX_CFLAGS_COMPILE="-DENABLE_LOCAL_ZOPFLI";
|
||||
|
||||
installPhase = ''
|
||||
runHook preInstall
|
||||
install -Dm755 gif2apng $out/bin/gif2apng
|
||||
runHook postInstall
|
||||
'';
|
||||
|
||||
meta = with lib; {
|
||||
homepage = "https://gif2apng.sourceforge.net/";
|
||||
description = "A simple program that converts animations from GIF to APNG format";
|
||||
license = licenses.zlib;
|
||||
maintainers = with maintainers; [ fgaz ];
|
||||
platforms = platforms.all;
|
||||
};
|
||||
}
|
@ -17328,6 +17328,8 @@ with pkgs;
|
||||
|
||||
apng2gif = callPackage ../tools/graphics/apng2gif { };
|
||||
|
||||
gif2apng = callPackage ../tools/graphics/gif2apng { };
|
||||
|
||||
kt = callPackage ../tools/misc/kt { };
|
||||
|
||||
argbash = callPackage ../development/tools/misc/argbash { };
|
||||
|
Loading…
Reference in New Issue
Block a user