about summary refs log tree commit diff
path: root/pkgs/misc
diff options
context:
space:
mode:
authorSergei Trofimovich <slyich@gmail.com>2022-12-28 09:35:37 +0000
committerSergei Trofimovich <slyich@gmail.com>2022-12-28 09:35:37 +0000
commit092d57c07692d117e70f8e6ecbb65b241fc0060e (patch)
tree35bbf470378036fce5ee3f89b940dafd0676774f /pkgs/misc
parent64a3a91ef4f3880cc0b74e33852602e6a0759e6a (diff)
parent8fb6009616e0e6a00e74076b95c3c92e0769a193 (diff)
Merge remote-tracking branch 'origin/staging-next' into staging
Conflicts:
    pkgs/development/tools/language-servers/ansible-language-server/default.nix
Diffstat (limited to 'pkgs/misc')
-rw-r--r--pkgs/misc/cups/drivers/cups-pdf-to-pdf/default.nix62
-rw-r--r--pkgs/misc/drivers/epkowa/default.nix32
-rw-r--r--pkgs/misc/flashfocus/default.nix4
-rw-r--r--pkgs/misc/sagetex/default.nix4
-rw-r--r--pkgs/misc/scrcpy/default.nix10
-rw-r--r--pkgs/misc/screensavers/light-locker/default.nix4
6 files changed, 105 insertions, 11 deletions
diff --git a/pkgs/misc/cups/drivers/cups-pdf-to-pdf/default.nix b/pkgs/misc/cups/drivers/cups-pdf-to-pdf/default.nix
new file mode 100644
index 0000000000000..a26216cbc7273
--- /dev/null
+++ b/pkgs/misc/cups/drivers/cups-pdf-to-pdf/default.nix
@@ -0,0 +1,62 @@
+{ lib
+, stdenv
+, fetchFromGitHub
+, cups
+, coreutils
+, nixosTests
+}:
+
+stdenv.mkDerivation rec {
+  pname = "cups-pdf-to-pdf";
+  version = "unstable-2021-12-22";
+
+  src = fetchFromGitHub {
+    owner = "alexivkin";
+    repo = "CUPS-PDF-to-PDF";
+    rev = "c14428c2ca8e95371daad7db6d11c84046b1a2d4";
+    hash = "sha256-pa4PFf8OAFSra0hSazmKUfbMYL/cVWvYA1lBf7c7jmY=";
+  };
+
+  buildInputs = [ cups ];
+
+  postPatch = ''
+    sed -r 's|(gscall, size, ")cp |\1${coreutils}/bin/cp |' cups-pdf.c -i
+  '';
+
+  # gcc command line is taken from original cups-pdf's README file
+  # https://fossies.org/linux/cups-pdf/README
+  # however, we replace gcc with $CC following
+  # https://nixos.org/manual/nixpkgs/stable/#sec-darwin
+  buildPhase = ''
+    runHook preBuild
+    $CC -O9 -s cups-pdf.c -o cups-pdf -lcups
+    runHook postBuild
+  '';
+
+  installPhase = ''
+    runHook preInstall
+    install -Dt $out/lib/cups/backend cups-pdf
+    install -Dm 0644 -t $out/etc/cups cups-pdf.conf
+    install -Dm 0644 -t $out/share/cups/model *.ppd
+    runHook postInstall
+  '';
+
+  passthru.tests.vmtest = nixosTests.cups-pdf;
+
+  meta = with lib; {
+    description = "A CUPS backend that turns print jobs into searchable PDF files";
+    homepage = "https://github.com/alexivkin/CUPS-PDF-to-PDF";
+    license = licenses.gpl2Only;
+    maintainers = [ maintainers.yarny ];
+    longDescription = ''
+      cups-pdf is a CUPS backend that generates a PDF file for each print job and puts this file
+      into a folder on the local machine such that the print job's owner can access the file.
+
+      https://www.cups-pdf.de/
+
+      cups-pdf-to-pdf is a fork of cups-pdf which tries hard to preserve the original text of the print job by avoiding rasterization.
+
+      Note that in order to use this package, you have to make sure that the cups-pdf program is called with root privileges.
+    '';
+  };
+}
diff --git a/pkgs/misc/drivers/epkowa/default.nix b/pkgs/misc/drivers/epkowa/default.nix
index 37e4d2baa35ee..cf54b048f5914 100644
--- a/pkgs/misc/drivers/epkowa/default.nix
+++ b/pkgs/misc/drivers/epkowa/default.nix
@@ -255,6 +255,38 @@ let plugins = {
     };
     meta = common_meta // { description = "iscan GT-S650 for " + passthru.hw; };
   };
