Merge master into staging-next
This commit is contained in:
commit
bc845e51f0
|
@ -13,7 +13,7 @@ in {
|
||||||
};
|
};
|
||||||
|
|
||||||
config = mkIf cfg.enable {
|
config = mkIf cfg.enable {
|
||||||
systemd.user.services.spacenavd = {
|
systemd.services.spacenavd = {
|
||||||
description = "Daemon for the Spacenavigator 6DOF mice by 3Dconnexion";
|
description = "Daemon for the Spacenavigator 6DOF mice by 3Dconnexion";
|
||||||
after = [ "syslog.target" ];
|
after = [ "syslog.target" ];
|
||||||
wantedBy = [ "graphical.target" ];
|
wantedBy = [ "graphical.target" ];
|
||||||
|
|
|
@ -183,12 +183,12 @@ in {
|
||||||
};
|
};
|
||||||
|
|
||||||
package = mkOption {
|
package = mkOption {
|
||||||
default = pkgs.home-assistant.overrideAttrs (oldAttrs: {
|
default = pkgs.home-assistant.overridePythonAttrs (oldAttrs: {
|
||||||
doInstallCheck = false;
|
doCheck = false;
|
||||||
});
|
});
|
||||||
defaultText = literalExample ''
|
defaultText = literalExample ''
|
||||||
pkgs.home-assistant.overrideAttrs (oldAttrs: {
|
pkgs.home-assistant.overridePythonAttrs (oldAttrs: {
|
||||||
doInstallCheck = false;
|
doCheck = false;
|
||||||
})
|
})
|
||||||
'';
|
'';
|
||||||
type = types.package;
|
type = types.package;
|
||||||
|
|
|
@ -87,8 +87,8 @@ in {
|
||||||
SystemCallFilter = [
|
SystemCallFilter = [
|
||||||
"@system-service"
|
"@system-service"
|
||||||
|
|
||||||
"~@chown" "~@cpu-emulation" "~@debug" "~@ipc" "~@keyring" "~@memlock"
|
"~@chown" "~@cpu-emulation" "~@debug" "~@keyring" "~@memlock"
|
||||||
"~@module" "~@obsolete" "~@privileged" "~@process" "~@raw-io"
|
"~@module" "~@obsolete" "~@privileged" "~@raw-io"
|
||||||
"~@resources" "~@setuid"
|
"~@resources" "~@setuid"
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
|
|
|
@ -1,4 +1,5 @@
|
||||||
{ lib
|
{ lib
|
||||||
|
, stdenv
|
||||||
, mkDerivation
|
, mkDerivation
|
||||||
, fetchFromGitHub
|
, fetchFromGitHub
|
||||||
, fetchpatch
|
, fetchpatch
|
||||||
|
@ -35,7 +36,7 @@
|
||||||
, scipy
|
, scipy
|
||||||
, shiboken2
|
, shiboken2
|
||||||
, soqt
|
, soqt
|
||||||
, spaceNavSupport ? false
|
, spaceNavSupport ? stdenv.isLinux
|
||||||
, swig
|
, swig
|
||||||
, vtk
|
, vtk
|
||||||
, wrapQtAppsHook
|
, wrapQtAppsHook
|
||||||
|
|
|
@ -25,6 +25,7 @@
|
||||||
, mkDerivation
|
, mkDerivation
|
||||||
, qtmacextras
|
, qtmacextras
|
||||||
, qmake
|
, qmake
|
||||||
|
, spacenavSupport ? stdenv.isLinux, libspnav
|
||||||
}:
|
}:
|
||||||
|
|
||||||
mkDerivation rec {
|
mkDerivation rec {
|
||||||
|
@ -46,9 +47,15 @@ mkDerivation rec {
|
||||||
qtbase qtmultimedia qscintilla
|
qtbase qtmultimedia qscintilla
|
||||||
] ++ lib.optionals stdenv.isLinux [ libGLU libGL ]
|
] ++ lib.optionals stdenv.isLinux [ libGLU libGL ]
|
||||||
++ lib.optional stdenv.isDarwin qtmacextras
|
++ lib.optional stdenv.isDarwin qtmacextras
|
||||||
|
++ lib.optional spacenavSupport libspnav
|
||||||
;
|
;
|
||||||
|
|
||||||
qmakeFlags = [ "VERSION=${version}" ];
|
qmakeFlags = [ "VERSION=${version}" ] ++
|
||||||
|
lib.optionals spacenavSupport [
|
||||||
|
"ENABLE_SPNAV=1"
|
||||||
|
"SPNAV_INCLUDEPATH=${libspnav}/include"
|
||||||
|
"SPNAV_LIBPATH=${libspnav}/lib"
|
||||||
|
];
|
||||||
|
|
||||||
# src/lexer.l:36:10: fatal error: parser.hxx: No such file or directory
|
# src/lexer.l:36:10: fatal error: parser.hxx: No such file or directory
|
||||||
enableParallelBuilding = false; # true by default due to qmake
|
enableParallelBuilding = false; # true by default due to qmake
|
||||||
|
|
|
@ -7,9 +7,11 @@
|
||||||
, jackaudioSupport ? false, libjack2
|
, jackaudioSupport ? false, libjack2
|
||||||
, cudaSupport ? config.cudaSupport or false, cudatoolkit
|
, cudaSupport ? config.cudaSupport or false, cudatoolkit
|
||||||
, colladaSupport ? true, opencollada
|
, colladaSupport ? true, opencollada
|
||||||
, spaceNavSupport ? false, libspnav
|
, spaceNavSupport ? stdenv.isLinux, libspnav
|
||||||
, makeWrapper
|
, makeWrapper
|
||||||
, pugixml, llvmPackages, SDL, Cocoa, CoreGraphics, ForceFeedback, OpenAL, OpenGL
|
, pugixml, llvmPackages, SDL, Cocoa, CoreGraphics, ForceFeedback, OpenAL, OpenGL
|
||||||
|
, potrace
|
||||||
|
, openxr-loader
|
||||||
, embree, gmp
|
, embree, gmp
|
||||||
}:
|
}:
|
||||||
|
|
||||||
|
@ -24,11 +26,11 @@ let
|
||||||
in
|
in
|
||||||
stdenv.mkDerivation rec {
|
stdenv.mkDerivation rec {
|
||||||
pname = "blender";
|
pname = "blender";
|
||||||
version = "2.91.0";
|
version = "2.92.0";
|
||||||
|
|
||||||
src = fetchurl {
|
src = fetchurl {
|
||||||
url = "https://download.blender.org/source/${pname}-${version}.tar.xz";
|
url = "https://download.blender.org/source/${pname}-${version}.tar.xz";
|
||||||
sha256 = "0x396lgmk0dq9115yrc36s8zwxzmjr490sr5n2y6w27y17yllyjm";
|
sha256 = "15a5vffn18a920286x0avbc2rap56k6y531wgibq68r90g2cz4g7";
|
||||||
};
|
};
|
||||||
|
|
||||||
patches = lib.optional stdenv.isDarwin ./darwin.patch;
|
patches = lib.optional stdenv.isDarwin ./darwin.patch;
|
||||||
|
@ -44,11 +46,13 @@ stdenv.mkDerivation rec {
|
||||||
embree
|
embree
|
||||||
gmp
|
gmp
|
||||||
pugixml
|
pugixml
|
||||||
|
potrace
|
||||||
]
|
]
|
||||||
++ (if (!stdenv.isDarwin) then [
|
++ (if (!stdenv.isDarwin) then [
|
||||||
libXi libX11 libXext libXrender
|
libXi libX11 libXext libXrender
|
||||||
libGLU libGL openal
|
libGLU libGL openal
|
||||||
libXxf86vm
|
libXxf86vm
|
||||||
|
openxr-loader
|
||||||
# OpenVDB currently doesn't build on darwin
|
# OpenVDB currently doesn't build on darwin
|
||||||
openvdb
|
openvdb
|
||||||
]
|
]
|
||||||
|
@ -104,6 +108,7 @@ stdenv.mkDerivation rec {
|
||||||
"-DWITH_PYTHON_INSTALL=OFF"
|
"-DWITH_PYTHON_INSTALL=OFF"
|
||||||
"-DWITH_PYTHON_INSTALL_NUMPY=OFF"
|
"-DWITH_PYTHON_INSTALL_NUMPY=OFF"
|
||||||
"-DPYTHON_NUMPY_PATH=${python3Packages.numpy}/${python.sitePackages}"
|
"-DPYTHON_NUMPY_PATH=${python3Packages.numpy}/${python.sitePackages}"
|
||||||
|
"-DPYTHON_NUMPY_INCLUDE_DIRS=${python3Packages.numpy}/${python.sitePackages}/numpy/core/include"
|
||||||
"-DWITH_OPENVDB=ON"
|
"-DWITH_OPENVDB=ON"
|
||||||
"-DWITH_TBB=ON"
|
"-DWITH_TBB=ON"
|
||||||
"-DWITH_IMAGE_OPENJPEG=ON"
|
"-DWITH_IMAGE_OPENJPEG=ON"
|
||||||
|
|
|
@ -1,4 +1,5 @@
|
||||||
{ lib, stdenv
|
{ lib
|
||||||
|
, stdenv
|
||||||
, fetchurl
|
, fetchurl
|
||||||
, fetchFromGitHub
|
, fetchFromGitHub
|
||||||
, wrapQtAppsHook
|
, wrapQtAppsHook
|
||||||
|
@ -19,7 +20,7 @@
|
||||||
}:
|
}:
|
||||||
|
|
||||||
let
|
let
|
||||||
version = "4.0.9";
|
version = "4.1.1";
|
||||||
|
|
||||||
libsecp256k1_name =
|
libsecp256k1_name =
|
||||||
if stdenv.isLinux then "libsecp256k1.so.0"
|
if stdenv.isLinux then "libsecp256k1.so.0"
|
||||||
|
@ -35,7 +36,7 @@ let
|
||||||
owner = "spesmilo";
|
owner = "spesmilo";
|
||||||
repo = "electrum";
|
repo = "electrum";
|
||||||
rev = version;
|
rev = version;
|
||||||
sha256 = "0cmdyfabllw4wnpqpdxp3l6hjnm0cvkwxn0z8ph4x54sf4zq9iz3";
|
sha256 = "0zvv8nmjzw5pchykz5p28483nby4lp4ah7iqr08pv36gy89l51v5";
|
||||||
|
|
||||||
extraPostFetch = ''
|
extraPostFetch = ''
|
||||||
mv $out ./all
|
mv $out ./all
|
||||||
|
@ -50,7 +51,7 @@ python3.pkgs.buildPythonApplication {
|
||||||
|
|
||||||
src = fetchurl {
|
src = fetchurl {
|
||||||
url = "https://download.electrum.org/${version}/Electrum-${version}.tar.gz";
|
url = "https://download.electrum.org/${version}/Electrum-${version}.tar.gz";
|
||||||
sha256 = "1fvjiagi78f32nxgr2rx8jas8hxfvpp1c8fpfcalvykmlhdc2gva";
|
sha256 = "0yg6ld92a4xgn7y8i51hmr3kmgmrbrjwniikkmyq9q141h2drb80";
|
||||||
};
|
};
|
||||||
|
|
||||||
postUnpack = ''
|
postUnpack = ''
|
||||||
|
@ -77,10 +78,10 @@ python3.pkgs.buildPythonApplication {
|
||||||
requests
|
requests
|
||||||
tlslite-ng
|
tlslite-ng
|
||||||
# plugins
|
# plugins
|
||||||
|
btchip
|
||||||
ckcc-protocol
|
ckcc-protocol
|
||||||
keepkey
|
keepkey
|
||||||
trezor
|
trezor
|
||||||
btchip
|
|
||||||
] ++ lib.optionals enableQt [ pyqt5 qdarkstyle ];
|
] ++ lib.optionals enableQt [ pyqt5 qdarkstyle ];
|
||||||
|
|
||||||
preBuild = ''
|
preBuild = ''
|
||||||
|
@ -112,7 +113,7 @@ python3.pkgs.buildPythonApplication {
|
||||||
wrapQtApp $out/bin/electrum
|
wrapQtApp $out/bin/electrum
|
||||||
'';
|
'';
|
||||||
|
|
||||||
checkInputs = with python3.pkgs; [ pytestCheckHook pycryptodomex ];
|
checkInputs = with python3.pkgs; [ pytestCheckHook pyaes pycryptodomex ];
|
||||||
|
|
||||||
pytestFlagsArray = [ "electrum/tests" ];
|
pytestFlagsArray = [ "electrum/tests" ];
|
||||||
|
|
||||||
|
|
|
@ -0,0 +1,28 @@
|
||||||
|
{ 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";
|
||||||
|
};
|
||||||
|
|
||||||
|
postPatch = ''
|
||||||
|
sed -i s/4775/775/ Makefile.in
|
||||||
|
'';
|
||||||
|
|
||||||
|
nativeBuildInputs = [ pkg-config ];
|
||||||
|
buildInputs = [ gtk2 ];
|
||||||
|
|
||||||
|
meta = with lib; {
|
||||||
|
homepage = "http://spacenav.sourceforge.net/";
|
||||||
|
description = "Interactive configuration GUI for space navigator input devices";
|
||||||
|
license = licenses.gpl3Plus;
|
||||||
|
platforms = platforms.unix;
|
||||||
|
maintainers = with maintainers; [ gebner ];
|
||||||
|
};
|
||||||
|
}
|
|
@ -2,17 +2,23 @@
|
||||||
|
|
||||||
stdenv.mkDerivation rec {
|
stdenv.mkDerivation rec {
|
||||||
pname = "libfyaml";
|
pname = "libfyaml";
|
||||||
version = "0.6.3";
|
version = "0.7";
|
||||||
|
|
||||||
src = fetchFromGitHub {
|
src = fetchFromGitHub {
|
||||||
owner = "pantoniou";
|
owner = "pantoniou";
|
||||||
repo = pname;
|
repo = pname;
|
||||||
rev = "v${version}";
|
rev = "v${version}";
|
||||||
sha256 = "1aw5s0ns79jr3lpcy3hdsrlr79rrv5aqymv4h43axvy2bi90nrr0";
|
sha256 = "10w1n4zzgw33j755pkv73fxdn93kwbzg486b5m9i0bh5d76jp4ax";
|
||||||
};
|
};
|
||||||
|
|
||||||
nativeBuildInputs = [ autoreconfHook pkg-config ];
|
nativeBuildInputs = [ autoreconfHook pkg-config ];
|
||||||
|
|
||||||
|
doCheck = true;
|
||||||
|
|
||||||
|
preCheck = ''
|
||||||
|
patchShebangs test
|
||||||
|
'';
|
||||||
|
|
||||||
meta = with lib; {
|
meta = with lib; {
|
||||||
homepage = "https://github.com/pantoniou/libfyaml";
|
homepage = "https://github.com/pantoniou/libfyaml";
|
||||||
description = "Fully feature complete YAML parser and emitter, supporting the latest YAML spec and passing the full YAML testsuite";
|
description = "Fully feature complete YAML parser and emitter, supporting the latest YAML spec and passing the full YAML testsuite";
|
||||||
|
|
|
@ -1,47 +0,0 @@
|
||||||
diff --git a/spnav.c b/spnav.c
|
|
||||||
index f9e10f8..27149f7 100644
|
|
||||||
--- a/spnav.c
|
|
||||||
+++ b/spnav.c
|
|
||||||
@@ -36,7 +36,7 @@ OF SUCH DAMAGE.
|
|
||||||
#include <sys/select.h>
|
|
||||||
#include "spnav.h"
|
|
||||||
|
|
||||||
-#define SPNAV_SOCK_PATH "/var/run/spnav.sock"
|
|
||||||
+#define DEFAULT_SPNAV_SOCK_PATH "/run/spnav.sock"
|
|
||||||
|
|
||||||
#ifdef USE_X11
|
|
||||||
#include <X11/Xlib.h>
|
|
||||||
@@ -70,6 +70,24 @@ static struct event_node *ev_queue, *ev_queue_tail;
|
|
||||||
/* AF_UNIX socket used for alternative communication with daemon */
|
|
||||||
static int sock = -1;
|
|
||||||
|
|
||||||
+static char *spath = NULL;
|
|
||||||
+
|
|
||||||
+static char *socket_path()
|
|
||||||
+{
|
|
||||||
+ char *xdg_runtime_dir;
|
|
||||||
+ if((xdg_runtime_dir = getenv("XDG_RUNTIME_DIR"))) {
|
|
||||||
+ if ( spath == NULL ) {
|
|
||||||
+ spath = malloc(strlen(xdg_runtime_dir) + strlen("/spnav.sock") + 1);
|
|
||||||
+ if ( spath != NULL ) {
|
|
||||||
+ sprintf(spath, sizeof(spath), "%s/spnav.sock", xdg_runtime_dir);
|
|
||||||
+ }
|
|
||||||
+ }
|
|
||||||
+ if(access(spath, F_OK)){
|
|
||||||
+ return spath;
|
|
||||||
+ }
|
|
||||||
+ }
|
|
||||||
+ return DEFAULT_SPNAV_SOCK_PATH;
|
|
||||||
+}
|
|
||||||
|
|
||||||
int spnav_open(void)
|
|
||||||
{
|
|
||||||
@@ -92,7 +110,7 @@ int spnav_open(void)
|
|
||||||
|
|
||||||
memset(&addr, 0, sizeof addr);
|
|
||||||
addr.sun_family = AF_UNIX;
|
|
||||||
- strncpy(addr.sun_path, SPNAV_SOCK_PATH, sizeof(addr.sun_path));
|
|
||||||
+ strncpy(addr.sun_path, socket_path(), sizeof(addr.sun_path));
|
|
||||||
|
|
||||||
|
|
||||||
if(connect(s, (struct sockaddr*)&addr, sizeof addr) == -1) {
|
|
|
@ -13,12 +13,6 @@ stdenv.mkDerivation rec {
|
||||||
|
|
||||||
buildInputs = [ libX11 ];
|
buildInputs = [ libX11 ];
|
||||||
|
|
||||||
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
|
|
||||||
];
|
|
||||||
|
|
||||||
configureFlags = [ "--disable-debug"];
|
configureFlags = [ "--disable-debug"];
|
||||||
|
|
||||||
preInstall = ''
|
preInstall = ''
|
||||||
|
|
|
@ -1,13 +1,18 @@
|
||||||
{ lib, fetchPypi, buildPythonPackage, pythonOlder, attrs }:
|
{ lib
|
||||||
|
, fetchPypi
|
||||||
|
, buildPythonPackage
|
||||||
|
, pythonOlder
|
||||||
|
, attrs
|
||||||
|
}:
|
||||||
|
|
||||||
buildPythonPackage rec {
|
buildPythonPackage rec {
|
||||||
pname = "aiorpcx";
|
pname = "aiorpcx";
|
||||||
version = "0.18.4";
|
version = "0.18.7";
|
||||||
|
|
||||||
src = fetchPypi {
|
src = fetchPypi {
|
||||||
inherit version;
|
inherit version;
|
||||||
pname = "aiorpcX";
|
pname = "aiorpcX";
|
||||||
sha256 = "0jpvrkan6w8bpq017m8si7r9hb1pyw3ip4vr1fl2pmi8ngzc1jdy";
|
sha256 = "808a9ec9172df11677a0f7b459b69d1a6cf8b19c19da55541fa31fb1afce5ce7";
|
||||||
};
|
};
|
||||||
|
|
||||||
propagatedBuildInputs = [ attrs ];
|
propagatedBuildInputs = [ attrs ];
|
||||||
|
@ -17,9 +22,12 @@ buildPythonPackage rec {
|
||||||
# Checks needs internet access
|
# Checks needs internet access
|
||||||
doCheck = false;
|
doCheck = false;
|
||||||
|
|
||||||
meta = {
|
pythonImportsCheck = [ "aiorpcx" ];
|
||||||
|
|
||||||
|
meta = with lib; {
|
||||||
description = "Transport, protocol and framing-independent async RPC client and server implementation";
|
description = "Transport, protocol and framing-independent async RPC client and server implementation";
|
||||||
license = lib.licenses.mit;
|
|
||||||
homepage = "https://github.com/kyuupichan/aiorpcX";
|
homepage = "https://github.com/kyuupichan/aiorpcX";
|
||||||
|
license = licenses.mit;
|
||||||
|
maintainers = with maintainers; [ prusnak ];
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,118 +0,0 @@
|
||||||
diff --git a/src/proto_unix.c b/src/proto_unix.c
|
|
||||||
index 998f234..d38452c 100644
|
|
||||||
--- a/src/proto_unix.c
|
|
||||||
+++ b/src/proto_unix.c
|
|
||||||
@@ -36,11 +36,14 @@ enum {
|
|
||||||
|
|
||||||
static int lsock = -1;
|
|
||||||
|
|
||||||
+static char *spath = NULL;
|
|
||||||
+
|
|
||||||
int init_unix(void)
|
|
||||||
{
|
|
||||||
int s;
|
|
||||||
mode_t prev_umask;
|
|
||||||
struct sockaddr_un addr;
|
|
||||||
+ char *sock_path;
|
|
||||||
|
|
||||||
if(lsock >= 0) return 0;
|
|
||||||
|
|
||||||
@@ -49,16 +52,18 @@ int init_unix(void)
|
|
||||||
return -1;
|
|
||||||
}
|
|
||||||
|
|
||||||
- unlink(SOCK_NAME); /* in case it already exists */
|
|
||||||
+ sock_path = socket_path();
|
|
||||||
+
|
|
||||||
+ unlink(sock_path); /* in case it already exists */
|
|
||||||
|
|
||||||
memset(&addr, 0, sizeof addr);
|
|
||||||
addr.sun_family = AF_UNIX;
|
|
||||||
- strcpy(addr.sun_path, SOCK_NAME);
|
|
||||||
+ strcpy(addr.sun_path, sock_path);
|
|
||||||
|
|
||||||
prev_umask = umask(0);
|
|
||||||
|
|
||||||
if(bind(s, (struct sockaddr*)&addr, sizeof addr) == -1) {
|
|
||||||
- logmsg(LOG_ERR, "failed to bind unix socket: %s: %s\n", SOCK_NAME, strerror(errno));
|
|
||||||
+ logmsg(LOG_ERR, "failed to bind unix socket: %s: %s\n", sock_path, strerror(errno));
|
|
||||||
close(s);
|
|
||||||
return -1;
|
|
||||||
}
|
|
||||||
@@ -68,7 +73,7 @@ int init_unix(void)
|
|
||||||
if(listen(s, 8) == -1) {
|
|
||||||
logmsg(LOG_ERR, "listen failed: %s\n", strerror(errno));
|
|
||||||
close(s);
|
|
||||||
- unlink(SOCK_NAME);
|
|
||||||
+ unlink(sock_path);
|
|
||||||
return -1;
|
|
||||||
}
|
|
||||||
|
|
||||||
@@ -82,7 +87,7 @@ void close_unix(void)
|
|
||||||
close(lsock);
|
|
||||||
lsock = -1;
|
|
||||||
|
|
||||||
- unlink(SOCK_NAME);
|
|
||||||
+ unlink(socket_path());
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
@@ -173,3 +178,19 @@ int handle_uevents(fd_set *rset)
|
|
||||||
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
+
|
|
||||||
+char *socket_path(void)
|
|
||||||
+{
|
|
||||||
+ char *xdg_runtime_dir;
|
|
||||||
+ if((xdg_runtime_dir = getenv("XDG_RUNTIME_DIR"))) {
|
|
||||||
+ if ( spath == NULL ) {
|
|
||||||
+ spath = malloc(strlen(xdg_runtime_dir) + strlen("/spnav.sock") + 1);
|
|
||||||
+ if ( spath != NULL ) {
|
|
||||||
+ sprintf(spath, "%s/spnav.sock", xdg_runtime_dir);
|
|
||||||
+ }
|
|
||||||
+ };
|
|
||||||
+ return spath;
|
|
||||||
+ } else {
|
|
||||||
+ return DEFAULT_SOCK_NAME;
|
|
||||||
+ }
|
|
||||||
+}
|
|
||||||
diff --git a/src/proto_unix.h b/src/proto_unix.h
|
|
||||||
index 045b379..ec4509c 100644
|
|
||||||
--- a/src/proto_unix.h
|
|
||||||
+++ b/src/proto_unix.h
|
|
||||||
@@ -23,6 +23,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
||||||
#include "event.h"
|
|
||||||
#include "client.h"
|
|
||||||
|
|
||||||
+char *socket_path(void);
|
|
||||||
int init_unix(void);
|
|
||||||
void close_unix(void);
|
|
||||||
int get_unix_socket(void);
|
|
||||||
diff --git a/src/spnavd.c b/src/spnavd.c
|
|
||||||
index cbea191..03080da 100644
|
|
||||||
--- a/src/spnavd.c
|
|
||||||
+++ b/src/spnavd.c
|
|
||||||
@@ -344,7 +344,7 @@ static int find_running_daemon(void)
|
|
||||||
}
|
|
||||||
memset(&addr, 0, sizeof addr);
|
|
||||||
addr.sun_family = AF_UNIX;
|
|
||||||
- strncpy(addr.sun_path, SOCK_NAME, sizeof addr.sun_path);
|
|
||||||
+ strncpy(addr.sun_path, socket_path(), sizeof addr.sun_path);
|
|
||||||
|
|
||||||
if(connect(s, (struct sockaddr*)&addr, sizeof addr) == -1) {
|
|
||||||
close(s);
|
|
||||||
diff --git a/src/spnavd.h b/src/spnavd.h
|
|
||||||
index fa0a916..deea4e0 100644
|
|
||||||
--- a/src/spnavd.h
|
|
||||||
+++ b/src/spnavd.h
|
|
||||||
@@ -26,7 +26,8 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
||||||
#define DEF_CFGFILE "/etc/spnavrc"
|
|
||||||
#define DEF_LOGFILE "/var/log/spnavd.log"
|
|
||||||
|
|
||||||
-#define SOCK_NAME "/var/run/spnav.sock"
|
|
||||||
+#define DEFAULT_SOCK_NAME "/run/spnav.sock"
|
|
||||||
+#define SOCK_NAME_ENV "SPNAVD_SOCK_LOCATION"
|
|
||||||
#define PIDFILE "/var/run/spnavd.pid"
|
|
||||||
#define SYSLOG_ID "spnavd"
|
|
||||||
|
|
|
@ -13,12 +13,6 @@ stdenv.mkDerivation rec {
|
||||||
|
|
||||||
buildInputs = [ libX11 ];
|
buildInputs = [ libX11 ];
|
||||||
|
|
||||||
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
|
|
||||||
];
|
|
||||||
|
|
||||||
configureFlags = [ "--disable-debug"];
|
configureFlags = [ "--disable-debug"];
|
||||||
|
|
||||||
meta = with lib; {
|
meta = with lib; {
|
||||||
|
|
|
@ -12,6 +12,11 @@ stdenv.mkDerivation rec {
|
||||||
sha256 = "sha256-F/tKW81bAyYtwpxhl5XC8YyMB+6S0XmqqigwJY2WFDU=";
|
sha256 = "sha256-F/tKW81bAyYtwpxhl5XC8YyMB+6S0XmqqigwJY2WFDU=";
|
||||||
};
|
};
|
||||||
|
|
||||||
|
patches = [
|
||||||
|
# Look for kernel modules in /run/booted-system/kernel-modules/lib/modules/*
|
||||||
|
./nixos-paths.diff
|
||||||
|
];
|
||||||
|
|
||||||
nativeBuildInputs = [ autoreconfHook pkg-config ];
|
nativeBuildInputs = [ autoreconfHook pkg-config ];
|
||||||
buildInputs = [
|
buildInputs = [
|
||||||
i2c-tools udev libgudev
|
i2c-tools udev libgudev
|
||||||
|
|
|
@ -0,0 +1,32 @@
|
||||||
|
diff --git a/src/app_sysenv/query_sysenv_modules.c b/src/app_sysenv/query_sysenv_modules.c
|
||||||
|
index 59df64f1..fb244dd0 100644
|
||||||
|
--- a/src/app_sysenv/query_sysenv_modules.c
|
||||||
|
+++ b/src/app_sysenv/query_sysenv_modules.c
|
||||||
|
@@ -50,7 +50,9 @@ bool is_module_loadable(char * module_name, int depth) {
|
||||||
|
g_snprintf(module_name_ko, 100, "%s.ko", module_name);
|
||||||
|
|
||||||
|
char dirname[PATH_MAX];
|
||||||
|
- g_snprintf(dirname, PATH_MAX, "/lib/modules/%s/kernel/drivers/i2c", utsbuf.release);
|
||||||
|
+ g_snprintf(dirname, PATH_MAX,
|
||||||
|
+ "/run/booted-system/kernel-modules/lib/modules/%s/kernel/drivers/i2c",
|
||||||
|
+ utsbuf.release);
|
||||||
|
|
||||||
|
struct dirent *dent;
|
||||||
|
DIR *d;
|
||||||
|
diff --git a/src/util/linux_util.c b/src/util/linux_util.c
|
||||||
|
index 5eb8491c..3a129ccf 100644
|
||||||
|
--- a/src/util/linux_util.c
|
||||||
|
+++ b/src/util/linux_util.c
|
||||||
|
@@ -29,8 +29,10 @@ bool is_module_builtin(char * module_name)
|
||||||
|
int rc = uname(&utsbuf);
|
||||||
|
assert(rc == 0);
|
||||||
|
|
||||||
|
- char modules_builtin_fn[100];
|
||||||
|
- snprintf(modules_builtin_fn, 100, "/lib/modules/%s/modules.builtin", utsbuf.release);
|
||||||
|
+ char modules_builtin_fn[PATH_MAX];
|
||||||
|
+ snprintf(modules_builtin_fn, PATH_MAX,
|
||||||
|
+ "/run/booted-system/kernel-modules/lib/modules/%s/modules.builtin",
|
||||||
|
+ utsbuf.release);
|
||||||
|
|
||||||
|
char ko_name[40];
|
||||||
|
snprintf(ko_name, 40, "%s.ko", module_name);
|
|
@ -16,13 +16,13 @@
|
||||||
|
|
||||||
stdenv.mkDerivation rec {
|
stdenv.mkDerivation rec {
|
||||||
pname = "ytfzf";
|
pname = "ytfzf";
|
||||||
version = "1.1.1";
|
version = "1.1.2";
|
||||||
|
|
||||||
src = fetchFromGitHub {
|
src = fetchFromGitHub {
|
||||||
owner = "pystardust";
|
owner = "pystardust";
|
||||||
repo = "ytfzf";
|
repo = "ytfzf";
|
||||||
rev = "v${version}";
|
rev = "v${version}";
|
||||||
sha256 = "sha256-286rN3g6leSnbZZ0VjWl43nhBAMPJDUMv7DhgVTsjKw=";
|
sha256 = "09az557479d3s1my46d2w86ndkvs2xi127kaw0csag0wlq2qq10p";
|
||||||
};
|
};
|
||||||
|
|
||||||
patches = [
|
patches = [
|
||||||
|
|
|
@ -1,13 +1,13 @@
|
||||||
diff --git a/ytfzf b/ytfzf
|
diff --git a/ytfzf b/ytfzf
|
||||||
index f7871c7..179c836 100755
|
index 42f41c0..f75f5cb 100755
|
||||||
--- a/ytfzf
|
--- a/ytfzf
|
||||||
+++ b/ytfzf
|
+++ b/ytfzf
|
||||||
@@ -829,23 +829,8 @@ send_notify () {
|
@@ -892,23 +892,8 @@ send_notify () {
|
||||||
}
|
}
|
||||||
|
|
||||||
update_ytfzf () {
|
update_ytfzf () {
|
||||||
- local branch="$1"
|
- branch="$1"
|
||||||
- local updatefile="/tmp/ytfzf-update"
|
- updatefile="/tmp/ytfzf-update"
|
||||||
- curl -L "https://raw.githubusercontent.com/pystardust/ytfzf/$branch/ytfzf" -o "$updatefile"
|
- curl -L "https://raw.githubusercontent.com/pystardust/ytfzf/$branch/ytfzf" -o "$updatefile"
|
||||||
-
|
-
|
||||||
- if sed -n '1p' < "$updatefile" | grep -q '#!/bin/sh' ; then
|
- if sed -n '1p' < "$updatefile" | grep -q '#!/bin/sh' ; then
|
||||||
|
|
|
@ -30078,6 +30078,8 @@ in
|
||||||
|
|
||||||
spacenav-cube-example = callPackage ../applications/misc/spacenav-cube-example { };
|
spacenav-cube-example = callPackage ../applications/misc/spacenav-cube-example { };
|
||||||
|
|
||||||
|
spnavcfg = callPackage ../applications/misc/spnavcfg { };
|
||||||
|
|
||||||
splix = callPackage ../misc/cups/drivers/splix { };
|
splix = callPackage ../misc/cups/drivers/splix { };
|
||||||
|
|
||||||
steamcontroller = callPackage ../misc/drivers/steamcontroller { };
|
steamcontroller = callPackage ../misc/drivers/steamcontroller { };
|
||||||
|
|
Loading…
Reference in New Issue