12 , withGpio ? stdenv.isLinux
15 stdenv.mkDerivation (finalAttrs: {
20 url = "https://review.sourcearcade.org/flashprog";
21 rev = "v${finalAttrs.version}";
22 hash = "sha256-CLwaGxVOo8FJaWfvrJ2hAm7XonP5nHT6YTsaw7scKCM=";
32 ] ++ lib.optionals (!stdenv.isDarwin) [
34 ] ++ lib.optionals (withJlink) [
36 ] ++ lib.optionals (withGpio) [
42 yesNo = flag: if flag then "yes" else "no";
47 "CONFIG_JLINK_SPI=${yesNo withJlink}"
48 "CONFIG_LINUX_GPIO_SPI=${yesNo withGpio}"
49 "CONFIG_ENABLE_LIBPCI_PROGRAMMERS=${yesNo (!stdenv.isDarwin)}"
50 "CONFIG_INTERNAL_X86=${yesNo (!(stdenv.isDarwin) && stdenv.isx86_64)}"
51 "CONFIG_INTERNAL_DMI=${yesNo (!(stdenv.isDarwin) && stdenv.isx86_64)}"
52 "CONFIG_RAYER_SPI=${yesNo (!(stdenv.isDarwin) && stdenv.isx86_64)}"
56 homepage = "https://flashprog.org";
57 description = "Utility for reading, writing, erasing and verifying flash ROM chips";
58 license = with licenses; [ gpl2Plus ];
59 maintainers = with maintainers; [ felixsinger ];
60 platforms = platforms.all;
61 mainProgram = "flashprog";