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 <felixsinger@posteo.net>
This commit is contained in:
@@ -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";
|
||||
|
||||
Reference in New Issue
Block a user