lol

sane-backends: 1.2.1 -> 1.3.1

+73 -34
+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 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, 7 30 8 31 # List of { src name backend } attibute sets - see installFirmware below: 9 - , extraFirmware ? [] 32 + extraFirmware ? [], 10 33 11 34 # For backwards compatibility with older setups; use extraFirmware instead: 12 - , gt68xxFirmware ? null, snapscanFirmware ? null 35 + gt68xxFirmware ? null, snapscanFirmware ? null, 13 36 14 37 # Not included by default, scan snap drivers require fetching of unfree binaries. 15 - , scanSnapDriversUnfree ? false, scanSnapDriversPackage ? sane-drivers.epjitsu 38 + scanSnapDriversUnfree ? false, scanSnapDriversPackage ? sane-drivers.epjitsu, 16 39 }: 17 40 18 - stdenv.mkDerivation { 41 + stdenv.mkDerivation rec { 19 42 pname = "sane-backends"; 20 - version = "1.2.1"; 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 + }; 21 51 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. 52 + preConfigure = '' 53 + # create version files, so that autotools macros can use them: 25 54 # 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 - }; 55 + printf "%s\n" "$version" > .tarball-version 56 + printf "%s\n" "$version" > .version 32 57 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 - ]; 58 + autoreconf -fiv 59 + 60 + # Fixes for cross compilation 61 + # https://github.com/NixOS/nixpkgs/issues/308283 42 62 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 + 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} 47 70 ''; 48 71 49 72 outputs = [ "out" "doc" "man" ]; ··· 51 74 depsBuildBuild = [ buildPackages.stdenv.cc ]; 52 75 53 76 nativeBuildInputs = [ 77 + autoconf 78 + autoconf-archive 79 + automake 54 80 gettext 81 + libtool 55 82 pkg-config 56 83 python3 57 84 ]; ··· 134 161 inherit (nixosTests) sane; 135 162 }; 136 163 137 - meta = with lib; { 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 - license = licenses.gpl2Plus; 148 - platforms = platforms.linux ++ platforms.darwin; 149 - maintainers = [ maintainers.symphorien ]; 174 + license = lib.licenses.gpl2Plus; 175 + platforms = lib.platforms.linux ++ lib.platforms.darwin; 176 + maintainers = [ lib.maintainers.symphorien ]; 150 177 }; 151 178 }
+12
pkgs/applications/graphics/sane/backends/sane-desc-cross.patch
··· 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 +