dotfiles.nix/pkgs/yubiswitch.nix

27 lines
601 B
Nix

{ lib, stdenv, fetchurl, undmg, unzip }:
let version = "0.16";
in stdenv.mkDerivation {
pname = "yubiswitch";
inherit version;
nativeBuildInputs = [ undmg unzip ];
src = fetchurl {
url =
"https://github.com/pallotron/yubiswitch/releases/download/v${version}/yubiswitch_${version}.dmg";
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;
}