Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
at netboot-syslinux-multiplatform 46 lines 1.7 kB view raw
1{ stdenv, lib, fetchFromGitHub, fetchpatch, libX11, IOKit }: 2 3stdenv.mkDerivation rec { 4 version = "0.8"; 5 pname = "spacenavd"; 6 7 src = fetchFromGitHub { 8 owner = "FreeSpacenav"; 9 repo = "spacenavd"; 10 rev = "v${version}"; 11 sha256 = "1zz0cm5cgvp9s5n4nzksl8rb11c7sw214bdafzra74smvqfjcjcf"; 12 }; 13 14 patches = [ 15 # Fixes Darwin: https://github.com/FreeSpacenav/spacenavd/pull/38 16 (fetchpatch { 17 url = "https://github.com/FreeSpacenav/spacenavd/commit/d6a25d5c3f49b9676d039775efc8bf854737c43c.patch"; 18 sha256 = "02pdgcvaqc20qf9hi3r73nb9ds7yk2ps9nnxaj0x9p50xjnhfg5c"; 19 }) 20 # Changes the socket path from /run/spnav.sock to $XDG_RUNTIME_DIR/spnav.sock 21 # to allow for a user service 22 ./configure-socket-path.patch 23 # Changes the pidfile path from /run/spnavd.pid to $XDG_RUNTIME_DIR/spnavd.pid 24 # to allow for a user service 25 ./configure-pidfile-path.patch 26 # Changes the config file path from /etc/spnavrc to $XDG_CONFIG_HOME/spnavrc or $HOME/.config/spnavrc 27 # to allow for a user service 28 ./configure-cfgfile-path.patch 29 ]; 30 31 buildInputs = [ libX11 ] 32 ++ lib.optional stdenv.isDarwin IOKit; 33 34 configureFlags = [ "--disable-debug" ]; 35 36 makeFlags = [ "CC=${stdenv.cc.targetPrefix}cc" ]; 37 38 meta = with lib; { 39 homepage = "https://spacenav.sourceforge.net/"; 40 description = "Device driver and SDK for 3Dconnexion 3D input devices"; 41 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)"; 42 license = licenses.gpl3Plus; 43 platforms = platforms.unix; 44 maintainers = with maintainers; [ sohalt ]; 45 }; 46}