1 { lib, stdenv, fetchFromGitHub, automake, autoconf, libtool, flex, bison, texinfo, fetchpatch, pkgsStatic
2 , withNcurses ? true, ncurses
5 stdenv.mkDerivation rec {
7 version = "unstable-2020-06-17";
9 src = fetchFromGitHub {
12 rev = "e82d1a653ca94aa4ed12441424da6ce780b1e530";
13 sha256 = "0ndn6dwc87slvyqp2cnbb02a6hkjwb6zjhs6viysykv06hq7ihy6";
17 substituteInPlace src/prog/gpm-root.y --replace __sigemptyset sigemptyset
20 nativeBuildInputs = [ automake autoconf libtool flex bison texinfo ];
21 buildInputs = [ ncurses ];
23 hardeningDisable = [ "format" ];
26 (fetchpatch { # pull request telmich/gpm#42
27 url = "https://github.com/kaction/gpm/commit/217b4fe4c9b62298a4e9a54c1f07e3b52b013a09.patch";
28 sha256 = "1f74h12iph4z1dldbxk9imcq11805c3ai2xhbsqvx8jpjrcfp19q";
31 # Pull fix pending upstream inclusion to fix parallel installation:
32 # https://github.com/telmich/gpm/pull/43
34 name = "parallel-install.patch";
35 url = "https://github.com/telmich/gpm/commit/a88fb82a7afe96e872bb31c554e9ad5888f5a451.patch";
36 sha256 = "0g1jhz9bjw7vqjv922xkhs8xkjxdqh11nj38jj3c8nv5lcil76nx";
45 "--localstatedir=/var"
46 (if withNcurses then "--with-curses" else "--without-curses")
49 enableParallelBuilding = true;
51 # Provide libgpm.so for compatibility
53 ln -sv $out/lib/libgpm.so.2 $out/lib/libgpm.so
56 passthru.tests.static = pkgsStatic.gpm;
59 homepage = "https://www.nico.schottelius.org/software/gpm/";
60 description = "A daemon that provides mouse support on the Linux console";
61 license = licenses.gpl2;
62 platforms = platforms.linux ++ platforms.cygwin;
63 maintainers = with maintainers; [ eelco ];