Files
nur/pkgs/linux/yubilock/default.nix

22 lines
503 B
Nix
Raw Permalink Normal View History

2026-05-29 15:44:32 -04:00
{ pkgs }:
let
name = "yubilock";
runtimeInputs = with pkgs; [
systemd
coreutils
yubikey-manager
gawk
getent
logger
];
yubilock = (pkgs.writeScriptBin name (builtins.readFile ./yubilock.sh)).overrideAttrs (old: {
buildCommand = "${old.buildCommand}\n patchShebangs $out";
});
in
pkgs.symlinkJoin {
inherit name;
paths = [ yubilock ] ++ runtimeInputs;
buildInputs = [ pkgs.makeWrapper ];
postBuild = "wrapProgram $out/bin/${name} --prefix PATH : $out/bin";
}