2021-05-20 23:08:51 +00:00
|
|
|
{ stdenv, lib, fetchFromGitHub, libX11, fixDarwinDylibNames }:
|
2021-03-09 03:18:52 +00:00
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
version = "0.2.3";
|
|
|
|
pname = "libspnav";
|
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "FreeSpacenav";
|
|
|
|
repo = "libspnav";
|
|
|
|
rev = "${pname}-${version}";
|
|
|
|
sha256 = "098h1jhlj87axpza5zgy58prp0zn94wyrbch6x0s7q4mzh7dc8ba";
|
|
|
|
};
|
|
|
|
|
2021-05-20 23:08:51 +00:00
|
|
|
nativeBuildInputs = lib.optional stdenv.isDarwin fixDarwinDylibNames;
|
2021-03-09 03:18:52 +00:00
|
|
|
buildInputs = [ libX11 ];
|
|
|
|
|
2021-05-28 09:39:13 +00:00
|
|
|
patches = [
|
|
|
|
# Changes the socket path from /run/spnav.sock to $XDG_RUNTIME_DIR/spnav.sock
|
|
|
|
# to allow for a user service
|
|
|
|
./configure-socket-path.patch
|
|
|
|
];
|
|
|
|
|
2021-03-09 03:18:52 +00:00
|
|
|
configureFlags = [ "--disable-debug"];
|
2022-06-16 17:23:12 +00:00
|
|
|
makeFlags = [
|
|
|
|
"CC=${stdenv.cc.targetPrefix}cc"
|
|
|
|
"AR=${stdenv.cc.targetPrefix}ar"
|
|
|
|
];
|
2021-03-09 03:18:52 +00:00
|
|
|
|
|
|
|
preInstall = ''
|
|
|
|
mkdir -p $out/{lib,include}
|
|
|
|
'';
|
|
|
|
|
|
|
|
meta = with lib; {
|
2023-02-02 18:25:31 +00:00
|
|
|
homepage = "https://spacenav.sourceforge.net/";
|
2021-03-09 03:18:52 +00:00
|
|
|
description = "Device driver and SDK for 3Dconnexion 3D input devices";
|
|
|
|
longDescription = "A free, compatible alternative, to the proprietary 3Dconnexion device driver and SDK, for their 3D input devices (called 'space navigator', 'space pilot', 'space traveller', etc)";
|
|
|
|
license = licenses.bsd3;
|
|
|
|
platforms = platforms.unix;
|
|
|
|
maintainers = with maintainers; [ sohalt ];
|
|
|
|
};
|
|
|
|
}
|