brscan5: 1.2.9-0 -> 1.3.0-0

* Use sha256 instead of sha512
* Correct patch offset due to the fact that the driver is hardcoded to
look in /opt/brother/scanner/brscan5/models for model metadata.
* see comments for more details : https://github.com/NixOS/nixpkgs/pull/254992#issuecomment-1826811896
This commit is contained in:
Samy Lahfa 2023-09-13 18:56:56 +02:00 committed by Lahfa Samy
parent 0987c80f48
commit 083770a4ba

View file

@ -10,15 +10,15 @@ let
in
stdenv.mkDerivation rec {
pname = "brscan5";
version = "1.2.9-0";
version = "1.3.0-0";
src = {
"i686-linux" = fetchurl {
url = "https://download.brother.com/welcome/dlf104034/${pname}-${version}.i386.deb";
sha256 = "ac23c9a435818955e7882ab06380adf346203ff4e45f384b40e84b8b29642f07";
sha256 = "sha256-LpbPUo8iD5CcwUoIOa1UYHQXMrZZJ7PjZpcuyXhXjzk=";
};
"x86_64-linux" = fetchurl {
url = "https://download.brother.com/welcome/dlf104033/${pname}-${version}.amd64.deb";
sha256 = "4ec23ff4b457323ae778e871a0f1abcc1848ea105af17850b57f7dcaddcfd96d";
sha256 = "sha256-ntVe/e6/cdz3+LSpGilMFZecxfv74pd7ksh85SzEdKc=";
};
}."${system}" or (throw "Unsupported system: ${system}");
@ -34,8 +34,8 @@ stdenv.mkDerivation rec {
postPatch =
let
patchOffsetBytes =
if system == "x86_64-linux" then 84632
else if system == "i686-linux" then 77396
if system == "x86_64-linux" then 86528
else if system == "i686-linux" then 79140
else throw "Unsupported system: ${system}";
in
''