2021-01-11 07:54:33 +00:00
|
|
|
{ lib, stdenv, fetchurl, automake, autoconf, libtool, flex, bison, texinfo, fetchpatch
|
2015-04-30 23:31:11 +01:00
|
|
|
|
|
|
|
# Optional Dependencies
|
|
|
|
, ncurses ? null
|
|
|
|
}:
|
2009-11-18 09:39:59 +00:00
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
2015-04-05 04:31:55 +01:00
|
|
|
name = "gpm-1.20.7";
|
2015-03-20 15:52:02 +00:00
|
|
|
|
2009-11-18 09:39:59 +00:00
|
|
|
src = fetchurl {
|
2018-03-25 06:04:25 +01:00
|
|
|
url = "https://www.nico.schottelius.org/software/gpm/archives/${name}.tar.bz2";
|
2015-04-05 04:31:55 +01:00
|
|
|
sha256 = "13d426a8h403ckpc8zyf7s2p5rql0lqbg2bv0454x0pvgbfbf4gh";
|
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 23:31:11 +01: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 17:40:18 +01:00
|
|
|
patches = [
|
|
|
|
# musl compat patches, safe everywhere
|
|
|
|
(fetchpatch {
|
|
|
|
url = "https://raw.githubusercontent.com/gentoo/musl/5aed405d87dfa92a5cab1596f898e9dea07169b8/sys-libs/gpm/files/gpm-1.20.7-musl-missing-headers.patch";
|
|
|
|
sha256 = "1g338m6j1sba84wlqp1r6rpabj5nm6ki577hjalg46czg0lfp20h";
|
|
|
|
})
|
|
|
|
# Touches same code as glibc fix in postPatch above, but on the non-glibc route
|
|
|
|
(fetchpatch {
|
|
|
|
url = "https://raw.githubusercontent.com/gentoo/musl/5aed405d87dfa92a5cab1596f898e9dea07169b8/sys-libs/gpm/files/gpm-1.20.7-musl-portable-sigaction.patch";
|
|
|
|
sha256 = "0hfdqm9977hd5dpzn05y0a6jbj55w1kp4hd9gyzmg9wslmxni4rg";
|
|
|
|
})
|
|
|
|
(fetchpatch {
|
|
|
|
url = "https://raw.githubusercontent.com/gentoo/musl/5aed405d87dfa92a5cab1596f898e9dea07169b8/sys-libs/gpm/files/gpm-1.20.7-sysmacros.patch";
|
|
|
|
sha256 = "0lg4l9phvy2n8gy17qsn6zn0qq52vm8g01pgq5kqpr8sd3fb21c2";
|
|
|
|
})
|
|
|
|
];
|
2015-04-05 04:31:55 +01:00
|
|
|
preConfigure = ''
|
|
|
|
./autogen.sh
|
|
|
|
'';
|
|
|
|
|
|
|
|
configureFlags = [
|
|
|
|
"--sysconfdir=/etc"
|
|
|
|
"--localstatedir=/var"
|
2015-04-30 23:31:11 +01:00
|
|
|
(if ncurses == null then "--without-curses" else "--with-curses")
|
2015-04-05 04:31:55 +01:00
|
|
|
];
|
2010-11-29 23:51:24 +00:00
|
|
|
|
2015-04-30 23:31:11 +01:00
|
|
|
# Provide libgpm.so for compatability
|
2010-11-29 23:51:24 +00:00
|
|
|
postInstall = ''
|
2015-04-30 23:31:11 +01:00
|
|
|
ln -sv $out/lib/libgpm.so.2 $out/lib/libgpm.so
|
2010-11-29 23:51:24 +00:00
|
|
|
'';
|
|
|
|
|
2021-01-11 07:54:33 +00:00
|
|
|
meta = with lib; {
|
2020-04-01 02:11:51 +01: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 23:31:11 +01:00
|
|
|
license = licenses.gpl2;
|
2017-05-23 14:36:32 +01: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
|
|
|
};
|
|
|
|
}
|