dotfiles.nix/pkgs/yubiswitch.nix

25 lines
554 B
Nix

{ 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
'';
}