enpass-mac: add update script

+20
+20
pkgs/by-name/en/enpass-mac/package.nix
··· 5 5 gzip, 6 6 xar, 7 7 cpio, 8 + writeShellApplication, 9 + curl, 10 + cacert, 11 + gawk, 12 + common-updater-scripts, 8 13 }: 9 14 10 15 stdenvNoCC.mkDerivation (finalAttrs: { ··· 44 49 45 50 runHook postInstall 46 51 ''; 52 + 53 + passthru.updateScript = lib.getExe (writeShellApplication { 54 + name = "enpass-mac-update-script"; 55 + runtimeInputs = [ 56 + curl 57 + cacert 58 + gawk 59 + common-updater-scripts 60 + ]; 61 + text = '' 62 + url="https://www.enpass.io/download/macos/website/stable" 63 + version=$(curl -Ls -o /dev/null -w "%{url_effective}" "$url" | awk -F'/' '{print $7}') 64 + update-source-version enpass-mac "$version" 65 + ''; 66 + }); 47 67 48 68 meta = { 49 69 description = "Choose your own safest place to store passwords";