lol

apt, dpkg: fix cross build (#372955)

authored by

Arne Keller and committed by
GitHub
7d4cd942 ef56e777

+24 -15
+19 -14
pkgs/by-name/ap/apt/package.nix
··· 49 49 "man" 50 50 ]; 51 51 52 - nativeBuildInputs = [ 53 - cmake 54 - gtest 55 - (lib.getBin libxslt) 56 - pkg-config 57 - triehash 58 - ]; 52 + nativeBuildInputs = 53 + [ 54 + cmake 55 + dpkg # dpkg-architecture 56 + gettext # msgfmt 57 + gtest 58 + (lib.getBin libxslt) 59 + pkg-config 60 + triehash 61 + perlPackages.perl 62 + ] 63 + ++ lib.optionals withDocs [ 64 + docbook_xml_dtd_45 65 + doxygen 66 + perlPackages.Po4a 67 + w3m 68 + ]; 59 69 60 70 buildInputs = 61 71 [ ··· 64 74 db 65 75 dpkg 66 76 gnutls 77 + gtest 67 78 libgcrypt 68 79 libgpg-error 69 80 libseccomp 70 81 libtasn1 71 82 lz4 72 83 p11-kit 73 - perlPackages.perl 74 84 udev 75 85 xxHash 76 86 xz 77 87 zstd 78 88 ] 79 - ++ lib.optionals withDocs [ 80 - docbook_xml_dtd_45 81 - doxygen 82 - perlPackages.Po4a 83 - w3m 84 - ] 85 89 ++ lib.optionals withNLS [ 86 90 gettext 87 91 ]; 88 92 89 93 cmakeFlags = [ 90 94 (lib.cmakeOptionType "filepath" "BERKELEY_INCLUDE_DIRS" "${lib.getDev db}/include") 95 + (lib.cmakeOptionType "filepath" "DPKG_DATADIR" "${dpkg}/share/dpkg") 91 96 (lib.cmakeOptionType "filepath" "DOCBOOK_XSL" "${docbook_xsl}/share/xml/docbook-xsl") 92 97 (lib.cmakeOptionType "filepath" "GNUTLS_INCLUDE_DIR" "${lib.getDev gnutls}/include") 93 98 (lib.cmakeFeature "DROOT_GROUP" "root")
+5 -1
pkgs/by-name/dp/dpkg/package.nix
··· 49 49 for i in $(find . -name Makefile.in); do 50 50 substituteInPlace $i --replace "install-data-local:" "disabled:" ; 51 51 done 52 + 53 + # Skip check broken when cross-compiling. 54 + substituteInPlace configure \ 55 + --replace-fail 'as_fn_error $? "cannot find a GNU tar program"' "#" 52 56 ''; 53 57 54 58 postPatch = '' 55 - patchShebangs . 59 + patchShebangs --host . 56 60 57 61 # Dpkg commands sometimes calls out to shell commands 58 62 substituteInPlace lib/dpkg/dpkg.h \