From 70d7943da74b493e962137129b6acf993a61e6d7 Mon Sep 17 00:00:00 2001 From: Felix Singer Date: Sat, 1 Feb 2025 22:14:17 +0100 Subject: [PATCH] flashprog: switch over to Meson build system (#378140) flashprog: Switch over to Meson build system With Meson, it's not needed to specify much configuration options and if not specified otherwise the the flashprog build system uses auto detection for supported programmers using the found libraries. Signed-off-by: Felix Singer --- pkgs/by-name/fl/flashprog/package.nix | 22 +++++----------------- 1 file changed, 5 insertions(+), 17 deletions(-) diff --git a/pkgs/by-name/fl/flashprog/package.nix b/pkgs/by-name/fl/flashprog/package.nix index 2839811d1ed7..260effa1a4e7 100644 --- a/pkgs/by-name/fl/flashprog/package.nix +++ b/pkgs/by-name/fl/flashprog/package.nix @@ -1,11 +1,12 @@ { fetchgit, - installShellFiles, lib, libftdi1, libgpiod, libjaylink, libusb1, + meson, + ninja, pciutils, pkg-config, stdenv, @@ -24,9 +25,11 @@ stdenv.mkDerivation (finalAttrs: { }; nativeBuildInputs = [ - installShellFiles + meson + ninja pkg-config ]; + buildInputs = [ libftdi1 @@ -42,21 +45,6 @@ stdenv.mkDerivation (finalAttrs: { libgpiod ]; - makeFlags = - let - yesNo = flag: if flag then "yes" else "no"; - in - [ - "libinstall" - "PREFIX=$(out)" - "CONFIG_JLINK_SPI=${yesNo withJlink}" - "CONFIG_LINUX_GPIO_SPI=${yesNo withGpio}" - "CONFIG_ENABLE_LIBPCI_PROGRAMMERS=${yesNo (!stdenv.hostPlatform.isDarwin)}" - "CONFIG_INTERNAL_X86=${yesNo (!(stdenv.hostPlatform.isDarwin) && stdenv.hostPlatform.isx86_64)}" - "CONFIG_INTERNAL_DMI=${yesNo (!(stdenv.hostPlatform.isDarwin) && stdenv.hostPlatform.isx86_64)}" - "CONFIG_RAYER_SPI=${yesNo (!(stdenv.hostPlatform.isDarwin) && stdenv.hostPlatform.isx86_64)}" - ]; - meta = with lib; { homepage = "https://flashprog.org"; description = "Utility for reading, writing, erasing and verifying flash ROM chips";