2022-05-08 09:05:15 +02:00
|
|
|
{ fetchurl, fetchpatch, lib, stdenv, libX11, xorgproto, libXext, libXtst
|
2021-01-17 10:17:16 +01:00
|
|
|
, gtk2, libXi, pkg-config, texinfo }:
|
2011-01-30 17:11:36 +01:00
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
2014-08-27 15:55:26 +02:00
|
|
|
version = "3.19";
|
2019-08-15 14:41:18 +02:00
|
|
|
pname = "xnee";
|
2011-01-30 17:11:36 +01:00
|
|
|
|
2008-08-14 11:25:26 +02:00
|
|
|
src = fetchurl {
|
2019-08-15 14:41:18 +02:00
|
|
|
url = "mirror://gnu/xnee/${pname}-${version}.tar.gz";
|
2014-08-27 15:55:26 +02:00
|
|
|
sha256 = "04n2lac0vgpv8zsn7nmb50hf3qb56pmj90dmwnivg09gyrf1x92j";
|
2008-08-14 11:25:26 +02:00
|
|
|
};
|
|
|
|
|
2022-05-08 09:05:15 +02:00
|
|
|
patches = [
|
|
|
|
# Pull fix pending upstream inclusion for -fno-common
|
|
|
|
# toolchain support: https://savannah.gnu.org/bugs/?58810
|
|
|
|
(fetchpatch {
|
|
|
|
name = "fno-common.patch";
|
|
|
|
url = "https://savannah.gnu.org/bugs/download.php?file_id=49534";
|
|
|
|
sha256 = "04j2cjy2yaiigg31a6k01vw0fq19yj3zpriikkjcz9q4ab4m5gh2";
|
|
|
|
})
|
|
|
|
];
|
|
|
|
|
|
|
|
postPatch =
|
2011-01-30 17:11:36 +01:00
|
|
|
'' for i in `find cnee/test -name \*.sh`
|
|
|
|
do
|
2019-01-15 23:41:31 +01:00
|
|
|
sed -i "$i" -e's|/bin/bash|${stdenv.shell}|g ; s|/usr/bin/env bash|${stdenv.shell}|g'
|
2011-01-30 17:11:36 +01:00
|
|
|
done
|
2022-01-09 16:58:31 +01:00
|
|
|
|
|
|
|
# Fix for glibc-2.34. For some reason, `LIBSEMA="CCC"` is added
|
|
|
|
# if `sem_init` is part of libc which causes errors like
|
|
|
|
# `gcc: error: CCC: No such file or directory` during the build.
|
|
|
|
substituteInPlace configure \
|
|
|
|
--replace 'LIBSEMA="CCC"' 'LIBSEMA=""'
|
2011-01-30 17:11:36 +01:00
|
|
|
'';
|
|
|
|
|
2022-09-25 04:49:25 +02:00
|
|
|
nativeBuildInputs = [ pkg-config ];
|
2011-01-30 17:11:36 +01:00
|
|
|
buildInputs =
|
2018-12-31 04:40:47 +01:00
|
|
|
[ libX11 xorgproto libXext libXtst gtk2
|
2022-09-25 04:49:25 +02:00
|
|
|
libXi
|
2011-01-30 17:11:36 +01:00
|
|
|
texinfo
|
|
|
|
];
|
|
|
|
|
|
|
|
configureFlags =
|
|
|
|
# Do a static build because `libxnee' doesn't get installed anyway.
|
2011-08-22 19:38:53 +02:00
|
|
|
[ "--disable-gnome-applet" "--enable-static" ];
|
2011-01-30 17:11:36 +01:00
|
|
|
|
|
|
|
# `cnee' is linked without `-lXi' and as a consequence has a RUNPATH that
|
|
|
|
# lacks libXi.
|
2019-10-27 14:03:25 +01:00
|
|
|
makeFlags = [ "LDFLAGS=-lXi" ];
|
2011-01-30 17:11:36 +01:00
|
|
|
|
|
|
|
# XXX: Actually tests require an X server.
|
|
|
|
doCheck = true;
|
2008-08-14 11:25:26 +02:00
|
|
|
|
|
|
|
meta = {
|
2014-08-24 16:21:08 +02:00
|
|
|
description = "X11 event recording and replay tool";
|
2011-01-30 17:11:36 +01:00
|
|
|
|
|
|
|
longDescription =
|
|
|
|
'' Xnee is a suite of programs that can record, replay and distribute
|
|
|
|
user actions under the X11 environment. Think of it as a robot that
|
|
|
|
can imitate the job you just did. Xnee can be used to automate
|
|
|
|
tests, demonstrate programs, distribute actions, record & replay
|
|
|
|
"macros", retype a file.
|
|
|
|
'';
|
|
|
|
|
2021-01-15 10:19:50 +01:00
|
|
|
license = lib.licenses.gpl3Plus;
|
2011-01-30 17:11:36 +01:00
|
|
|
|
2020-04-01 03:11:51 +02:00
|
|
|
homepage = "https://www.gnu.org/software/xnee/";
|
2011-01-30 17:11:36 +01:00
|
|
|
|
2021-01-15 10:19:50 +01:00
|
|
|
maintainers = with lib.maintainers; [ ];
|
2021-01-15 14:21:58 +01:00
|
|
|
platforms = lib.platforms.gnu ++ lib.platforms.linux; # arbitrary choice
|
2008-08-14 11:25:26 +02:00
|
|
|
};
|
|
|
|
}
|