datalad: fix changed hash from upstream (#364015)
[NixPkgs.git] / pkgs / by-name / xc / xcur2png / package.nix
blob768207cf676d43703a25c0d49d1cd3d10a86af4e
2   lib,
3   stdenv,
4   fetchFromGitHub,
5   fetchpatch,
6   pkg-config,
7   libpng,
8   xorg,
9 }:
11 stdenv.mkDerivation rec {
12   pname = "xcur2png";
13   version = "0.7.1";
15   src = fetchFromGitHub {
16     owner = "eworm-de";
17     repo = pname;
18     rev = version;
19     sha256 = "0858wn2p14bxpv9lvaz2bz1rk6zk0g8zgxf8iy595m8fqv4q2fya";
20   };
22   patches = [
23     # https://github.com/eworm-de/xcur2png/pull/3
24     ./malloc.diff
26     # fix byte overflows due to off-by-one error
27     (fetchpatch {
28       url = "https://github.com/eworm-de/xcur2png/commit/aa035462d950fab35d322cb87fd2f0d702251e82.patch";
29       hash = "sha256-hlmJ/bcDSl1ADs0jp+JrAgAaMzielUSRVPad+plnSZg=";
30     })
32     # fix gcc-14-build:
33     #   https://github.com/eworm-de/xcur2png/pull/4
34     (fetchpatch {
35       url = "https://github.com/eworm-de/xcur2png/commit/6fb03957aba8aebc3dc98a479fff9cddf85b9e7b.patch";
36       hash = "sha256-COG4/MKfBAwQU5FqZeqEE4jJT4XII7AQ6ayRSuFcUmY=";
37     })
38   ];
40   nativeBuildInputs = [
41     pkg-config
42   ];
44   buildInputs = [
45     libpng
46     xorg.libX11
47     xorg.libXcursor
48     xorg.xorgproto
49   ];
51   meta = with lib; {
52     homepage = "https://github.com/eworm-de/xcur2png/releases";
53     description = "Convert X cursors to PNG images";
54     license = licenses.gpl3;
55     platforms = platforms.unix;
56     maintainers = with maintainers; [ romildo ];
57     mainProgram = "xcur2png";
58   };