base16-schemes: unstable-2024-06-21 -> unstable-2024-11-12
[NixPkgs.git] / pkgs / by-name / ni / nitrokey-start-firmware / package.nix
blobf4b20b56ea7143a314b9aad46a4b21ad28c280c6
2   lib,
3   stdenv,
4   fetchFromGitHub,
5   gcc-arm-embedded,
6 }:
8 stdenv.mkDerivation (finalAttrs: {
9   pname = "nitrokey-start-firmware";
10   version = "13";
12   src = fetchFromGitHub {
13     owner = "Nitrokey";
14     repo = "nitrokey-start-firmware";
15     rev = "RTM.${finalAttrs.version}";
16     hash = "sha256-POW1d/fgOyYa7127FSTCtHGyMWYzKW0qqA1WUyvNc3w=";
17     fetchSubmodules = true;
18   };
20   sourceRoot = "source/src";
22   postPatch = ''
23     patchShebangs configure
24   '';
26   # Avoid additional arguments are added to configureFlags
27   configurePlatforms = [ ];
29   # from release/Makefile
30   configureFlags = [
31     "--target=NITROKEY_START-g"
32     "--vidpid=20a0:4211"
33     "--enable-factory-reset"
34     "--enable-certdo"
35   ];
37   nativeBuildInputs = [ gcc-arm-embedded ];
39   enableParallelBuilding = true;
41   installPhase = ''
42     runHook preInstall
43     mkdir $out
44     cp build/gnuk.{bin,hex} $out/
45     runHook postInstall
46   '';
48   meta = {
49     description = "Firmware for the Nitrokey Start device";
50     homepage = "https://github.com/Nitrokey/nitrokey-start-firmware";
51     license = lib.licenses.gpl3Plus;
52     maintainers = with lib.maintainers; [
53       amerino
54       imadnyc
55       kiike
56     ];
57     platforms = lib.platforms.unix;
58   };