Skip to content

Commit

Permalink
daisydisk: init at 4.30
Browse files Browse the repository at this point in the history
  • Loading branch information
DimitarNestorov committed Jan 4, 2025
1 parent f23f3b8 commit 88d1dc0
Showing 1 changed file with 60 additions and 0 deletions.
60 changes: 60 additions & 0 deletions pkgs/by-name/da/daisydisk/package.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
{
lib,
stdenvNoCC,
fetchzip,
curl,
cacert,
xmlstarlet,
common-updater-scripts,
writeShellApplication,
}:

stdenvNoCC.mkDerivation (finalAttrs: {
pname = "daisydisk";
version = "4.30";

src = fetchzip {
url = "https://daisydiskapp.com/download/DaisyDisk.zip";
hash = "sha256-4nVD5FXj0Ol+QQ7NYUxGH3DzkXEpTawJoZpUgdIUNVY=";
stripRoot = false;
};

dontPatch = true;
dontConfigure = true;
dontBuild = true;
dontFixup = true;

installPhase = ''
runHook preInstall
mkdir -p $out/Applications
mv DaisyDisk.app $out/Applications
runHook postInstall
'';

passthru.updateScript = lib.getExe (writeShellApplication {
name = "daisydisk-update-script";
runtimeInputs = [
curl
cacert
xmlstarlet
common-updater-scripts
];
text = ''
url="https://daisydiskapp.com/downloads/appcastFeed.php"
version=$(curl -s "$url" | xmlstarlet sel -t -v 'rss/channel/item[1]/enclosure/@sparkle:version' -n)
update-source-version daisydisk "$version"
'';
});

meta = {
description = "Find out what’s taking up your disk space and recover it in the most efficient and easy way";
homepage = "https://daisydiskapp.com/";
changelog = "https://daisydiskapp.com/releases";
license = [ lib.licenses.unfree ];
sourceProvenance = [ lib.sourceTypes.binaryNativeCode ];
maintainers = with lib.maintainers; [ DimitarNestorov ];
platforms = lib.platforms.darwin;
};
})

0 comments on commit 88d1dc0

Please sign in to comment.