about summary refs log tree commit diff
path: root/nixpkgs/pkgs/applications/misc/spnavcfg/default.nix
diff options
context:
space:
mode:
Diffstat (limited to 'nixpkgs/pkgs/applications/misc/spnavcfg/default.nix')
-rw-r--r--nixpkgs/pkgs/applications/misc/spnavcfg/default.nix11
1 files changed, 11 insertions, 0 deletions
diff --git a/nixpkgs/pkgs/applications/misc/spnavcfg/default.nix b/nixpkgs/pkgs/applications/misc/spnavcfg/default.nix
index caeaa42192de..fcd4630e8039 100644
--- a/nixpkgs/pkgs/applications/misc/spnavcfg/default.nix
+++ b/nixpkgs/pkgs/applications/misc/spnavcfg/default.nix
@@ -11,6 +11,15 @@ stdenv.mkDerivation rec {
     sha256 = "180mkdis15gxs79rr3f7hpwa1p6v81bybw37pzzdjnmqwqrc08a0";
   };
 
+  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
+  ];
+
   postPatch = ''
     sed -i s/4775/775/ Makefile.in
   '';
@@ -18,6 +27,8 @@ stdenv.mkDerivation rec {
   nativeBuildInputs = [ pkg-config ];
   buildInputs = [ gtk2 ];
 
+  makeFlags = [ "CC=${stdenv.cc.targetPrefix}cc" ];
+
   meta = with lib; {
     homepage = "http://spacenav.sourceforge.net/";
     description = "Interactive configuration GUI for space navigator input devices";