From 42ef9b1a20d330c10268440d53edd02f805991dc Mon Sep 17 00:00:00 2001 From: Felix Singer Date: Fri, 8 Oct 2021 01:28:49 +0200 Subject: [PATCH] flashrom: Use Makefile instead of Meson The Meson build system is not fully integrated, it's work in progress. For example, it doesn't know some programmers yet. Thus, use Makefile instead. To make the compilation working again, use GCC 9 instead of GCC 10. Also, put udev rules into the lib directory instead of etc, since it exists already. Signed-off-by: Felix Singer --- pkgs/tools/misc/flashrom/default.nix | 22 +++++++++------------- 1 file changed, 9 insertions(+), 13 deletions(-) diff --git a/pkgs/tools/misc/flashrom/default.nix b/pkgs/tools/misc/flashrom/default.nix index e4e4868e4d9f..d1a106549ab0 100644 --- a/pkgs/tools/misc/flashrom/default.nix +++ b/pkgs/tools/misc/flashrom/default.nix @@ -1,8 +1,6 @@ { lib -, stdenv +, gcc9Stdenv , fetchurl -, meson -, ninja , pkg-config , libftdi1 , libusb1 @@ -10,7 +8,7 @@ , installShellFiles }: -stdenv.mkDerivation rec { +gcc9Stdenv.mkDerivation rec { pname = "flashrom"; version = "1.2"; @@ -24,17 +22,15 @@ stdenv.mkDerivation rec { --replace "plugdev" "flashrom" ''; - # Meson build doesn't build and install manpage. Only Makefile can. - # Build manpage from source directory. Here we're inside the ./build subdirectory + makeFlags = [ "PREFIX=$(out)" "libinstall" ]; + postInstall = '' - make flashrom.8 -C .. - installManPage ../flashrom.8 - install -Dm644 ../util/z60_flashrom.rules $out/etc/udev/rules.d/flashrom.rules + install -Dm644 util/z60_flashrom.rules $out/lib/udev/rules.d/flashrom.rules ''; - mesonFlags = lib.optionals stdenv.isAarch64 [ "-Dpciutils=false" ]; - nativeBuildInputs = [ meson pkg-config ninja installShellFiles ]; - buildInputs = [ libftdi1 libusb1 pciutils ]; + nativeBuildInputs = [ pkg-config installShellFiles ]; + buildInputs = [ libftdi1 libusb1 ] + ++ lib.optional (!gcc9Stdenv.isAarch64) pciutils; meta = with lib; { homepage = "http://www.flashrom.org"; @@ -42,6 +38,6 @@ stdenv.mkDerivation rec { license = licenses.gpl2; maintainers = with maintainers; [ funfunctor fpletz felixsinger ]; platforms = platforms.all; - broken = stdenv.isDarwin; # requires DirectHW + broken = gcc9Stdenv.isDarwin; # requires DirectHW }; }