2022-05-01 06:50:23 +00:00
|
|
|
{ lib, stdenv, fetchFromGitHub, automake, autoconf, libtool, flex, bison, texinfo, fetchpatch, pkgsStatic
|
|
|
|
, withNcurses ? true, ncurses
|
2015-04-30 22:31:11 +00:00
|
|
|
}:
|
2009-11-18 09:39:59 +00:00
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
2021-07-25 21:53:02 +00:00
|
|
|
pname = "gpm";
|
2022-05-01 06:50:23 +00:00
|
|
|
version = "unstable-2020-06-17";
|
2015-03-20 15:52:02 +00:00
|
|
|
|
2022-05-01 06:50:23 +00:00
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "telmich";
|
|
|
|
repo = "gpm";
|
|
|
|
rev = "e82d1a653ca94aa4ed12441424da6ce780b1e530";
|
|
|
|
sha256 = "0ndn6dwc87slvyqp2cnbb02a6hkjwb6zjhs6viysykv06hq7ihy6";
|
2009-11-18 09:39:59 +00:00
|
|
|
};
|
|
|
|
|
2017-11-07 07:33:48 +00:00
|
|
|
postPatch = ''
|
|
|
|
substituteInPlace src/prog/gpm-root.y --replace __sigemptyset sigemptyset
|
|
|
|
'';
|
|
|
|
|
2015-04-30 22:31:11 +00:00
|
|
|
nativeBuildInputs = [ automake autoconf libtool flex bison texinfo ];
|
|
|
|
buildInputs = [ ncurses ];
|
2009-11-18 09:39:59 +00:00
|
|
|
|
2016-02-26 17:38:15 +00:00
|
|
|
hardeningDisable = [ "format" ];
|
2015-12-23 01:59:47 +00:00
|
|
|
|
2018-07-18 16:40:18 +00:00
|
|
|
patches = [
|
2022-05-01 06:50:23 +00:00
|
|
|
(fetchpatch { # pull request telmich/gpm#42
|
|
|
|
url = "https://github.com/kaction/gpm/commit/217b4fe4c9b62298a4e9a54c1f07e3b52b013a09.patch";
|
|
|
|
sha256 = "1f74h12iph4z1dldbxk9imcq11805c3ai2xhbsqvx8jpjrcfp19q";
|
2021-09-12 07:17:28 +00:00
|
|
|
})
|
2022-06-20 23:05:21 +00:00
|
|
|
|
|
|
|
# Pull fix pending upstream inclusion to fix parallel installation:
|
|
|
|
# https://github.com/telmich/gpm/pull/43
|
|
|
|
(fetchpatch {
|
|
|
|
name = "parallel-install.patch";
|
|
|
|
url = "https://github.com/telmich/gpm/commit/a88fb82a7afe96e872bb31c554e9ad5888f5a451.patch";
|
|
|
|
sha256 = "0g1jhz9bjw7vqjv922xkhs8xkjxdqh11nj38jj3c8nv5lcil76nx";
|
|
|
|
})
|
2018-07-18 16:40:18 +00:00
|
|
|
];
|
2015-04-05 03:31:55 +00:00
|
|
|
preConfigure = ''
|
|
|
|
./autogen.sh
|
|
|
|
'';
|
|
|
|
|
|
|
|
configureFlags = [
|
|
|
|
"--sysconfdir=/etc"
|
|
|
|
"--localstatedir=/var"
|
2022-07-30 16:48:39 +00:00
|
|
|
(if withNcurses then "--with-curses" else "--without-curses")
|
2015-04-05 03:31:55 +00:00
|
|
|
];
|
2010-11-29 23:51:24 +00:00
|
|
|
|
2022-06-20 23:05:21 +00:00
|
|
|
enableParallelBuilding = true;
|
|
|
|
|
2015-04-30 22:31:11 +00:00
|
|
|
# Provide libgpm.so for compatability
|
2010-11-29 23:51:24 +00:00
|
|
|
postInstall = ''
|
2015-04-30 22:31:11 +00:00
|
|
|
ln -sv $out/lib/libgpm.so.2 $out/lib/libgpm.so
|
2010-11-29 23:51:24 +00:00
|
|
|
'';
|
|
|
|
|
2022-05-01 06:50:23 +00:00
|
|
|
passthru.tests.static = pkgsStatic.gpm;
|
|
|
|
|
2021-01-11 07:54:33 +00:00
|
|
|
meta = with lib; {
|
2020-04-01 01:11:51 +00:00
|
|
|
homepage = "https://www.nico.schottelius.org/software/gpm/";
|
2009-11-18 12:47:58 +00:00
|
|
|
description = "A daemon that provides mouse support on the Linux console";
|
2015-04-30 22:31:11 +00:00
|
|
|
license = licenses.gpl2;
|
2017-05-23 13:36:32 +00:00
|
|
|
platforms = platforms.linux ++ platforms.cygwin;
|
2019-01-26 10:01:09 +00:00
|
|
|
maintainers = with maintainers; [ eelco ];
|
2009-11-18 09:39:59 +00:00
|
|
|
};
|
|
|
|
}
|