tangled
alpha
login
or
join now
pyrox.dev
/
nixpkgs
lol
0
fork
atom
overview
issues
pulls
pipelines
brscan5: 1.3.0-0 -> 1.3.1-0
teutat3s
2 years ago
a9cc39ca
cfd6b5fc
+8
-5
1 changed file
expand all
collapse all
unified
split
pkgs
applications
graphics
sane
backends
brscan5
default.nix
+8
-5
pkgs/applications/graphics/sane/backends/brscan5/default.nix
···
10
10
in
11
11
stdenv.mkDerivation rec {
12
12
pname = "brscan5";
13
13
-
version = "1.3.0-0";
13
13
+
version = "1.3.1-0";
14
14
src = {
15
15
"i686-linux" = fetchurl {
16
16
url = "https://download.brother.com/welcome/dlf104034/${pname}-${version}.i386.deb";
17
17
-
sha256 = "sha256-LpbPUo8iD5CcwUoIOa1UYHQXMrZZJ7PjZpcuyXhXjzk=";
17
17
+
hash = "sha256-BgS64vwsKESJBDz9H2MDwcGiresROSNFP1b+7+zlE5c=";
18
18
};
19
19
"x86_64-linux" = fetchurl {
20
20
url = "https://download.brother.com/welcome/dlf104033/${pname}-${version}.amd64.deb";
21
21
-
sha256 = "sha256-ntVe/e6/cdz3+LSpGilMFZecxfv74pd7ksh85SzEdKc=";
21
21
+
hash = "sha256-0UMbXMBlyiZI90WG5FWEP2mIZEBsxXd11dtgtyuSDnY=";
22
22
};
23
23
}."${system}" or (throw "Unsupported system: ${system}");
24
24
···
33
33
34
34
postPatch =
35
35
let
36
36
+
# Download .deb for both amd64 and i386, then unpack like unpackPhase
37
37
+
# to get the offset, run:
38
38
+
# strings -n 10 --radix=d opt/brother/scanner/brscan5/libsane-brother5.so.1.0.7 | grep "/opt/brother/scanner/brscan5/models"
36
39
patchOffsetBytes =
37
37
-
if system == "x86_64-linux" then 86528
38
38
-
else if system == "i686-linux" then 79140
40
40
+
if system == "x86_64-linux" then 86592
41
41
+
else if system == "i686-linux" then 79236
39
42
else throw "Unsupported system: ${system}";
40
43
in
41
44
''