about summary refs log tree commit diff
path: root/pkgs/tools
diff options
context:
space:
mode:
Diffstat (limited to 'pkgs/tools')
-rw-r--r--pkgs/tools/misc/rpi-imager/default.nix38
-rw-r--r--pkgs/tools/misc/ttyplot/default.nix4
-rw-r--r--pkgs/tools/networking/nqptp/default.nix22
-rw-r--r--pkgs/tools/networking/nqptp/remove-setcap.patch13
4 files changed, 49 insertions, 28 deletions
diff --git a/pkgs/tools/misc/rpi-imager/default.nix b/pkgs/tools/misc/rpi-imager/default.nix
index 61ca001563f5..579aa7fcc5e9 100644
--- a/pkgs/tools/misc/rpi-imager/default.nix
+++ b/pkgs/tools/misc/rpi-imager/default.nix
@@ -3,6 +3,7 @@
 , fetchFromGitHub
 , wrapQtAppsHook
 , cmake
+, pkg-config
 , util-linux
 , curl
 , libarchive
@@ -12,23 +13,26 @@
 , qttools
 , qtquickcontrols2
 , qtgraphicaleffects
+, xz
+, testers
 , nix-update-script
 , enableTelemetry ? false
 }:
 
-stdenv.mkDerivation rec {
+stdenv.mkDerivation (finalAttrs: {
   pname = "rpi-imager";
-  version = "1.7.5";
+  version = "1.8.1";
 
   src = fetchFromGitHub {
     owner = "raspberrypi";
-    repo = pname;
-    rev = "v${version}";
-    sha256 = "sha256-yB+H1zWL40KzxOrBuvg7nBC3zmWilsOgOW7ndiDWuDA=";
+    repo = finalAttrs.pname;
+    rev = "refs/tags/v${finalAttrs.version}";
+    sha256 = "sha256-drHiZ0eYYvJg6/v3oEozGAbBKm1KLpec+kYZWwpT9yM=";
   };
 
   nativeBuildInputs = [
     cmake
+    pkg-config
     util-linux
     wrapQtAppsHook
   ];
@@ -48,40 +52,34 @@ stdenv.mkDerivation rec {
     qttools
     qtquickcontrols2
     qtgraphicaleffects
+    xz
   ];
 
-  sourceRoot = "${src.name}/src";
+  sourceRoot = "${finalAttrs.src.name}/src";
 
   /* By default, the builder checks for JSON support in lsblk by running "lsblk --json",
     but that throws an error, as /sys/dev doesn't exist in the sandbox.
     This patch removes the check. */
   patches = [ ./lsblkCheckFix.patch ];
 
-  doInstallCheck = true;
-
-  installCheckPhase = ''
-    runHook preInstallCheck
-
-    # Without this, the tests fail because they cannot create the QT Window
-    export QT_QPA_PLATFORM=offscreen
-    $out/bin/rpi-imager --version
-
-    runHook postInstallCheck
-  '';
-
   passthru = {
+    tests.version = testers.testVersion {
+      package = finalAttrs.finalPackage;
+      command = "QT_QPA_PLATFORM=offscreen rpi-imager --version";
+    };
     updateScript = nix-update-script { };
   };
 
   meta = with lib; {
     description = "Raspberry Pi Imaging Utility";
     homepage = "https://www.raspberrypi.com/software/";
-    changelog = "https://github.com/raspberrypi/rpi-imager/releases/tag/v${version}";
+    changelog = "https://github.com/raspberrypi/rpi-imager/releases/tag/v${finalAttrs.version}";
     downloadPage = "https://github.com/raspberrypi/rpi-imager/";
     license = licenses.asl20;
+    mainProgram = "rpi-imager";
     maintainers = with maintainers; [ ymarkus anthonyroussel ];
     platforms = platforms.all;
     # does not build on darwin
     broken = stdenv.isDarwin;
   };
-}
+})
diff --git a/pkgs/tools/misc/ttyplot/default.nix b/pkgs/tools/misc/ttyplot/default.nix
index 7becc090a83b..a136031dfc13 100644
--- a/pkgs/tools/misc/ttyplot/default.nix
+++ b/pkgs/tools/misc/ttyplot/default.nix
@@ -2,13 +2,13 @@
 
 stdenv.mkDerivation rec {
   pname = "ttyplot";
-  version = "1.4";
+  version = "1.5";
 
   src = fetchFromGitHub {
     owner = "tenox7";
     repo = "ttyplot";
     rev = version;
-    sha256 = "19qm0hx9ljdw9qg78lydn3c627xy7xnx3knq5f7caw9lf0cdp7kf";
+    sha256 = "sha256-COnqzWqah1J/q64XrOBhMOsrafAs/BptqNvrjHJ9edQ=";
   };
 
   buildInputs = [ ncurses ];
diff --git a/pkgs/tools/networking/nqptp/default.nix b/pkgs/tools/networking/nqptp/default.nix
index 5261a6afb58f..2db121e2d189 100644
--- a/pkgs/tools/networking/nqptp/default.nix
+++ b/pkgs/tools/networking/nqptp/default.nix
@@ -3,26 +3,36 @@
 , fetchFromGitHub
 , autoreconfHook
 , pkg-config
+, gitUpdater
 }:
 
 stdenv.mkDerivation rec {
-  version = "1.2.3";
+  version = "1.2.4";
   pname = "nqptp";
 
   src = fetchFromGitHub {
     owner = "mikebrady";
     repo = pname;
     rev = "refs/tags/${version}";
-    hash = "sha256-Ppsz3hDG6sEf6LJ2WdbTdJ8Gi53f0YmvaUU8TOfVMz4=";
+    hash = "sha256-roTNcr3v2kzE6vQ5plAVtlw1+2yJplltOYsGGibtoZo=";
   };
 
+  patches = [
+    # this patch should be removed when > 1.2.4
+    ./remove-setcap.patch
+  ];
+
   nativeBuildInputs = [ autoreconfHook pkg-config ];
 
-  meta = with lib; {
+  passthru.updateScript = gitUpdater {
+    ignoredVersions = ".*(-dev|d0)";
+  };
+
+  meta = {
     homepage = "https://github.com/mikebrady/nqptp";
     description = "Daemon and companion application to Shairport Sync that monitors timing data from any PTP clocks";
-    license = licenses.gpl2Only;
-    maintainers = with maintainers; [ jordanisaacs ];
-    platforms = platforms.linux ++ platforms.freebsd;
+    license = lib.licenses.gpl2Only;
+    maintainers = with lib.maintainers; [ jordanisaacs adamcstephens ];
+    platforms = lib.platforms.linux ++ lib.platforms.freebsd;
   };
 }
diff --git a/pkgs/tools/networking/nqptp/remove-setcap.patch b/pkgs/tools/networking/nqptp/remove-setcap.patch
new file mode 100644
index 000000000000..2fa56ac0150a
--- /dev/null
+++ b/pkgs/tools/networking/nqptp/remove-setcap.patch
@@ -0,0 +1,13 @@
+diff --git a/Makefile.am b/Makefile.am
+index 78f36d7..8dc4e4f 100644
+--- a/Makefile.am
++++ b/Makefile.am
+@@ -19,8 +19,6 @@ endif
+ 
+ install-exec-hook:
+ if BUILD_FOR_LINUX
+-# NQPTP runs as user/group nqptp/nqptp on Linux and uses setcap to access ports 319 and 320
+-	setcap 'cap_net_bind_service=+ep' $(bindir)/nqptp
+ # no installer for System V
+ if INSTALL_SYSTEMD_STARTUP
+ 	getent group nqptp &>/dev/null || groupadd -r nqptp &>/dev/null