summary refs log tree commit diff
path: root/pkgs/applications/misc
diff options
context:
space:
mode:
authorVladimír Čunát <v@cunat.cz>2022-07-18 08:29:53 +0200
committerVladimír Čunát <v@cunat.cz>2022-07-18 08:29:53 +0200
commit250922fd1e061f2132d33b778424f4e9ed42354a (patch)
treec26970f54a01d8d612c82818de8d2104172b9fa0 /pkgs/applications/misc
parent0ff0b14968e7474fbb917fbb096a8d89d121922f (diff)
parent950a258b9ef24ca4346bbf722a694c2ab54e4654 (diff)
downloadnixpkgs-250922fd1e061f2132d33b778424f4e9ed42354a.tar
nixpkgs-250922fd1e061f2132d33b778424f4e9ed42354a.tar.gz
nixpkgs-250922fd1e061f2132d33b778424f4e9ed42354a.tar.bz2
nixpkgs-250922fd1e061f2132d33b778424f4e9ed42354a.tar.lz
nixpkgs-250922fd1e061f2132d33b778424f4e9ed42354a.tar.xz
nixpkgs-250922fd1e061f2132d33b778424f4e9ed42354a.tar.zst
nixpkgs-250922fd1e061f2132d33b778424f4e9ed42354a.zip
Merge branch 'master' into staging-next
Diffstat (limited to 'pkgs/applications/misc')
-rw-r--r--pkgs/applications/misc/bottles/default.nix6
-rw-r--r--pkgs/applications/misc/gpsbabel/default.nix1
-rw-r--r--pkgs/applications/misc/pass-secret-service/default.nix44
-rw-r--r--pkgs/applications/misc/pass-secret-service/int_from_bytes-deprecation-fix.patch22
-rw-r--r--pkgs/applications/misc/sigal/default.nix2
-rw-r--r--pkgs/applications/misc/streamdeck-ui/default.nix95
-rw-r--r--pkgs/applications/misc/tut/default.nix6
7 files changed, 160 insertions, 16 deletions
diff --git a/pkgs/applications/misc/bottles/default.nix b/pkgs/applications/misc/bottles/default.nix
index bf11f3e7f42..9b24e55cfbb 100644
--- a/pkgs/applications/misc/bottles/default.nix
+++ b/pkgs/applications/misc/bottles/default.nix
@@ -1,4 +1,4 @@
-{ lib, fetchFromGitHub
+{ lib, fetchFromGitHub, gitUpdater
 , meson, ninja, pkg-config, wrapGAppsHook
 , desktop-file-utils, gsettings-desktop-schemas, libnotify, libhandy, webkitgtk
 , python3Packages, gettext
@@ -95,6 +95,10 @@ python3Packages.buildPythonApplication rec {
     makeWrapperArgs+=("''${gappsWrapperArgs[@]}")
   '';
 
+  passthru.updateScript = gitUpdater {
+    inherit pname version;
+  };
+
   meta = with lib; {
     description = "An easy-to-use wineprefix manager";
     homepage = "https://usebottles.com/";
diff --git a/pkgs/applications/misc/gpsbabel/default.nix b/pkgs/applications/misc/gpsbabel/default.nix
index b09e7ef725e..d7ba62f28c5 100644
--- a/pkgs/applications/misc/gpsbabel/default.nix
+++ b/pkgs/applications/misc/gpsbabel/default.nix
@@ -96,7 +96,6 @@ stdenv.mkDerivation rec {
   '');
 
   meta = with lib; {
-    broken = stdenv.isDarwin;
     description = "Convert, upload and download data from GPS and Map programs";
     longDescription = ''
       GPSBabel converts waypoints, tracks, and routes between popular
diff --git a/pkgs/applications/misc/pass-secret-service/default.nix b/pkgs/applications/misc/pass-secret-service/default.nix
index 12f8935797c..6a57c15b742 100644
--- a/pkgs/applications/misc/pass-secret-service/default.nix
+++ b/pkgs/applications/misc/pass-secret-service/default.nix
@@ -1,26 +1,50 @@
-{ lib, fetchFromGitHub, python3, dbus, gnupg }:
+{ lib
+, fetchFromGitHub
+, python3
+, dbus
+, gnupg
+, coreutils
+, nixosTests
+}:
 
 python3.pkgs.buildPythonApplication rec {
   pname = "pass-secret-service";
   # PyPI has old alpha version. Since then the project has switched from using a
   # seemingly abandoned D-Bus package pydbus and started using maintained
   # dbus-next. So let's use latest from GitHub.
-  version = "unstable-2020-04-12";
+  version = "unstable-2022-03-21";
 
   src = fetchFromGitHub {
     owner = "mdellweg";
     repo = "pass_secret_service";
-    rev = "f6fbca6ac3ccd16bfec407d845ed9257adf74dfa";
-    sha256 = "0rm4pbx1fiwds1v7f99khhh7x3inv9yniclwd95mrbgljk3cc6a4";
+    rev = "149f8557e07098eee2f46561eea61e83255ac59b";
+    sha256 = "sha256-+/pFi6+K8rl0Ihm6cp/emUQVtau6+Apl8/VEr9AI0Xs=";
   };
 
+  patches = [
+    # Only needed until https://github.com/mdellweg/pass_secret_service/pull/30
+    # is merged.
+    ./int_from_bytes-deprecation-fix.patch
+  ];
 
   # Need to specify session.conf file for tests because it won't be found under
   # /etc/ in check phase.
   postPatch = ''
     substituteInPlace Makefile \
       --replace "dbus-run-session" "dbus-run-session --config-file=${dbus}/share/dbus-1/session.conf" \
-      --replace '-p $(relpassstore)' '-p $(PASSWORD_STORE_DIR)'
+      --replace '-p $(relpassstore)' '-p $(PASSWORD_STORE_DIR)' \
+      --replace 'pytest-3' 'pytest'
+
+    substituteInPlace systemd/org.freedesktop.secrets.service \
+      --replace "/bin/false" "${coreutils}/bin/false"
+    substituteInPlace systemd/dbus-org.freedesktop.secrets.service \
+      --replace "/usr/local" "$out"
+  '';
+
+  postInstall = ''
+    mkdir -p "$out/share/dbus-1/services/" "$out/lib/systemd/user/"
+    cp systemd/org.freedesktop.secrets.service "$out/share/dbus-1/services/"
+    cp systemd/dbus-org.freedesktop.secrets.service "$out/lib/systemd/user/"
   '';
 
   propagatedBuildInputs = with python3.pkgs; [
@@ -44,17 +68,15 @@ python3.pkgs.buildPythonApplication rec {
       ps.pypass
     ];
 
-  checkPhase = ''
-    runHook preCheck
-    make test
-    runHook postCheck
-  '';
+  checkTarget = "test";
+
+  passthru.tests.pass-secret-service = nixosTests.pass-secret-service;
 
   meta = {
     description = "Libsecret D-Bus API with pass as the backend";
     homepage = "https://github.com/mdellweg/pass_secret_service/";
     license = lib.licenses.gpl3Only;
     platforms = lib.platforms.all;
-    maintainers = with lib.maintainers; [ jluttine ];
+    maintainers = with lib.maintainers; [ jluttine aidalgol ];
   };
 }
diff --git a/pkgs/applications/misc/pass-secret-service/int_from_bytes-deprecation-fix.patch b/pkgs/applications/misc/pass-secret-service/int_from_bytes-deprecation-fix.patch
new file mode 100644
index 00000000000..b7e78e7b791
--- /dev/null
+++ b/pkgs/applications/misc/pass-secret-service/int_from_bytes-deprecation-fix.patch
@@ -0,0 +1,22 @@
+--- a/pass_secret_service/interfaces/session.py
++++ b/pass_secret_service/interfaces/session.py
+@@ -4,7 +4,6 @@
+ import os
+ import hmac
+ from hashlib import sha256
+-from cryptography.utils import int_from_bytes
+ from cryptography.hazmat.backends import default_backend
+ from cryptography.hazmat.primitives.ciphers import Cipher
+ from cryptography.hazmat.primitives.ciphers.modes import CBC
+@@ -27,9 +26,9 @@ class Session(ServiceInterface, SerialMixin):
+     @classmethod
+     @run_in_executor
+     def _create_dh(cls, input):
+-        priv_key = int_from_bytes(os.urandom(0x80), "big")
++        priv_key = int.from_bytes(os.urandom(0x80), "big")
+         pub_key = pow(2, priv_key, dh_prime)
+-        shared_secret = pow(int_from_bytes(input, "big"), priv_key, dh_prime)
++        shared_secret = pow(int.from_bytes(input, "big"), priv_key, dh_prime)
+         salt = b"\x00" * 0x20
+         shared_key = hmac.new(salt, shared_secret.to_bytes(0x80, "big"), sha256).digest()
+         aes_key = hmac.new(shared_key, b"\x01", sha256).digest()[:0x10]
diff --git a/pkgs/applications/misc/sigal/default.nix b/pkgs/applications/misc/sigal/default.nix
index bc48ce3e2af..8289cc428db 100644
--- a/pkgs/applications/misc/sigal/default.nix
+++ b/pkgs/applications/misc/sigal/default.nix
@@ -28,6 +28,8 @@ python3.pkgs.buildPythonApplication rec {
     feedgenerator
     zopfli
     cryptography
+
+    setuptools # needs pkg_resources
   ];
 
   checkInputs = [
diff --git a/pkgs/applications/misc/streamdeck-ui/default.nix b/pkgs/applications/misc/streamdeck-ui/default.nix
new file mode 100644
index 00000000000..141652e63d6
--- /dev/null
+++ b/pkgs/applications/misc/streamdeck-ui/default.nix
@@ -0,0 +1,95 @@
+{ lib
+, python3Packages
+, fetchFromGitHub
+, poetry
+, copyDesktopItems
+, wrapQtAppsHook
+, writeText
+, makeDesktopItem
+, xvfb-run
+}:
+
+python3Packages.buildPythonApplication rec {
+  pname = "streamdeck-ui";
+  version = "2.0.4";
+
+  src = fetchFromGitHub {
+    repo = pname;
+    owner = "timothycrosley";
+    rev = "v${version}";
+    hash = "sha256-NV4BkHEgfxIOuLfmn0vcPNqivmHLD6v7jLdLZgnrb0Q=";
+  };
+
+  desktopItems = [ (makeDesktopItem {
+    name = "streamdeck-ui";
+    desktopName = "Stream Deck UI";
+    icon = "streamdeck-ui";
+    exec = "streamdeck --no-ui";
+    comment = "UI for the Elgato Stream Deck";
+    categories = [ "Utility" ];
+    noDisplay = true;
+  }) ];
+
+  postInstall =
+    let
+      udevRules = ''
+        SUBSYSTEM=="usb", ATTRS{idVendor}=="0fd9", ATTRS{idProduct}=="0060", TAG+="uaccess"
+        SUBSYSTEM=="usb", ATTRS{idVendor}=="0fd9", ATTRS{idProduct}=="0063", TAG+="uaccess"
+        SUBSYSTEM=="usb", ATTRS{idVendor}=="0fd9", ATTRS{idProduct}=="006c", TAG+="uaccess"
+        SUBSYSTEM=="usb", ATTRS{idVendor}=="0fd9", ATTRS{idProduct}=="006d", TAG+="uaccess"
+        SUBSYSTEM=="usb", ATTRS{idVendor}=="0fd9", ATTRS{idProduct}=="0080", TAG+="uaccess"
+      '';
+    in
+      ''
+        mkdir -p "$out/etc/udev/rules.d"
+        cp ${writeText "70-streamdeck.rules" udevRules} $out/etc/udev/rules.d/70-streamdeck.rules
+
+        mkdir -p "$out/share/pixmaps"
+        cp streamdeck_ui/logo.png $out/share/pixmaps/streamdeck-ui.png
+      '';
+
+  dontWrapQtApps = true;
+  makeWrapperArgs = [ "\${qtWrapperArgs[@]}" ];
+
+  format = "pyproject";
+
+  nativeBuildInputs = [
+    poetry
+    copyDesktopItems
+    wrapQtAppsHook
+  ];
+
+  propagatedBuildInputs = with python3Packages; [
+    setuptools
+    filetype
+    cairosvg
+    pillow
+    pynput
+    pyside2
+    streamdeck
+    xlib
+  ];
+
+  checkInputs = [
+    xvfb-run
+    python3Packages.pytest
+    python3Packages.hypothesis-auto
+  ];
+
+  # Ignored tests are not in a running or passing state.
+  # Fixes have been merged upstream but not yet released.
+  # Revisit these ignored tests on each update.
+  checkPhase = ''
+    xvfb-run pytest tests \
+      --ignore=tests/test_api.py \
+      --ignore=tests/test_filter.py \
+      --ignore=tests/test_stream_deck_monitor.py
+  '';
+
+  meta = with lib; {
+    description = "Linux compatible UI for the Elgato Stream Deck";
+    homepage = "https://timothycrosley.github.io/streamdeck-ui/";
+    license = licenses.mit;
+    maintainers = with maintainers; [ majiir ];
+  };
+}
diff --git a/pkgs/applications/misc/tut/default.nix b/pkgs/applications/misc/tut/default.nix
index e7299326e87..8fa43da8098 100644
--- a/pkgs/applications/misc/tut/default.nix
+++ b/pkgs/applications/misc/tut/default.nix
@@ -2,16 +2,16 @@
 
 buildGoModule rec {
   pname = "tut";
-  version = "0.0.46";
+  version = "1.0.13";
 
   src = fetchFromGitHub {
     owner = "RasmusLindroth";
     repo = pname;
     rev = version;
-    sha256 = "sha256-C9kyA6QuL8sqzCooaPzSP7VOpu7jcSFCUx9oaZLZ7/w=";
+    sha256 = "sha256-EORvIqA2bsmNUY1euUBmEYNMU02nW0doRDmTQjt15Os=";
   };
 
-  vendorSha256 = "sha256-kMGEAN/I2XsIc6zCDbhbbstYlyjDpXQsOPUzjaJqJBk=";
+  vendorSha256 = "sha256-ilq1sfFY6WuNACryDGjkpF5eUTan8Y6Yt26vot9XR54=";
 
   meta = with lib; {
     description = "A TUI for Mastodon with vim inspired keys";