mirror of
https://github.com/NixOS/nixpkgs.git
synced 2026-07-20 15:41:16 +00:00
openusage: init at 0.6.13 (#507055)
This commit is contained in:
54
pkgs/by-name/op/openusage/package.nix
Normal file
54
pkgs/by-name/op/openusage/package.nix
Normal file
@@ -0,0 +1,54 @@
|
||||
{
|
||||
lib,
|
||||
stdenvNoCC,
|
||||
fetchurl,
|
||||
nix-update-script,
|
||||
undmg,
|
||||
}:
|
||||
|
||||
stdenvNoCC.mkDerivation (finalAttrs: {
|
||||
pname = "openusage";
|
||||
version = "0.6.13";
|
||||
|
||||
# if is aarch64 download aarch64, otherwise intel
|
||||
src =
|
||||
if stdenvNoCC.hostPlatform.isAarch64 then
|
||||
fetchurl {
|
||||
url = "https://github.com/robinebers/openusage/releases/download/v${finalAttrs.version}/OpenUsage_${finalAttrs.version}_aarch64.dmg";
|
||||
hash = "sha256-Zfv1VAJSDHFdo2R9KgZ3TN/gu2Ua9Uleq5wNXrBBEH4=";
|
||||
}
|
||||
else if stdenvNoCC.hostPlatform.isx86_64 then
|
||||
fetchurl {
|
||||
url = "https://github.com/robinebers/openusage/releases/download/v${finalAttrs.version}/OpenUsage_${finalAttrs.version}_x64.dmg";
|
||||
hash = "sha256-tllecJOGNUDG3GwQhjeRaNrTHVK2GPzstfiT/GanZmM=";
|
||||
}
|
||||
else
|
||||
throw "Unsupported architecture";
|
||||
|
||||
installPhase = ''
|
||||
runHook preInstall
|
||||
|
||||
mkdir -p $out/Applications
|
||||
cp -r "OpenUsage.app" $out/Applications/
|
||||
|
||||
runHook postInstall
|
||||
'';
|
||||
|
||||
nativeBuildInputs = [ undmg ];
|
||||
sourceRoot = ".";
|
||||
|
||||
dontBuild = true;
|
||||
dontFixup = true;
|
||||
|
||||
passthru.updateScript = nix-update-script { };
|
||||
|
||||
meta = {
|
||||
description = "Burning through your subscriptions too fast? Paying for stuff you never use? Stop guessing. OpenUsage is free and open source.";
|
||||
homepage = "https://www.openusage.ai/";
|
||||
changelog = "https://github.com/robinebers/openusage/releases/tag/v${finalAttrs.version}";
|
||||
sourceProvenance = with lib.sourceTypes; [ binaryNativeCode ];
|
||||
platforms = lib.platforms.darwin;
|
||||
license = lib.licenses.mit;
|
||||
maintainers = with lib.maintainers; [ myzel394 ];
|
||||
};
|
||||
})
|
||||
Reference in New Issue
Block a user