sqlite_orm: 1.9 -> 1.9.1 (#379250)
[NixPkgs.git] / pkgs / by-name / xn / xnee / package.nix
blobadccf198f2ac8f67f19af51dc8f025faf619003d
2   lib,
3   stdenv,
4   fetchurl,
5   fetchpatch,
6   fetchDebianPatch,
7   autoreconfHook,
8   pkg-config,
9   gtk2,
10   libX11,
11   libXext,
12   libXi,
13   libXtst,
14   texinfo,
15   xorgproto,
18 stdenv.mkDerivation (finalAttrs: {
19   version = "3.19";
20   pname = "xnee";
22   src = fetchurl {
23     url = "mirror://gnu/xnee/xnee-${finalAttrs.version}.tar.gz";
24     hash = "sha256-UqQeXPYvgbej5bWBJOs1ZeHhICir2mP1R/u+DZiiwhI=";
25   };
27   patches = [
28     # Pull fix pending upstream inclusion for -fno-common
29     # toolchain support: https://savannah.gnu.org/bugs/?58810
30     (fetchpatch {
31       name = "fno-common.patch";
32       url = "https://savannah.gnu.org/bugs/download.php?file_id=49534";
33       hash = "sha256-Ar5SyVIEp8/knDHm+4f0KWAH+A5gGhXGezEqL7xkQhI=";
34     })
35     (fetchDebianPatch {
36       inherit (finalAttrs) pname version;
37       debianRevision = "9.2";
38       patch = "fix-implicit-declarations.patch";
39       hash = "sha256-ct/ATuiC6b7rw9n2wsRNKvfj02i7V20bMOzL7pKDd0A=";
40     })
41   ];
43   postPatch =
44     ''
45       for i in `find cnee/test -name \*.sh`; do
46         sed -i "$i" -e's|/bin/bash|${stdenv.shell}|g ; s|/usr/bin/env bash|${stdenv.shell}|g'
47       done
48     ''
49     # Fix for glibc-2.34. For some reason, `LIBSEMA="CCC"` is added
50     # if `sem_init` is part of libc which causes errors like
51     # `gcc: error: CCC: No such file or directory` during the build.
52     + ''
53       substituteInPlace configure* \
54         --replace 'LIBSEMA="CCC"' 'LIBSEMA=""'
55     '';
57   strictDeps = true;
59   nativeBuildInputs = [
60     autoreconfHook
61     pkg-config
62   ];
64   buildInputs = [
65     gtk2
66     libX11
67     libXext
68     libXi
69     libXtst
70     texinfo
71     xorgproto
72   ];
74   configureFlags = [
75     "--disable-gnome-applet"
76     # Do a static build because `libxnee' doesn't get installed anyway.
77     "--enable-static"
78   ];
80   makeFlags = [
81     # `cnee' is linked without `-lXi' and as a consequence has a RUNPATH that
82     # lacks libXi.
83     "LDFLAGS=-lXi"
84   ];
86   # error: call to undeclared function 'xnee_check_key';
87   # ISO C99 and later do not support implicit function declarations
88   env = lib.optionalAttrs stdenv.cc.isClang {
89     NIX_CFLAGS_COMPILE = "-Wno-error=implicit-function-declaration";
90   };
92   # XXX: Actually tests require an X server.
93   doCheck = true;
95   meta = {
96     description = "X11 event recording and replay tool";
97     longDescription = ''
98       Xnee is a suite of programs that can record, replay and distribute
99       user actions under the X11 environment.  Think of it as a robot that
100       can imitate the job you just did.  Xnee can be used to automate
101       tests, demonstrate programs, distribute actions, record & replay
102       "macros", retype a file.
103     '';
104     homepage = "https://www.gnu.org/software/xnee/";
105     license = lib.licenses.gpl3Plus;
106     maintainers = with lib.maintainers; [ wegank ];
107     platforms = lib.platforms.unix;
108   };