+  x750 = stdenv.mkDerivation rec {
+    name = "iscan-gt-x750-bundle";
+    version = "2.30.4";
+
+    src = fetchurl {
+      urls = [
+        "https://download2.ebz.epson.net/iscan/plugin/gt-x750/rpm/x64/iscan-gt-x750-bundle-${version}.x64.rpm.tar.gz"
+        "https://web.archive.org/web/https://download2.ebz.epson.net/iscan/plugin/gt-x750/rpm/x64/iscan-gt-x750-bundle-${version}.x64.rpm.tar.gz"
+      ];
+      sha256 = "sha256-9EeBHmh1nwSxnTnevPP8RZ4WBdyY+itR3VXo2I7f5N0=";
+    };
+
+    nativeBuildInputs = [ autoPatchelfHook rpm ];
+
+    installPhase = ''
+      cd plugins
+      ${rpm}/bin/rpm2cpio iscan-plugin-gt-x750-*.x86_64.rpm | ${cpio}/bin/cpio -idmv
+      mkdir $out
+      cp -r usr/share $out
+      cp -r usr/lib64 $out/lib
+      mv $out/share/iscan $out/share/esci
+      mv $out/lib/iscan $out/lib/esci
+    '';
+
+    passthru = {
+      registrationCommand = ''
+        $registry --add interpreter usb 0x04b8 0x0119 "$plugin/lib/esci/libesint54 $plugin/share/esci/esfw54.bin"
+      '';
+      hw = "GT-X750, Perfection 4490";
+    };
+    meta = common_meta // { description = "iscan GT-X750 for " + passthru.hw; };
+  };
   network = stdenv.mkDerivation rec {
     pname = "iscan-nt-bundle";
     # for the version, look for the driver of XP-750 in the search page
diff --git a/pkgs/misc/flashfocus/default.nix b/pkgs/misc/flashfocus/default.nix
index 67cde0924c299..5f6df66dd422d 100644
--- a/pkgs/misc/flashfocus/default.nix
+++ b/pkgs/misc/flashfocus/default.nix
@@ -36,9 +36,7 @@ python3.pkgs.buildPythonApplication rec {
 
   pythonImportsCheck = [ "flashfocus" ];
 
-  passthru.updateScript = nix-update-script {
-    attrPath = pname;
-  };
+  passthru.updateScript = nix-update-script { };
 
   meta = with lib; {
     homepage = "https://github.com/fennerm/flashfocus";
diff --git a/pkgs/misc/sagetex/default.nix b/pkgs/misc/sagetex/default.nix
index a30f037d9c471..510219e51b9c4 100644
--- a/pkgs/misc/sagetex/default.nix
+++ b/pkgs/misc/sagetex/default.nix
@@ -6,14 +6,14 @@
 
 stdenv.mkDerivation rec {
   pname = "sagetex";
-  version = "3.6";
+  version = "3.6.1";
   passthru.tlType = "run";
 
   src = fetchFromGitHub {
     owner = "sagemath";
     repo = "sagetex";
     rev = "v${version}";
-    sha256 = "8iHcJbaY/dh0vmvYyd6zj1ZbuJRaJGb6bUBK1v4gXWU=";
+    sha256 = "sha256-OfhbXHbGI+DaDHqZCOGiSHJPHjGuT7ZqSEjKweloW38=";
   };
 
   buildInputs = [
diff --git a/pkgs/misc/scrcpy/default.nix b/pkgs/misc/scrcpy/default.nix
index 07ab968385207..fa2fab2d96274 100644
--- a/pkgs/misc/scrcpy/default.nix
+++ b/pkgs/misc/scrcpy/default.nix
@@ -2,6 +2,7 @@
 , meson
 , ninja
 , pkg-config
+, runtimeShell
 , installShellFiles
 
 , platform-tools
@@ -11,10 +12,10 @@
 }:
 
 let
-  version = "1.24";
+  version = "1.25";
   prebuilt_server = fetchurl {
     url = "https://github.com/Genymobile/scrcpy/releases/download/v${version}/scrcpy-server-v${version}";
-    sha256 = "sha256-rnSoHqecDcclDlhmJ8J4wKmoxd5GyftcOMFn+xo28FY=";
+    sha256 = "sha256-zgMGx7vQaucvbQb37A7jN3SZWmXeceCoOBPstnrsm9s=";
   };
 in
 stdenv.mkDerivation rec {
@@ -25,7 +26,7 @@ stdenv.mkDerivation rec {
     owner = "Genymobile";
     repo = pname;
     rev = "v${version}";
-    sha256 = "sha256-mL0lSZUPMMcLGq4iPp/IgYZLaTeey9Nv9vVwY1gaIRk=";
+    sha256 = "sha256-4U/ChooesjhZSvxvk9dZrpZ/X0lf62+LEn72Ubrm2eM=";
   };
 
   # postPatch:
@@ -52,6 +53,9 @@ stdenv.mkDerivation rec {
 
     # runtime dep on `adb` to push the server
     wrapProgram "$out/bin/scrcpy" --prefix PATH : "${platform-tools}/bin"
+  '' + lib.optionalString stdenv.isLinux ''
+    substituteInPlace $out/share/applications/scrcpy-console.desktop \
+      --replace "/bin/bash" "${runtimeShell}"
   '';
 
   meta = with lib; {
diff --git a/pkgs/misc/screensavers/light-locker/default.nix b/pkgs/misc/screensavers/light-locker/default.nix
index 0ad2c77dc7ef4..33db5825bc020 100644
--- a/pkgs/misc/screensavers/light-locker/default.nix
+++ b/pkgs/misc/screensavers/light-locker/default.nix
@@ -66,9 +66,7 @@ stdenv.mkDerivation rec {
   '';
 
   passthru = {
-    updateScript = nix-update-script {
-      attrPath = pname;
-    };
+    updateScript = nix-update-script { };
   };
 
   meta = with lib; {