1
0
Fork 1
mirror of https://github.com/NixOS/nixpkgs.git synced 2024-11-18 11:40:45 +00:00
nixpkgs/pkgs/misc/drivers/spacenavd/default.nix

44 lines
1.2 KiB
Nix

{
stdenv,
lib,
fetchFromGitHub,
libXext,
libX11,
IOKit,
}:
stdenv.mkDerivation (finalAttrs: {
pname = "spacenavd";
version = "1.3";
src = fetchFromGitHub {
owner = "FreeSpacenav";
repo = "spacenavd";
rev = "refs/tags/v${finalAttrs.version}";
hash = "sha256-26geQYOXjMZZ/FpPpav7zfql0davTBwB4Ir+X1oep9Q=";
};
buildInputs = [
libX11
libXext
] ++ lib.optional stdenv.hostPlatform.isDarwin IOKit;
configureFlags = [ "--disable-debug" ];
makeFlags = [ "CC=${stdenv.cc.targetPrefix}cc" ];
postInstall = ''
install -Dm644 $src/contrib/systemd/spacenavd.service -t $out/lib/systemd/system
substituteInPlace $out/lib/systemd/system/spacenavd.service \
--replace-fail "/usr/local/bin/spacenavd" "$out/bin/spacenavd"
'';
meta = with lib; {
homepage = "https://spacenav.sourceforge.net/";
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.gpl3Plus;
platforms = platforms.unix;
maintainers = with maintainers; [ sohalt ];
};
})