Merge pull request #304593 from teutat3s/brscan5-1.3.1-0

brscan5: 1.3.0-0 -> 1.3.1-0
This commit is contained in:
Aleksana 2024-04-20 21:58:20 +08:00 committed by GitHub
commit c4fe1b7eb4
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 8 additions and 5 deletions

View File

@ -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
''