tangled
alpha
login
or
join now
pyrox.dev
/
nixpkgs
0
fork
atom
lol
0
fork
atom
overview
issues
pulls
pipelines
sane-backends: 1.2.1 -> 1.3.1
Jonas Heinrich
2 years ago
9ab8fb34
a0e6ea95
+73
-34
2 changed files
expand all
collapse all
unified
split
pkgs
applications
graphics
sane
backends
default.nix
sane-desc-cross.patch
+61
-34
pkgs/applications/graphics/sane/backends/default.nix
···
1
1
-
{ stdenv, lib, fetchurl, fetchpatch, runtimeShell, buildPackages
2
2
-
, gettext, pkg-config, python3
3
3
-
, avahi, libgphoto2, libieee1284, libjpeg, libpng, libtiff, libusb1, libv4l, net-snmp
4
4
-
, curl, systemd, libxml2, poppler, gawk
5
5
-
, sane-drivers
6
6
-
, nixosTests
1
1
+
{
2
2
+
stdenv,
3
3
+
lib,
4
4
+
fetchFromGitLab,
5
5
+
runtimeShell,
6
6
+
buildPackages,
7
7
+
gettext,
8
8
+
pkg-config,
9
9
+
python3,
10
10
+
avahi,
11
11
+
libgphoto2,
12
12
+
libieee1284,
13
13
+
libjpeg,
14
14
+
libpng,
15
15
+
libtiff,
16
16
+
libusb1,
17
17
+
libv4l,
18
18
+
net-snmp,
19
19
+
curl,
20
20
+
systemd,
21
21
+
libxml2,
22
22
+
poppler,
23
23
+
gawk,
24
24
+
sane-drivers,
25
25
+
nixosTests,
26
26
+
autoconf,
27
27
+
automake,
28
28
+
libtool,
29
29
+
autoconf-archive,
7
30
8
31
# List of { src name backend } attibute sets - see installFirmware below:
9
9
-
, extraFirmware ? []
32
32
+
extraFirmware ? [],
10
33
11
34
# For backwards compatibility with older setups; use extraFirmware instead:
12
12
-
, gt68xxFirmware ? null, snapscanFirmware ? null
35
35
+
gt68xxFirmware ? null, snapscanFirmware ? null,
13
36
14
37
# Not included by default, scan snap drivers require fetching of unfree binaries.
15
15
-
, scanSnapDriversUnfree ? false, scanSnapDriversPackage ? sane-drivers.epjitsu
38
38
+
scanSnapDriversUnfree ? false, scanSnapDriversPackage ? sane-drivers.epjitsu,
16
39
}:
17
40
18
18
-
stdenv.mkDerivation {
41
41
+
stdenv.mkDerivation rec {
19
42
pname = "sane-backends";
20
20
-
version = "1.2.1";
43
43
+
version = "1.3.1";
44
44
+
45
45
+
src = fetchFromGitLab {
46
46
+
owner = "sane-project";
47
47
+
repo = "backends";
48
48
+
rev = "refs/tags/${version}";
49
49
+
hash = "sha256-4mwPGeRsyzngDxBQ8/48mK+VR9LYV6082xr8lTrUZrk=";
50
50
+
};
21
51
22
22
-
src = fetchurl {
23
23
-
# raw checkouts of the repo do not work because, the configure script is
24
24
-
# only functional in manually uploaded release tarballs.
52
52
+
preConfigure = ''
53
53
+
# create version files, so that autotools macros can use them:
25
54
# https://gitlab.com/sane-project/backends/-/issues/440
26
26
-
# unfortunately this make the url unpredictable on update, to find the link
27
27
-
# go to https://gitlab.com/sane-project/backends/-/releases and choose
28
28
-
# the link under the heading "Other".
29
29
-
url = "https://gitlab.com/sane-project/backends/uploads/110fc43336d0fb5e514f1fdc7360dd87/sane-backends-1.2.1.tar.gz";
30
30
-
sha256 = "f832395efcb90bb5ea8acd367a820c393dda7e0dd578b16f48928b8f5bdd0524";
31
31
-
};
55
55
+
printf "%s\n" "$version" > .tarball-version
56
56
+
printf "%s\n" "$version" > .version
32
57
33
33
-
patches = [
34
34
-
# sane-desc will be used in postInstall so compile it for build
35
35
-
# https://github.com/void-linux/void-packages/blob/master/srcpkgs/sane/patches/sane-desc-cross.patch
36
36
-
(fetchpatch {
37
37
-
name = "compile-sane-desc-for-build.patch";
38
38
-
url = "https://raw.githubusercontent.com/void-linux/void-packages/4b97cd2fb4ec38712544438c2491b6d7d5ab334a/srcpkgs/sane/patches/sane-desc-cross.patch";
39
39
-
sha256 = "sha256-y6BOXnOJBSTqvRp6LwAucqaqv+OLLyhCS/tXfLpnAPI=";
40
40
-
})
41
41
-
];
58
58
+
autoreconf -fiv
59
59
+
60
60
+
# Fixes for cross compilation
61
61
+
# https://github.com/NixOS/nixpkgs/issues/308283
42
62
43
43
-
postPatch = ''
44
63
# related to the compile-sane-desc-for-build
45
64
substituteInPlace tools/Makefile.in \
46
65
--replace 'cc -I' '$(CC_FOR_BUILD) -I'
66
66
+
67
67
+
# sane-desc will be used in postInstall so compile it for build
68
68
+
# https://github.com/void-linux/void-packages/blob/master/srcpkgs/sane/patches/sane-desc-cross.patch
69
69
+
patch -p1 -i ${./sane-desc-cross.patch}
47
70
'';
48
71
49
72
outputs = [ "out" "doc" "man" ];
···
51
74
depsBuildBuild = [ buildPackages.stdenv.cc ];
52
75
53
76
nativeBuildInputs = [
77
77
+
autoconf
78
78
+
autoconf-archive
79
79
+
automake
54
80
gettext
81
81
+
libtool
55
82
pkg-config
56
83
python3
57
84
];
···
134
161
inherit (nixosTests) sane;
135
162
};
136
163
137
137
-
meta = with lib; {
164
164
+
meta = {
138
165
description = "SANE (Scanner Access Now Easy) backends";
139
166
longDescription = ''
140
167
Collection of open-source SANE backends (device drivers).
···
144
171
scanners, see http://www.sane-project.org/sane-backends.html.
145
172
'';
146
173
homepage = "http://www.sane-project.org/";
147
147
-
license = licenses.gpl2Plus;
148
148
-
platforms = platforms.linux ++ platforms.darwin;
149
149
-
maintainers = [ maintainers.symphorien ];
174
174
+
license = lib.licenses.gpl2Plus;
175
175
+
platforms = lib.platforms.linux ++ lib.platforms.darwin;
176
176
+
maintainers = [ lib.maintainers.symphorien ];
150
177
};
151
178
}
+12
pkgs/applications/graphics/sane/backends/sane-desc-cross.patch
···
1
1
+
--- a/tools/Makefile.in
2
2
+
+++ b/tools/Makefile.in
3
3
+
@@ -586,7 +586,7 @@ gamma4scanimage$(EXEEXT): $(gamma4scanimage_OBJECTS) $(gamma4scanimage_DEPENDENC
4
4
+
5
5
+
sane-desc$(EXEEXT): $(sane_desc_OBJECTS) $(sane_desc_DEPENDENCIES) $(EXTRA_sane_desc_DEPENDENCIES)
6
6
+
@rm -f sane-desc$(EXEEXT)
7
7
+
- $(AM_V_CCLD)$(LINK) $(sane_desc_OBJECTS) $(sane_desc_LDADD) $(LIBS)
8
8
+
+ cc -I. sane-desc.c -I../include ../sanei/sanei_config.c ../sanei/sanei_init_debug.c ../sanei/sanei_constrain_value.c -o $@
9
9
+
10
10
+
sane-find-scanner$(EXEEXT): $(sane_find_scanner_OBJECTS) $(sane_find_scanner_DEPENDENCIES) $(EXTRA_sane_find_scanner_DEPENDENCIES)
11
11
+
@rm -f sane-find-scanner$(EXEEXT)
12
12
+