nixpkgs/pkgs/by-name/xc/xcur2png/package.nix
aleksana 571c71e6f7 treewide: migrate packages to pkgs/by-name, take 1
We are migrating packages that meet below requirements:

1. using `callPackage`
2. called path is a directory
3. overriding set is empty (`{ }`)
4. not containing path expressions other than relative path (to
makenixpkgs-vet happy)
5. not referenced by nix files outside of the directory, other
than`pkgs/top-level/all-packages.nix`
6. not referencing nix files outside of the directory
7. not referencing `default.nix` (since it's changed to `package.nix`)
8. `outPath` doesn't change after migration

The tool is here: https://github.com/Aleksanaa/by-name-migrate.
2024-11-09 20:04:51 +08:00

60 lines
1.3 KiB
Nix

{
lib,
stdenv,
fetchFromGitHub,
fetchpatch,
pkg-config,
libpng,
xorg,
}:
stdenv.mkDerivation rec {
pname = "xcur2png";
version = "0.7.1";
src = fetchFromGitHub {
owner = "eworm-de";
repo = pname;
rev = version;
sha256 = "0858wn2p14bxpv9lvaz2bz1rk6zk0g8zgxf8iy595m8fqv4q2fya";
};
patches = [
# https://github.com/eworm-de/xcur2png/pull/3
./malloc.diff
# fix byte overflows due to off-by-one error
(fetchpatch {
url = "https://github.com/eworm-de/xcur2png/commit/aa035462d950fab35d322cb87fd2f0d702251e82.patch";
hash = "sha256-hlmJ/bcDSl1ADs0jp+JrAgAaMzielUSRVPad+plnSZg=";
})
# fix gcc-14-build:
# https://github.com/eworm-de/xcur2png/pull/4
(fetchpatch {
url = "https://github.com/eworm-de/xcur2png/commit/6fb03957aba8aebc3dc98a479fff9cddf85b9e7b.patch";
hash = "sha256-COG4/MKfBAwQU5FqZeqEE4jJT4XII7AQ6ayRSuFcUmY=";
})
];
nativeBuildInputs = [
pkg-config
];
buildInputs = [
libpng
xorg.libX11
xorg.libXcursor
xorg.xorgproto
];
meta = with lib; {
homepage = "https://github.com/eworm-de/xcur2png/releases";
description = "Convert X cursors to PNG images";
license = licenses.gpl3;
platforms = platforms.unix;
maintainers = with maintainers; [ romildo ];
mainProgram = "xcur2png";
};
}