nixpkgs/pkgs/by-name/ni/nitrokey-start-firmware/package.nix
Enric Morales 67c19cf1f7 nitrokey-start-firmware: init at 13
Co-authored-by: Simon Bruder <simon@sbruder.de>
Co-authored-by: Abdullah Imad <me@imad.nyc>
Co-authored-by: Alberto Merino <amerinor01@gmail.com>
Co-authored-by: Enric Morales <me@enric.me>
Co-authored-by: Jack Leightcap <jack@leightcap.com>
Co-authored-by: Roland Coeurjoly <rolandcoeurjoly@gmail.com>
2024-09-11 14:20:48 +02:00

59 lines
1.2 KiB
Nix

{
lib,
stdenv,
fetchFromGitHub,
gcc-arm-embedded,
}:
stdenv.mkDerivation (finalAttrs: {
pname = "nitrokey-start-firmware";
version = "13";
src = fetchFromGitHub {
owner = "Nitrokey";
repo = "nitrokey-start-firmware";
rev = "RTM.${finalAttrs.version}";
hash = "sha256-POW1d/fgOyYa7127FSTCtHGyMWYzKW0qqA1WUyvNc3w=";
fetchSubmodules = true;
};
sourceRoot = "source/src";
postPatch = ''
patchShebangs configure
'';
# Avoid additional arguments are added to configureFlags
configurePlatforms = [ ];
# from release/Makefile
configureFlags = [
"--target=NITROKEY_START-g"
"--vidpid=20a0:4211"
"--enable-factory-reset"
"--enable-certdo"
];
nativeBuildInputs = [ gcc-arm-embedded ];
enableParallelBuilding = true;
installPhase = ''
runHook preInstall
mkdir $out
cp build/gnuk.{bin,hex} $out/
runHook postInstall
'';
meta = {
description = "Firmware for the Nitrokey Start device";
homepage = "https://github.com/Nitrokey/nitrokey-start-firmware";
license = lib.licenses.gpl3Plus;
maintainers = with lib.maintainers; [
amerino
imadnyc
kiike
];
platforms = lib.platforms.unix;
};
})