2021-04-05 15:23:46 +00:00
|
|
|
{ stdenv, lib, fetchFromGitHub, pkg-config, gtk2 }:
|
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
pname = "spnavcfg";
|
|
|
|
version = "0.3.1";
|
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "FreeSpacenav";
|
|
|
|
repo = pname;
|
|
|
|
rev = "v${version}";
|
|
|
|
sha256 = "180mkdis15gxs79rr3f7hpwa1p6v81bybw37pzzdjnmqwqrc08a0";
|
|
|
|
};
|
|
|
|
|
2021-05-28 09:39:13 +00:00
|
|
|
patches = [
|
|
|
|
# Changes the pidfile path from /run/spnavd.pid to $XDG_RUNTIME_DIR/spnavd.pid
|
|
|
|
# to allow for a user service
|
|
|
|
./configure-pidfile-path.patch
|
|
|
|
# Changes the config file path from /etc/spnavrc to $XDG_CONFIG_HOME/spnavrc or $HOME/.config/spnavrc
|
|
|
|
# to allow for a user service
|
|
|
|
./configure-cfgfile-path.patch
|
|
|
|
];
|
|
|
|
|
2021-04-05 15:23:46 +00:00
|
|
|
postPatch = ''
|
|
|
|
sed -i s/4775/775/ Makefile.in
|
|
|
|
'';
|
|
|
|
|
|
|
|
nativeBuildInputs = [ pkg-config ];
|
|
|
|
buildInputs = [ gtk2 ];
|
|
|
|
|
2021-05-20 23:08:51 +00:00
|
|
|
makeFlags = [ "CC=${stdenv.cc.targetPrefix}cc" ];
|
|
|
|
|
2021-04-05 15:23:46 +00:00
|
|
|
meta = with lib; {
|
2023-02-02 18:25:31 +00:00
|
|
|
homepage = "https://spacenav.sourceforge.net/";
|
2021-04-05 15:23:46 +00:00
|
|
|
description = "Interactive configuration GUI for space navigator input devices";
|
|
|
|
license = licenses.gpl3Plus;
|
|
|
|
platforms = platforms.unix;
|
|
|
|
maintainers = with maintainers; [ gebner ];
|
|
|
|
};
|
|
|
|
}
|