From 62d3dc70267e6136d0f9fec70e79469f7dc20b18 Mon Sep 17 00:00:00 2001 From: Pol Dellaiera Date: Sun, 6 Aug 2023 19:32:47 +0200 Subject: [PATCH] openfpgaloader: use ``finalAttrs` pattern --- .../embedded/fpga/openfpgaloader/default.nix | 34 +++++++++++-------- 1 file changed, 20 insertions(+), 14 deletions(-) diff --git a/pkgs/development/embedded/fpga/openfpgaloader/default.nix b/pkgs/development/embedded/fpga/openfpgaloader/default.nix index 9e888a16dad5..eb44e39c49a9 100644 --- a/pkgs/development/embedded/fpga/openfpgaloader/default.nix +++ b/pkgs/development/embedded/fpga/openfpgaloader/default.nix @@ -1,40 +1,46 @@ -{ stdenv -, lib +{ + cmake , fetchFromGitHub -, cmake -, pkg-config +, hidapi +, lib , libftdi1 , libusb1 +, pkg-config +, stdenv , udev -, hidapi , zlib }: -stdenv.mkDerivation rec { +stdenv.mkDerivation (finalAttrs: { pname = "openfpgaloader"; version = "0.11.0"; src = fetchFromGitHub { owner = "trabucayre"; repo = "openFPGALoader"; - rev = "v${version}"; - sha256 = "sha256-OiyuhDrK4w13lRmgfmMlZ+1gvRZCJxsOF6MzLy3CFpg="; + rev = "v${finalAttrs.version}"; + hash = "sha256-OiyuhDrK4w13lRmgfmMlZ+1gvRZCJxsOF6MzLy3CFpg="; }; - nativeBuildInputs = [ cmake pkg-config ]; + nativeBuildInputs = [ + cmake + pkg-config + ]; buildInputs = [ + hidapi libftdi1 libusb1 udev - hidapi zlib ]; - meta = with lib; { + meta = { + broken = stdenv.isDarwin; # error: Package ‘systemd-253.6’ is not available on the requested Darwin platform. description = "Universal utility for programming FPGAs"; homepage = "https://github.com/trabucayre/openFPGALoader"; - license = licenses.agpl3Only; - maintainers = with maintainers; [ danderson ]; + license = lib.licenses.agpl3Only; + maintainers = with lib.maintainers; [ danderson ]; + platforms = lib.platforms.linux; }; -} +})