flashrom: fix build on aarch64
This commit is contained in:
parent
8f39ad3da1
commit
928b9e29e3
1 changed files with 11 additions and 3 deletions
|
@ -1,4 +1,5 @@
|
|||
{ fetchurl
|
||||
, fetchpatch
|
||||
, gcc9Stdenv
|
||||
, installShellFiles
|
||||
, lib
|
||||
|
@ -20,11 +21,18 @@ gcc9Stdenv.mkDerivation rec {
|
|||
};
|
||||
|
||||
nativeBuildInputs = [ pkg-config installShellFiles ];
|
||||
buildInputs = [ libftdi1 libusb1 ]
|
||||
# https://github.com/flashrom/flashrom/issues/125
|
||||
++ lib.optional (!gcc9Stdenv.isAarch64) pciutils
|
||||
buildInputs = [ libftdi1 libusb1 pciutils ]
|
||||
++ lib.optional jlinkSupport libjaylink;
|
||||
|
||||
patches = [
|
||||
# remove when updating from 1.2
|
||||
(fetchpatch {
|
||||
name = "fix-aarch64-build.patch";
|
||||
url = "https://github.com/flashrom/flashrom/commit/da6b3b70cb852dd8e9f9e21aef95fa83e7f7ab0d.patch";
|
||||
sha256 = "sha256-fXYDXgT/ik+qtxxFEyJ7/axtycbwLkEg0UD+hzsYEwg=";
|
||||
})
|
||||
];
|
||||
|
||||
postPatch = ''
|
||||
substituteInPlace util/z60_flashrom.rules \
|
||||
--replace "plugdev" "flashrom"
|
||||
|
|
Loading…
Reference in a new issue