Merge master into staging-next

authored by

github-actions[bot] and committed by
GitHub
563389a7 cc35c7fc

+550 -26
+1 -2
nixos/modules/services/hardware/spacenavd.nix
··· 13 }; 14 15 config = mkIf cfg.enable { 16 - systemd.services.spacenavd = { 17 description = "Daemon for the Spacenavigator 6DOF mice by 3Dconnexion"; 18 after = [ "syslog.target" ]; 19 wantedBy = [ "graphical.target" ]; 20 serviceConfig = { 21 ExecStart = "${pkgs.spacenavd}/bin/spacenavd -d -l syslog"; 22 - StandardError = "syslog"; 23 }; 24 }; 25 };
··· 13 }; 14 15 config = mkIf cfg.enable { 16 + systemd.user.services.spacenavd = { 17 description = "Daemon for the Spacenavigator 6DOF mice by 3Dconnexion"; 18 after = [ "syslog.target" ]; 19 wantedBy = [ "graphical.target" ]; 20 serviceConfig = { 21 ExecStart = "${pkgs.spacenavd}/bin/spacenavd -d -l syslog"; 22 }; 23 }; 24 };
+7 -1
nixos/modules/services/misc/nix-daemon.nix
··· 12 13 isNix23 = versionAtLeast nixVersion "2.3pre"; 14 15 makeNixBuildUser = nr: { 16 name = "nixbld${toString nr}"; 17 value = { ··· 41 max-jobs = ${toString (cfg.maxJobs)} 42 cores = ${toString (cfg.buildCores)} 43 sandbox = ${if (builtins.isBool cfg.useSandbox) then boolToString cfg.useSandbox else cfg.useSandbox} 44 - extra-sandbox-paths = ${toString cfg.sandboxPaths} 45 substituters = ${toString cfg.binaryCaches} 46 trusted-substituters = ${toString cfg.trustedBinaryCaches} 47 trusted-public-keys = ${toString cfg.binaryCachePublicKeys}
··· 12 13 isNix23 = versionAtLeast nixVersion "2.3pre"; 14 15 + isNix24 = versionAtLeast nixVersion "2.4pre"; 16 + 17 makeNixBuildUser = nr: { 18 name = "nixbld${toString nr}"; 19 value = { ··· 43 max-jobs = ${toString (cfg.maxJobs)} 44 cores = ${toString (cfg.buildCores)} 45 sandbox = ${if (builtins.isBool cfg.useSandbox) then boolToString cfg.useSandbox else cfg.useSandbox} 46 + ${if isNix24 then '' 47 + sandbox-paths = ${toString cfg.sandboxPaths} 48 + '' else '' 49 + extra-sandbox-paths = ${toString cfg.sandboxPaths} 50 + ''} 51 substituters = ${toString cfg.binaryCaches} 52 trusted-substituters = ${toString cfg.trustedBinaryCaches} 53 trusted-public-keys = ${toString cfg.binaryCachePublicKeys}
+2
pkgs/applications/graphics/freecad/default.nix
··· 23 , opencascade-occt 24 , pivy 25 , pkg-config 26 , pycollada 27 , pyside2 28 , pyside2-tools ··· 80 ode 81 opencascade-occt 82 pivy 83 pycollada 84 pyside2 85 pyside2-tools
··· 23 , opencascade-occt 24 , pivy 25 , pkg-config 26 + , ply 27 , pycollada 28 , pyside2 29 , pyside2-tools ··· 81 ode 82 opencascade-occt 83 pivy 84 + ply # for openSCAD file support 85 pycollada 86 pyside2 87 pyside2-tools
+3 -5
pkgs/applications/misc/rofimoji/default.nix
··· 6 , x11Support ? true 7 8 , ConfigArgParse 9 - , pyxdg 10 , rofi 11 , wl-clipboard 12 , wtype ··· 16 17 buildPythonApplication rec { 18 pname = "rofimoji"; 19 - version = "4.3.0"; 20 21 src = fetchFromGitHub { 22 owner = "fdw"; 23 repo = "rofimoji"; 24 rev = version; 25 - sha256 = "08ayndpifr04njpijc5n5ii5nvibfpab39p6ngyyj0pb43792a8j"; 26 }; 27 28 # `rofi` and the `waylandSupport` and `x11Support` dependencies 29 # contain binaries needed at runtime. 30 - propagatedBuildInputs = with lib; [ ConfigArgParse pyxdg rofi ] 31 ++ optionals waylandSupport [ wl-clipboard wtype ] 32 ++ optionals x11Support [ xdotool xsel ]; 33 ··· 35 # and has additional dependencies. 36 postPatch = '' 37 rm -rf extractors 38 - substituteInPlace setup.py --replace 'pyxdg==0.26' 'pyxdg' 39 ''; 40 41 # no tests executed
··· 6 , x11Support ? true 7 8 , ConfigArgParse 9 , rofi 10 , wl-clipboard 11 , wtype ··· 15 16 buildPythonApplication rec { 17 pname = "rofimoji"; 18 + version = "5.1.0"; 19 20 src = fetchFromGitHub { 21 owner = "fdw"; 22 repo = "rofimoji"; 23 rev = version; 24 + sha256 = "sha256-bLV0hYDjVH11euvNHUHZFcCVywuceRljkCqyX4aANVs="; 25 }; 26 27 # `rofi` and the `waylandSupport` and `x11Support` dependencies 28 # contain binaries needed at runtime. 29 + propagatedBuildInputs = with lib; [ ConfigArgParse rofi ] 30 ++ optionals waylandSupport [ wl-clipboard wtype ] 31 ++ optionals x11Support [ xdotool xsel ]; 32 ··· 34 # and has additional dependencies. 35 postPatch = '' 36 rm -rf extractors 37 ''; 38 39 # no tests executed
+100
pkgs/applications/misc/spnavcfg/configure-cfgfile-path.patch
···
··· 1 + diff --git a/back.c b/back.c 2 + index c1810dc..75416fb 100644 3 + --- a/back.c 4 + +++ b/back.c 5 + @@ -25,7 +25,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. 6 + #include "cfgfile.h" 7 + #include "cmd.h" 8 + 9 + -#define CFGFILE "/etc/spnavrc" 10 + 11 + int get_daemon_pid(void); 12 + static int update_cfg(void); 13 + @@ -127,7 +126,7 @@ int get_daemon_pid(void) 14 + 15 + static int update_cfg(void) 16 + { 17 + - if(write_cfg(CFGFILE, &cfg) == -1) { 18 + + if(write_cfg(cfg_path(), &cfg) == -1) { 19 + fprintf(stderr, "failed to update config file\n"); 20 + return -1; 21 + } 22 + diff --git a/cfgfile.c b/cfgfile.c 23 + index 5a9c502..2ea323d 100644 24 + --- a/cfgfile.c 25 + +++ b/cfgfile.c 26 + @@ -22,12 +22,40 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. 27 + #include <ctype.h> 28 + #include <errno.h> 29 + #include <fcntl.h> 30 + +#include <unistd.h> 31 + +#include <sys/types.h> 32 + +#include <pwd.h> 33 + #include "cfgfile.h" 34 + 35 + enum {TX, TY, TZ, RX, RY, RZ}; 36 + 37 + static const int def_axmap[] = {0, 2, 1, 3, 5, 4}; 38 + static const int def_axinv[] = {0, 1, 1, 0, 1, 1}; 39 + +static char* config_path; 40 + + 41 + +char* cfg_path() 42 + +{ 43 + + char* buf; 44 + + if((buf = getenv("XDG_CONFIG_HOME"))) { 45 + + if(config_path == NULL) { 46 + + config_path = malloc(strlen(buf) + strlen("/spnavrc") + 1); 47 + + if ( config_path != NULL) { 48 + + sprintf(config_path, "%s/spnavrc", buf); 49 + + } 50 + + }; 51 + + return config_path; 52 + + } else { 53 + + if (!(buf = getenv("HOME"))) { 54 + + struct passwd *pw = getpwuid(getuid()); 55 + + buf = pw->pw_dir; 56 + + } 57 + + config_path = malloc(strlen(buf) + strlen("/.config/spnavrc") + 1); 58 + + if ( config_path != NULL) { 59 + + sprintf(config_path, "%s/.config/spnavrc", buf); 60 + + } 61 + + return config_path; 62 + + } 63 + +} 64 + 65 + void default_cfg(struct cfg *cfg) 66 + { 67 + diff --git a/cfgfile.h b/cfgfile.h 68 + index dfed8c9..5bb1b2c 100644 69 + --- a/cfgfile.h 70 + +++ b/cfgfile.h 71 + @@ -47,6 +47,7 @@ struct cfg { 72 + int devid[MAX_CUSTOM][2]; /* custom USB vendor/product id list */ 73 + }; 74 + 75 + +char* cfg_path(void); 76 + void default_cfg(struct cfg *cfg); 77 + int read_cfg(const char *fname, struct cfg *cfg); 78 + int write_cfg(const char *fname, struct cfg *cfg); 79 + diff --git a/front_gtk.c b/front_gtk.c 80 + index e4c2cd7..6a800a0 100644 81 + --- a/front_gtk.c 82 + +++ b/front_gtk.c 83 + @@ -28,8 +28,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. 84 + #include "cmd.h" 85 + #include "ui.h" 86 + 87 + -#define CFGFILE "/etc/spnavrc" 88 + - 89 + #define CHK_AXINV_TRANS_X "axinv_trans_x" 90 + #define CHK_AXINV_TRANS_Y "axinv_trans_y" 91 + #define CHK_AXINV_TRANS_Z "axinv_trans_z" 92 + @@ -121,7 +119,7 @@ void frontend(int pfd) 93 + 94 + gtk_init(&argc, 0); 95 + 96 + - read_cfg(CFGFILE, &cfg); 97 + + read_cfg(cfg_path(), &cfg); 98 + 99 + create_ui(); 100 +
+40
pkgs/applications/misc/spnavcfg/configure-pidfile-path.patch
···
··· 1 + diff --git a/back.c b/back.c 2 + index f364e31..c1810dc 100644 3 + --- a/back.c 4 + +++ b/back.c 5 + @@ -26,7 +26,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. 6 + #include "cmd.h" 7 + 8 + #define CFGFILE "/etc/spnavrc" 9 + -#define PIDFILE "/var/run/spnavd.pid" 10 + 11 + int get_daemon_pid(void); 12 + static int update_cfg(void); 13 + @@ -97,11 +96,26 @@ int get_daemon_pid(void) 14 + { 15 + FILE *fp; 16 + char buf[64]; 17 + + char* xdg_runtime_dir; 18 + + char* pidfile; 19 + 20 + - if(!(fp = fopen(PIDFILE, "r"))) { 21 + + if(!(xdg_runtime_dir = getenv("XDG_RUNTIME_DIR"))){ 22 + + fprintf(stderr, "XDG_RUNTIME_DIR not set, can't find spacenav pid file\n"); 23 + + return -1; 24 + + } 25 + + pidfile = malloc(strlen(xdg_runtime_dir) + strlen("/spnavd.pid") + 1); 26 + + if (pidfile == NULL) { 27 + + fprintf(stderr, "failed to allocate memory\n"); 28 + + return -1; 29 + + } 30 + + sprintf(pidfile, "%s/spnavd.pid", xdg_runtime_dir); 31 + + 32 + + if(!(fp = fopen(pidfile, "r"))) { 33 + fprintf(stderr, "no spacenav pid file, can't find daemon\n"); 34 + + free(pidfile); 35 + return -1; 36 + } 37 + + free(pidfile); 38 + if(!fgets(buf, sizeof buf, fp) || !isdigit(buf[0])) { 39 + fprintf(stderr, "corrupted pidfile, can't find the daemon\n"); 40 + fclose(fp);
+9
pkgs/applications/misc/spnavcfg/default.nix
··· 11 sha256 = "180mkdis15gxs79rr3f7hpwa1p6v81bybw37pzzdjnmqwqrc08a0"; 12 }; 13 14 postPatch = '' 15 sed -i s/4775/775/ Makefile.in 16 '';
··· 11 sha256 = "180mkdis15gxs79rr3f7hpwa1p6v81bybw37pzzdjnmqwqrc08a0"; 12 }; 13 14 + patches = [ 15 + # Changes the pidfile path from /run/spnavd.pid to $XDG_RUNTIME_DIR/spnavd.pid 16 + # to allow for a user service 17 + ./configure-pidfile-path.patch 18 + # Changes the config file path from /etc/spnavrc to $XDG_CONFIG_HOME/spnavrc or $HOME/.config/spnavrc 19 + # to allow for a user service 20 + ./configure-cfgfile-path.patch 21 + ]; 22 + 23 postPatch = '' 24 sed -i s/4775/775/ Makefile.in 25 '';
+2 -2
pkgs/applications/networking/instant-messengers/signal-desktop/default.nix
··· 28 else ""); 29 in stdenv.mkDerivation rec { 30 pname = "signal-desktop"; 31 - version = "5.2.0"; # Please backport all updates to the stable channel. 32 # All releases have a limited lifetime and "expire" 90 days after the release. 33 # When releases "expire" the application becomes unusable until an update is 34 # applied. The expiration date for the current release can be extracted with: ··· 38 39 src = fetchurl { 40 url = "https://updates.signal.org/desktop/apt/pool/main/s/signal-desktop/signal-desktop_${version}_amd64.deb"; 41 - sha256 = "0jvimpmz1d0pg9zpnyzm7a3g7vzapq62cphmvjhh67dxv5jih37k"; 42 }; 43 44 nativeBuildInputs = [
··· 28 else ""); 29 in stdenv.mkDerivation rec { 30 pname = "signal-desktop"; 31 + version = "5.2.1"; # Please backport all updates to the stable channel. 32 # All releases have a limited lifetime and "expire" 90 days after the release. 33 # When releases "expire" the application becomes unusable until an update is 34 # applied. The expiration date for the current release can be extracted with: ··· 38 39 src = fetchurl { 40 url = "https://updates.signal.org/desktop/apt/pool/main/s/signal-desktop/signal-desktop_${version}_amd64.deb"; 41 + sha256 = "0hkl8h49565kncvczv5fv4gak55lycygwb8i8igkgc4my0ykzs2z"; 42 }; 43 44 nativeBuildInputs = [
+3 -3
pkgs/applications/version-management/git-and-tools/lab/default.nix
··· 2 3 buildGoModule rec { 4 pname = "lab"; 5 - version = "0.21.0"; 6 7 src = fetchFromGitHub { 8 owner = "zaquestion"; 9 repo = "lab"; 10 rev = "v${version}"; 11 - sha256 = "sha256-mkhJmrKpIISd0m0m8fQ9vKuEr6h23BBxK6yo5fB+xcA="; 12 }; 13 14 subPackages = [ "." ]; 15 16 - vendorSha256 = "sha256-cf+DVnGjSNV2eZ8S/Vk+VPlykoSjngrQuPeA9IshBUg="; 17 18 doCheck = false; 19
··· 2 3 buildGoModule rec { 4 pname = "lab"; 5 + version = "0.22.0"; 6 7 src = fetchFromGitHub { 8 owner = "zaquestion"; 9 repo = "lab"; 10 rev = "v${version}"; 11 + sha256 = "sha256-CyXEmlsc40JtwDjRYNWqN+3cuoG8K07jAQdd1rktvS8="; 12 }; 13 14 subPackages = [ "." ]; 15 16 + vendorSha256 = "sha256-PSS7OPbM+XsylqDlWc4h+oZrOua2kSWKLEuyjqo/cxM="; 17 18 doCheck = false; 19
+5 -2
pkgs/applications/video/qstopmotion/default.nix
··· 6 , qtquickcontrols 7 , qtimageformats 8 , qtxmlpatterns 9 - , ffmpeg_3 10 , guvcview 11 , cmake 12 , ninja ··· 40 v4l-utils 41 libv4l 42 pcre 43 - ffmpeg_3 44 guvcview 45 qwt 46 ]; ··· 63 "find_package(Qt5 REQUIRED COMPONENTS Core Widgets Xml Multimedia" 64 grep -rl 'qwt' . | xargs sed -i 's@<qwt/qwt_slider.h>@<qwt_slider.h>@g' 65 ''; 66 67 meta = with lib; { 68 homepage = "http://www.qstopmotion.org";
··· 6 , qtquickcontrols 7 , qtimageformats 8 , qtxmlpatterns 9 + , ffmpeg 10 , guvcview 11 , cmake 12 , ninja ··· 40 v4l-utils 41 libv4l 42 pcre 43 guvcview 44 qwt 45 ]; ··· 62 "find_package(Qt5 REQUIRED COMPONENTS Core Widgets Xml Multimedia" 63 grep -rl 'qwt' . | xargs sed -i 's@<qwt/qwt_slider.h>@<qwt_slider.h>@g' 64 ''; 65 + 66 + qtWrapperArgs = [ 67 + "--prefix" "PATH" ":" (lib.makeBinPath [ ffmpeg ]) 68 + ]; 69 70 meta = with lib; { 71 homepage = "http://www.qstopmotion.org";
+14 -4
pkgs/development/haskell-modules/configuration-common.nix
··· 203 sha256 = "0pqmijfkysjixg3gb4kmrqdif7s2saz8qi6k337jf15i0npzln8d"; 204 revert = true; 205 }) 206 ] ++ (drv.patches or []); 207 })); 208 ··· 1405 }" 1406 ''; 1407 1408 - # 2021-04-09: test failure 1409 - # PR pending https://github.com/expipiplus1/update-nix-fetchgit/pull/60 1410 - doCheck = false; 1411 - 1412 patches = [ 1413 # 2021-05-17 compile with hnix >= 0.13 1414 # https://github.com/expipiplus1/update-nix-fetchgit/pull/64 1415 (pkgs.fetchpatch { 1416 url = "https://github.com/expipiplus1/update-nix-fetchgit/commit/bc28c8b26c38093aa950574802012c0cd8447ce8.patch"; 1417 sha256 = "1dwd1jdsrx3ss6ql1bk2ch7ln74mkq6jy9ms8vi8kmf3gbg8l9fg"; 1418 }) 1419 ] ++ (drv.patches or []); 1420 }));
··· 203 sha256 = "0pqmijfkysjixg3gb4kmrqdif7s2saz8qi6k337jf15i0npzln8d"; 204 revert = true; 205 }) 206 + # fix broken location annotations (necessary for update-nix-fetchgit). 207 + # Can be removed on the next hnix release after 208 + # https://github.com/haskell-nix/hnix/pull/936 is merged. 209 + (pkgs.fetchpatch { 210 + url = "https://github.com/expipiplus1/hnix/commit/7cd998426ab7d930d288a1d6e266dc4e85cece3d.patch"; 211 + sha256 = "19ay6vxa90ykgdd0fis2djvki2kpgfsq7z55iyqg965m583vsfr6"; 212 + }) 213 ] ++ (drv.patches or []); 214 })); 215 ··· 1412 }" 1413 ''; 1414 1415 + # These can both be removed upon the release of update-nix-fetchgit-0.2.7 1416 patches = [ 1417 # 2021-05-17 compile with hnix >= 0.13 1418 # https://github.com/expipiplus1/update-nix-fetchgit/pull/64 1419 (pkgs.fetchpatch { 1420 url = "https://github.com/expipiplus1/update-nix-fetchgit/commit/bc28c8b26c38093aa950574802012c0cd8447ce8.patch"; 1421 sha256 = "1dwd1jdsrx3ss6ql1bk2ch7ln74mkq6jy9ms8vi8kmf3gbg8l9fg"; 1422 + }) 1423 + # Fix test failure 1424 + # https://github.com/expipiplus1/update-nix-fetchgit/pull/60 1425 + (pkgs.fetchpatch { 1426 + url = "https://github.com/expipiplus1/update-nix-fetchgit/commit/4a43e1ea4e7e1c18de81e3f9fe0b86faa70865f5.patch"; 1427 + sha256 = "1z74c1blgwr4q37m1rhlj7534qbnp3nnxf63m8j2b7iz0ljgm0m9"; 1428 }) 1429 ] ++ (drv.patches or []); 1430 }));
+47
pkgs/development/libraries/libspnav/configure-socket-path.patch
···
··· 1 + diff --git a/spnav.c b/spnav.c 2 + index f9e10f8..27149f7 100644 3 + --- a/spnav.c 4 + +++ b/spnav.c 5 + @@ -36,7 +36,7 @@ OF SUCH DAMAGE. 6 + #include <sys/select.h> 7 + #include "spnav.h" 8 + 9 + -#define SPNAV_SOCK_PATH "/var/run/spnav.sock" 10 + +#define DEFAULT_SPNAV_SOCK_PATH "/run/spnav.sock" 11 + 12 + #ifdef USE_X11 13 + #include <X11/Xlib.h> 14 + @@ -70,6 +70,24 @@ static struct event_node *ev_queue, *ev_queue_tail; 15 + /* AF_UNIX socket used for alternative communication with daemon */ 16 + static int sock = -1; 17 + 18 + +static char *spath = NULL; 19 + + 20 + +static char *socket_path() 21 + +{ 22 + + char *xdg_runtime_dir; 23 + + if((xdg_runtime_dir = getenv("XDG_RUNTIME_DIR"))) { 24 + + if ( spath == NULL ) { 25 + + spath = malloc(strlen(xdg_runtime_dir) + strlen("/spnav.sock") + 1); 26 + + if ( spath != NULL ) { 27 + + sprintf(spath, "%s/spnav.sock", xdg_runtime_dir); 28 + + } 29 + + } 30 + + if(access(spath, F_OK) != -1){ 31 + + return spath; 32 + + } 33 + + } 34 + + return DEFAULT_SPNAV_SOCK_PATH; 35 + +} 36 + 37 + int spnav_open(void) 38 + { 39 + @@ -92,7 +110,7 @@ int spnav_open(void) 40 + 41 + memset(&addr, 0, sizeof addr); 42 + addr.sun_family = AF_UNIX; 43 + - strncpy(addr.sun_path, SPNAV_SOCK_PATH, sizeof(addr.sun_path)); 44 + + strncpy(addr.sun_path, socket_path(), sizeof(addr.sun_path)); 45 + 46 + 47 + if(connect(s, (struct sockaddr*)&addr, sizeof addr) == -1) {
+6
pkgs/development/libraries/libspnav/default.nix
··· 14 nativeBuildInputs = lib.optional stdenv.isDarwin fixDarwinDylibNames; 15 buildInputs = [ libX11 ]; 16 17 configureFlags = [ "--disable-debug"]; 18 makeFlags = [ "CC=${stdenv.cc.targetPrefix}cc" ]; 19
··· 14 nativeBuildInputs = lib.optional stdenv.isDarwin fixDarwinDylibNames; 15 buildInputs = [ libX11 ]; 16 17 + patches = [ 18 + # Changes the socket path from /run/spnav.sock to $XDG_RUNTIME_DIR/spnav.sock 19 + # to allow for a user service 20 + ./configure-socket-path.patch 21 + ]; 22 + 23 configureFlags = [ "--disable-debug"]; 24 makeFlags = [ "CC=${stdenv.cc.targetPrefix}cc" ]; 25
+2 -2
pkgs/development/python-modules/xdg/default.nix
··· 5 }: 6 7 buildPythonPackage rec { 8 - version = "5.0.1"; 9 pname = "xdg"; 10 disabled = isPy27; 11 format = "pyproject"; ··· 14 owner = "srstevenson"; 15 repo = pname; 16 rev = version; 17 - sha256 = "sha256-WMY9Hs9SbErTp8hVBoCWTz4dLQhuzqTRpXFEyE7+woo="; 18 }; 19 20 nativeBuildInputs = [ poetry-core ];
··· 5 }: 6 7 buildPythonPackage rec { 8 + version = "5.0.2"; 9 pname = "xdg"; 10 disabled = isPy27; 11 format = "pyproject"; ··· 14 owner = "srstevenson"; 15 repo = pname; 16 rev = version; 17 + sha256 = "sha256-wZfihMrq83Bye5CE5p7bTlI9Z7CsCkSd8Art5ws4vsY="; 18 }; 19 20 nativeBuildInputs = [ poetry-core ];
+2 -2
pkgs/development/web/twitter-bootstrap/default.nix
··· 2 3 stdenv.mkDerivation rec { 4 pname = "bootstrap"; 5 - version = "5.0.0"; 6 7 src = fetchurl { 8 url = "https://github.com/twbs/bootstrap/releases/download/v${version}/${pname}-${version}-dist.zip"; 9 - sha256 = "sha256-CsPvq8exUL2k/b/QK9c2S68DIsDDR8qxho0WgDJ3/Vs="; 10 }; 11 12 nativeBuildInputs = [ unzip ];
··· 2 3 stdenv.mkDerivation rec { 4 pname = "bootstrap"; 5 + version = "5.0.1"; 6 7 src = fetchurl { 8 url = "https://github.com/twbs/bootstrap/releases/download/v${version}/${pname}-${version}-dist.zip"; 9 + sha256 = "sha256-eep9s1YxTHeDDh+WhDMENho/N3AfJHVitis22bIGa6w="; 10 }; 11 12 nativeBuildInputs = [ unzip ];
+63
pkgs/misc/drivers/spacenavd/configure-cfgfile-path.patch
···
··· 1 + diff --git a/src/spnavd.c b/src/spnavd.c 2 + index 2d4eca6..a5227ed 100644 3 + --- a/src/spnavd.c 4 + +++ b/src/spnavd.c 5 + @@ -27,6 +27,8 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. 6 + #include <sys/select.h> 7 + #include <sys/socket.h> 8 + #include <sys/un.h> 9 + +#include <sys/types.h> 10 + +#include <pwd.h> 11 + #include "spnavd.h" 12 + #include "logger.h" 13 + #include "dev.h" 14 + @@ -47,13 +49,39 @@ static void handle_events(fd_set *rset); 15 + static void sig_handler(int s); 16 + static char *fix_path(char *str); 17 + 18 + -static char *cfgfile = DEF_CFGFILE; 19 + +static char* config_path; 20 + +char* cfg_path() 21 + +{ 22 + + char* buf; 23 + + if((buf = getenv("XDG_CONFIG_HOME"))) { 24 + + if(config_path == NULL) { 25 + + config_path = malloc(strlen(buf) + strlen("/spnavrc") + 1); 26 + + if ( config_path != NULL) { 27 + + sprintf(config_path, "%s/spnavrc", buf); 28 + + } 29 + + }; 30 + + return config_path; 31 + + } else { 32 + + if (!(buf = getenv("HOME"))) { 33 + + struct passwd *pw = getpwuid(getuid()); 34 + + buf = pw->pw_dir; 35 + + } 36 + + config_path = malloc(strlen(buf) + strlen("/.config/spnavrc") + 1); 37 + + if ( config_path != NULL) { 38 + + sprintf(config_path, "%s/.config/spnavrc", buf); 39 + + } 40 + + return config_path; 41 + + } 42 + +} 43 + + 44 + +static char *cfgfile = NULL; 45 + static char *logfile = DEF_LOGFILE; 46 + static char *pidpath = NULL; 47 + 48 + int main(int argc, char **argv) 49 + { 50 + int i, pid, ret, become_daemon = 1; 51 + + cfgfile = cfg_path(); 52 + 53 + for(i=1; i<argc; i++) { 54 + if(argv[i][0] == '-') { 55 + @@ -247,7 +275,7 @@ static void print_usage(const char *argv0) 56 + printf("usage: %s [options]\n", argv0); 57 + printf("options:\n"); 58 + printf(" -d: do not daemonize\n"); 59 + - printf(" -c <file>: config file path (default: " DEF_CFGFILE ")\n"); 60 + + printf(" -c <file>: config file path (default: %s)\n", cfg_path()); 61 + printf(" -l <file>|syslog: log file path or log to syslog (default: " DEF_LOGFILE ")\n"); 62 + printf(" -v: verbose output\n"); 63 + printf(" -V,-version: print version number and exit\n");
+82
pkgs/misc/drivers/spacenavd/configure-pidfile-path.patch
···
··· 1 + diff --git a/src/spnavd.c b/src/spnavd.c 2 + index 03080da..2d4eca6 100644 3 + --- a/src/spnavd.c 4 + +++ b/src/spnavd.c 5 + @@ -42,12 +42,14 @@ static void cleanup(void); 6 + static void daemonize(void); 7 + static int write_pid_file(void); 8 + static int find_running_daemon(void); 9 + +static char *pidfile_path(void); 10 + static void handle_events(fd_set *rset); 11 + static void sig_handler(int s); 12 + static char *fix_path(char *str); 13 + 14 + static char *cfgfile = DEF_CFGFILE; 15 + static char *logfile = DEF_LOGFILE; 16 + +static char *pidpath = NULL; 17 + 18 + int main(int argc, char **argv) 19 + { 20 + @@ -270,7 +272,7 @@ static void cleanup(void) 21 + remove_device(tmp); 22 + } 23 + 24 + - remove(PIDFILE); 25 + + remove(pidfile_path()); 26 + } 27 + 28 + static void daemonize(void) 29 + @@ -314,7 +316,7 @@ static int write_pid_file(void) 30 + FILE *fp; 31 + int pid = getpid(); 32 + 33 + - if(!(fp = fopen(PIDFILE, "w"))) { 34 + + if(!(fp = fopen(pidfile_path(), "w"))) { 35 + return -1; 36 + } 37 + fprintf(fp, "%d\n", pid); 38 + @@ -329,7 +331,7 @@ static int find_running_daemon(void) 39 + struct sockaddr_un addr; 40 + 41 + /* try to open the pid-file */ 42 + - if(!(fp = fopen(PIDFILE, "r"))) { 43 + + if(!(fp = fopen(pidfile_path(), "r"))) { 44 + return -1; 45 + } 46 + if(fscanf(fp, "%d\n", &pid) != 1) { 47 + @@ -356,6 +358,22 @@ static int find_running_daemon(void) 48 + return pid; 49 + } 50 + 51 + +char *pidfile_path(void) 52 + +{ 53 + + char *xdg_runtime_dir; 54 + + if((xdg_runtime_dir = getenv("XDG_RUNTIME_DIR"))) { 55 + + if ( pidpath == NULL ) { 56 + + pidpath = malloc(strlen(xdg_runtime_dir) + strlen("/spnavd.pid") + 1); 57 + + if ( pidpath != NULL ) { 58 + + sprintf(pidpath, "%s/spnavd.pid", xdg_runtime_dir); 59 + + } 60 + + }; 61 + + return pidpath; 62 + + } else { 63 + + return DEFAULT_PIDFILE; 64 + + } 65 + +} 66 + + 67 + static void handle_events(fd_set *rset) 68 + { 69 + int dev_fd, hotplug_fd; 70 + diff --git a/src/spnavd.h b/src/spnavd.h 71 + index 2d1c48b..17d22d3 100644 72 + --- a/src/spnavd.h 73 + +++ b/src/spnavd.h 74 + @@ -26,7 +26,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. 75 + #define DEF_CFGFILE "/etc/spnavrc" 76 + #define DEF_LOGFILE "/var/log/spnavd.log" 77 + 78 + -#define PIDFILE "/var/run/spnavd.pid" 79 + +#define DEFAULT_PIDFILE "/run/spnavd.pid" 80 + #define DEFAULT_SOCK_NAME "/run/spnav.sock" 81 + #define SYSLOG_ID "spnavd" 82 +
+118
pkgs/misc/drivers/spacenavd/configure-socket-path.patch
···
··· 1 + diff --git a/src/proto_unix.c b/src/proto_unix.c 2 + index 998f234..d38452c 100644 3 + --- a/src/proto_unix.c 4 + +++ b/src/proto_unix.c 5 + @@ -36,11 +36,14 @@ enum { 6 + 7 + static int lsock = -1; 8 + 9 + +static char *spath = NULL; 10 + + 11 + int init_unix(void) 12 + { 13 + int s; 14 + mode_t prev_umask; 15 + struct sockaddr_un addr; 16 + + char *sock_path; 17 + 18 + if(lsock >= 0) return 0; 19 + 20 + @@ -49,16 +52,18 @@ int init_unix(void) 21 + return -1; 22 + } 23 + 24 + - unlink(SOCK_NAME); /* in case it already exists */ 25 + + sock_path = socket_path(); 26 + + 27 + + unlink(sock_path); /* in case it already exists */ 28 + 29 + memset(&addr, 0, sizeof addr); 30 + addr.sun_family = AF_UNIX; 31 + - strcpy(addr.sun_path, SOCK_NAME); 32 + + strcpy(addr.sun_path, sock_path); 33 + 34 + prev_umask = umask(0); 35 + 36 + if(bind(s, (struct sockaddr*)&addr, sizeof addr) == -1) { 37 + - logmsg(LOG_ERR, "failed to bind unix socket: %s: %s\n", SOCK_NAME, strerror(errno)); 38 + + logmsg(LOG_ERR, "failed to bind unix socket: %s: %s\n", sock_path, strerror(errno)); 39 + close(s); 40 + return -1; 41 + } 42 + @@ -68,7 +73,7 @@ int init_unix(void) 43 + if(listen(s, 8) == -1) { 44 + logmsg(LOG_ERR, "listen failed: %s\n", strerror(errno)); 45 + close(s); 46 + - unlink(SOCK_NAME); 47 + + unlink(sock_path); 48 + return -1; 49 + } 50 + 51 + @@ -82,7 +87,7 @@ void close_unix(void) 52 + close(lsock); 53 + lsock = -1; 54 + 55 + - unlink(SOCK_NAME); 56 + + unlink(socket_path()); 57 + } 58 + } 59 + 60 + @@ -173,3 +178,19 @@ int handle_uevents(fd_set *rset) 61 + 62 + return 0; 63 + } 64 + + 65 + +char *socket_path(void) 66 + +{ 67 + + char *xdg_runtime_dir; 68 + + if((xdg_runtime_dir = getenv("XDG_RUNTIME_DIR"))) { 69 + + if ( spath == NULL ) { 70 + + spath = malloc(strlen(xdg_runtime_dir) + strlen("/spnav.sock") + 1); 71 + + if ( spath != NULL ) { 72 + + sprintf(spath, "%s/spnav.sock", xdg_runtime_dir); 73 + + } 74 + + }; 75 + + return spath; 76 + + } else { 77 + + return DEFAULT_SOCK_NAME; 78 + + } 79 + +} 80 + diff --git a/src/proto_unix.h b/src/proto_unix.h 81 + index 045b379..ec4509c 100644 82 + --- a/src/proto_unix.h 83 + +++ b/src/proto_unix.h 84 + @@ -23,6 +23,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. 85 + #include "event.h" 86 + #include "client.h" 87 + 88 + +char *socket_path(void); 89 + int init_unix(void); 90 + void close_unix(void); 91 + int get_unix_socket(void); 92 + diff --git a/src/spnavd.c b/src/spnavd.c 93 + index cbea191..03080da 100644 94 + --- a/src/spnavd.c 95 + +++ b/src/spnavd.c 96 + @@ -344,7 +344,7 @@ static int find_running_daemon(void) 97 + } 98 + memset(&addr, 0, sizeof addr); 99 + addr.sun_family = AF_UNIX; 100 + - strncpy(addr.sun_path, SOCK_NAME, sizeof addr.sun_path); 101 + + strncpy(addr.sun_path, socket_path(), sizeof addr.sun_path); 102 + 103 + if(connect(s, (struct sockaddr*)&addr, sizeof addr) == -1) { 104 + close(s); 105 + diff --git a/src/spnavd.h b/src/spnavd.h 106 + index fa0a916..2d1c48b 100644 107 + --- a/src/spnavd.h 108 + +++ b/src/spnavd.h 109 + @@ -26,8 +26,8 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. 110 + #define DEF_CFGFILE "/etc/spnavrc" 111 + #define DEF_LOGFILE "/var/log/spnavd.log" 112 + 113 + -#define SOCK_NAME "/var/run/spnav.sock" 114 + #define PIDFILE "/var/run/spnavd.pid" 115 + +#define DEFAULT_SOCK_NAME "/run/spnav.sock" 116 + #define SYSLOG_ID "spnavd" 117 + 118 + /* Multiple devices support */
+9
pkgs/misc/drivers/spacenavd/default.nix
··· 17 url = "https://github.com/FreeSpacenav/spacenavd/commit/d6a25d5c3f49b9676d039775efc8bf854737c43c.patch"; 18 sha256 = "02pdgcvaqc20qf9hi3r73nb9ds7yk2ps9nnxaj0x9p50xjnhfg5c"; 19 }) 20 ]; 21 22 buildInputs = [ libX11 ]
··· 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 ]
+29
pkgs/tools/misc/fetchutils/default.nix
···
··· 1 + { lib, stdenvNoCC, fetchFromGitHub, bash, scdoc }: 2 + 3 + stdenvNoCC.mkDerivation rec { 4 + pname = "fetchutils"; 5 + version = "unstable-2021-03-16"; 6 + 7 + src = fetchFromGitHub { 8 + owner = "lptstr"; 9 + repo = pname; 10 + rev = "882781a297e86f4ad4eaf143e0777fb3e7c69526"; 11 + sha256 = "sha256-ONrVZC6GBV5v3TeBekW9ybZjDHF3FNyXw1rYknqKRbk="; 12 + }; 13 + 14 + buildInputs = [ bash scdoc ]; 15 + 16 + installFlags = [ "DESTDIR=$(out)" "PREFIX=" ]; 17 + 18 + postPatch = '' 19 + patchShebangs --host src/* 20 + ''; 21 + 22 + meta = with lib; { 23 + description = "A collection of small shell utilities to fetch system information"; 24 + homepage = "https://github.com/lptstr/fetchutils"; 25 + license = licenses.mit; 26 + platforms = platforms.unix; 27 + maintainers = with maintainers; [ fortuneteller2k ]; 28 + }; 29 + }
+2 -2
pkgs/tools/nix/nixos-generators/default.nix
··· 2 3 stdenv.mkDerivation rec { 4 pname = "nixos-generators"; 5 - version = "1.2.0"; 6 src = fetchFromGitHub { 7 owner = "nix-community"; 8 repo = "nixos-generators"; 9 rev = version; 10 - sha256 = "1iwc39hzvzzyndxwbnl3fck7phxnjpnhy8zn4nyp8is1fiw0648v"; 11 }; 12 nativeBuildInputs = [ makeWrapper ]; 13 installFlags = [ "PREFIX=$(out)" ];
··· 2 3 stdenv.mkDerivation rec { 4 pname = "nixos-generators"; 5 + version = "1.3.0"; 6 src = fetchFromGitHub { 7 owner = "nix-community"; 8 repo = "nixos-generators"; 9 rev = version; 10 + sha256 = "1gbj2jw7zv3mnq1lyj4q53jpfj642jy7lvg0kp060znvhws3370y"; 11 }; 12 nativeBuildInputs = [ makeWrapper ]; 13 installFlags = [ "PREFIX=$(out)" ];
+4 -1
pkgs/top-level/all-packages.nix
··· 407 408 etBook = callPackage ../data/fonts/et-book { }; 409 410 fet-sh = callPackage ../tools/misc/fet-sh { }; 411 412 fetchbower = callPackage ../build-support/fetchbower { ··· 23641 boost 23642 matplotlib 23643 pivy 23644 pycollada 23645 pyside2 23646 pyside2-tools ··· 26157 rofi-systemd = callPackage ../tools/system/rofi-systemd { }; 26158 26159 rofimoji = callPackage ../applications/misc/rofimoji { 26160 - inherit (python3Packages) buildPythonApplication ConfigArgParse pyxdg; 26161 }; 26162 26163 rootlesskit = callPackage ../tools/virtualization/rootlesskit {};
··· 407 408 etBook = callPackage ../data/fonts/et-book { }; 409 410 + fetchutils = callPackage ../tools/misc/fetchutils { }; 411 + 412 fet-sh = callPackage ../tools/misc/fet-sh { }; 413 414 fetchbower = callPackage ../build-support/fetchbower { ··· 23643 boost 23644 matplotlib 23645 pivy 23646 + ply 23647 pycollada 23648 pyside2 23649 pyside2-tools ··· 26160 rofi-systemd = callPackage ../tools/system/rofi-systemd { }; 26161 26162 rofimoji = callPackage ../applications/misc/rofimoji { 26163 + inherit (python3Packages) buildPythonApplication ConfigArgParse; 26164 }; 26165 26166 rootlesskit = callPackage ../tools/virtualization/rootlesskit {};