dotfiles.nix/pkgs/yubiswitch.nix

27 lines
601 B
Nix
Raw Normal View History

{ lib, stdenv, fetchurl, undmg, unzip }:
2023-10-26 02:37:42 +00:00
let version = "0.16";
in stdenv.mkDerivation {
2022-08-09 23:56:18 +00:00
pname = "yubiswitch";
2023-10-26 02:37:42 +00:00
inherit version;
2022-08-09 23:56:18 +00:00
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
'';
meta.platforms = lib.platforms.darwin;
2022-08-09 23:56:18 +00:00
}