2023-08-10 07:59:29 +00:00
|
|
|
{
|
|
|
|
cmake
|
2021-02-13 14:23:35 +00:00
|
|
|
, fetchFromGitHub
|
2023-08-10 07:59:29 +00:00
|
|
|
, hidapi
|
|
|
|
, lib
|
2021-02-13 14:23:35 +00:00
|
|
|
, libftdi1
|
|
|
|
, libusb1
|
2023-08-10 07:59:29 +00:00
|
|
|
, pkg-config
|
|
|
|
, stdenv
|
2021-02-13 14:23:35 +00:00
|
|
|
, udev
|
2022-07-14 12:49:19 +00:00
|
|
|
, zlib
|
2021-02-13 14:23:35 +00:00
|
|
|
}:
|
|
|
|
|
2023-08-10 07:59:29 +00:00
|
|
|
stdenv.mkDerivation (finalAttrs: {
|
2021-02-13 14:23:35 +00:00
|
|
|
pname = "openfpgaloader";
|
2024-04-21 15:54:59 +00:00
|
|
|
version = "0.12.1";
|
2021-02-13 14:23:35 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "trabucayre";
|
|
|
|
repo = "openFPGALoader";
|
2023-08-10 07:59:29 +00:00
|
|
|
rev = "v${finalAttrs.version}";
|
2024-04-21 15:54:59 +00:00
|
|
|
hash = "sha256-iJSTiOcW15q3mWmMhe5wmO11cu2xfAI9zCsoB33ujWQ=";
|
2021-02-13 14:23:35 +00:00
|
|
|
};
|
|
|
|
|
2023-08-10 07:59:29 +00:00
|
|
|
nativeBuildInputs = [
|
|
|
|
cmake
|
|
|
|
pkg-config
|
|
|
|
];
|
2021-02-13 14:23:35 +00:00
|
|
|
|
|
|
|
buildInputs = [
|
2023-08-10 07:59:29 +00:00
|
|
|
hidapi
|
2021-02-13 14:23:35 +00:00
|
|
|
libftdi1
|
|
|
|
libusb1
|
2022-07-14 12:49:19 +00:00
|
|
|
zlib
|
2023-10-19 13:55:26 +00:00
|
|
|
] ++ lib.optionals (lib.meta.availableOn stdenv.hostPlatform udev) [
|
|
|
|
udev
|
2021-02-13 14:23:35 +00:00
|
|
|
];
|
|
|
|
|
2023-08-10 07:59:29 +00:00
|
|
|
meta = {
|
2021-02-13 14:23:35 +00:00
|
|
|
description = "Universal utility for programming FPGAs";
|
2024-04-21 15:54:59 +00:00
|
|
|
mainProgram = "openFPGALoader";
|
2021-02-13 14:23:35 +00:00
|
|
|
homepage = "https://github.com/trabucayre/openFPGALoader";
|
2023-08-10 07:59:29 +00:00
|
|
|
license = lib.licenses.agpl3Only;
|
2024-07-31 10:19:44 +00:00
|
|
|
maintainers = [ ];
|
2023-10-19 13:55:26 +00:00
|
|
|
platforms = lib.platforms.unix;
|
2021-02-13 14:23:35 +00:00
|
|
|
};
|
2023-08-10 07:59:29 +00:00
|
|
|
})
|