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