nixpkgs mirror (for testing)
github.com/NixOS/nixpkgs
nix
1{
2 lib,
3 stdenvNoCC,
4 fetchFromGitHub,
5 bash,
6 iotools,
7 makeWrapper,
8}:
9
10stdenvNoCC.mkDerivation (finalAttrs: {
11 pname = "psb_status";
12 version = "0-unstable-2024-10-10";
13
14 src = fetchFromGitHub {
15 owner = "mkopec";
16 repo = "psb_status";
17 rev = "be896832c53d6b0b70cf8a87f7ee46ad33deefc2";
18 hash = "sha256-4anPyjO8y3FgnYWa4bGFxI8Glk9srw/XF552tnixc8I=";
19 };
20
21 dontBuild = true;
22
23 nativeBuildInputs = [ makeWrapper ];
24
25 installPhase = ''
26 runHook preInstall
27
28 mkdir -p $out/bin
29 install -m755 psb_status.sh $out/bin/psb_status
30 wrapProgram $out/bin/psb_status \
31 --prefix PATH : ${lib.makeBinPath [ iotools ]}
32
33 runHook postInstall
34 '';
35
36 meta = {
37 description = "Script to check Platform Secure Boot enablement on Zen based AMD CPUs";
38 homepage = "https://github.com/mkopec/psb_status";
39 license = lib.licenses.mit;
40 maintainers = with lib.maintainers; [ phodina ];
41 platforms = [ "x86_64-linux" ];
42 mainProgram = "psb_status";
43 };
44})