depot/pkgs/by-name/ni/nitrokey-trng-rs232-firmware/package.nix
Luke Granger-Brown 57725ef3ec Squashed 'third_party/nixpkgs/' content from commit 76612b17c0ce
git-subtree-dir: third_party/nixpkgs
git-subtree-split: 76612b17c0ce71689921ca12d9ffdc9c23ce40b2
2024-11-10 23:59:47 +00:00

45 lines
1.1 KiB
Nix

{
lib,
stdenv,
fetchFromGitHub,
pkgsCross,
}:
stdenv.mkDerivation (finalAttrs: {
pname = "nitrokey-trng-rs232-firmware";
version = "1.0.0";
src = fetchFromGitHub {
owner = "Nitrokey";
repo = "nitrokey-trng-rs232-firmware";
rev = "v${finalAttrs.version}";
hash = "sha256-vY/9KAGB6lTkkjW9zUiHA3wD2d35cEBVBTr12bHCy4k=";
};
nativeBuildInputs = [ pkgsCross.avr.stdenv.cc ];
sourceRoot = "source/src";
makeFlags = [ "all" ];
installPhase = ''
runHook preInstall
install -D TRNGSerial.bin $out/TRNGSerial.bin
runHook postInstall
'';
meta = {
description = "Firmware for the Nitrokey TRNG RS232 device";
longDescription = ''
This package does not provide an executable. It should be built using `nix-build -A nitrokey-trng-rs232-firmware` or `nix build nixpkgs#nitrokey-trng-rs232-firmware` and flashed using `libnitrokey`
'';
homepage = "https://github.com/Nitrokey/nitrokey-trng-rs232-firmware";
license = lib.licenses.gpl3Plus;
maintainers = with lib.maintainers; [
amerino
imadnyc
kiike
];
platforms = lib.platforms.linux;
};
})