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