dotfiles.nix/pkgs/yubiswitch.nix

24 lines
552 B
Nix
Raw Normal View History

2022-11-20 22:07:02 +00:00
{ stdenv, fetchurl, undmg, unzip, version ? "0.12", ... }:
2022-08-09 23:56:18 +00:00
stdenv.mkDerivation {
inherit version;
pname = "yubiswitch";
nativeBuildInputs = [ undmg unzip ];
src = fetchurl {
2023-08-23 00:50:29 +00:00
url =
"https://github.com/pallotron/yubiswitch/releases/download/v${version}/yubiswitch_${version}.dmg";
2022-08-09 23:56:18 +00:00
sha256 = "aR/3AXwAAhFYchfGCmqfNSs8uNnuLOCZ8B0JbXlKAf8=";
};
sourceRoot = ".";
installPhase = ''
runHook preInstall
mkdir -p $out/Applications
cp -r yubiswitch.app $out/Applications/yubiswitch.app
runHook postInstall
'';
}