about summary refs log tree commit diff
path: root/pkgs/applications
diff options
context:
space:
mode:
authorAleksana <me@aleksana.moe>2024-04-27 16:41:32 +0800
committerGitHub <noreply@github.com>2024-04-27 16:41:32 +0800
commit41ea4d332aef73f273e0218405dece419b93a5e1 (patch)
tree92c38875cc564ebb593f2db728a197e989f2b200 /pkgs/applications
parent4ba625d533ffa7dd249e326b8c2970c5e0cb8d27 (diff)
parent7d440c78e2bb8c3ef0dd3f06a6be42ba4dfe6805 (diff)
Merge pull request #305774 from NixOS/backport-304593-to-release-23.11
[Backport release-23.11] brscan5: 1.3.0-0 -> 1.3.1-0
Diffstat (limited to 'pkgs/applications')
-rw-r--r--pkgs/applications/graphics/sane/backends/brscan5/default.nix13
1 files changed, 8 insertions, 5 deletions
diff --git a/pkgs/applications/graphics/sane/backends/brscan5/default.nix b/pkgs/applications/graphics/sane/backends/brscan5/default.nix
index 7bce5301f938a..c15599ec66bbb 100644
--- a/pkgs/applications/graphics/sane/backends/brscan5/default.nix
+++ b/pkgs/applications/graphics/sane/backends/brscan5/default.nix
@@ -10,15 +10,15 @@ let
 in
 stdenv.mkDerivation rec {
   pname = "brscan5";
-  version = "1.3.0-0";
+  version = "1.3.1-0";
   src = {
     "i686-linux" = fetchurl {
       url = "https://download.brother.com/welcome/dlf104034/${pname}-${version}.i386.deb";
-      sha256 = "sha256-LpbPUo8iD5CcwUoIOa1UYHQXMrZZJ7PjZpcuyXhXjzk=";
+      hash = "sha256-BgS64vwsKESJBDz9H2MDwcGiresROSNFP1b+7+zlE5c=";
     };
     "x86_64-linux" = fetchurl {
       url = "https://download.brother.com/welcome/dlf104033/${pname}-${version}.amd64.deb";
-      sha256 = "sha256-ntVe/e6/cdz3+LSpGilMFZecxfv74pd7ksh85SzEdKc=";
+      hash = "sha256-0UMbXMBlyiZI90WG5FWEP2mIZEBsxXd11dtgtyuSDnY=";
     };
   }."${system}" or (throw "Unsupported system: ${system}");
 
@@ -33,9 +33,12 @@ stdenv.mkDerivation rec {
 
   postPatch =
     let
+      # Download .deb for both amd64 and i386, then unpack like unpackPhase
+      # to get the offset, run:
+      # strings -n 10 --radix=d opt/brother/scanner/brscan5/libsane-brother5.so.1.0.7 | grep "/opt/brother/scanner/brscan5/models"
       patchOffsetBytes =
-        if system == "x86_64-linux" then 86528
-        else if system == "i686-linux" then 79140
+        if system == "x86_64-linux" then 86592
+        else if system == "i686-linux" then 79236
         else throw "Unsupported system: ${system}";
     in
     ''