depot/pkgs/by-name/ti/tidgi/package.nix
Luke Granger-Brown 57725ef3ec Squashed 'third_party/nixpkgs/' content from commit 76612b17c0ce
git-subtree-dir: third_party/nixpkgs
git-subtree-split: 76612b17c0ce71689921ca12d9ffdc9c23ce40b2
2024-11-10 23:59:47 +00:00

50 lines
1.3 KiB
Nix

{
lib,
stdenv,
fetchurl,
unzip,
}:
stdenv.mkDerivation rec {
pname = "tidgi";
version = "0.9.6";
src =
if stdenv.hostPlatform.isAarch64
then
fetchurl
{
url = "https://github.com/tiddly-gittly/TidGi-Desktop/releases/download/v${version}/TidGi-darwin-arm64-${version}.zip";
hash = "sha256-1Z9lxZZWrUVQEhBO/Kt2AS/uNs2XfihdL0iGrguPQ5g=";
}
else
fetchurl
{
url = "https://github.com/tiddly-gittly/TidGi-Desktop/releases/download/v${version}/TidGi-darwin-x64-${version}.zip";
hash = "sha256-5jHW/QrgzsGQfX4LvsRebdOJPzYTvhtC5mczxp2wPI8=";
};
dontBuild = true;
nativeBuildInputs = [unzip];
sourceRoot = ".";
installPhase = ''
runHook preInstall
mkdir -p "$out/Applications"
cp -r *.app "$out/Applications"
runHook postInstall
'';
meta = {
changelog = "https://github.com/tiddly-gittly/TidGi-Desktop/releases/tag/v${version}";
description = "Customizable personal knowledge-base and blogging platform with git as backup manager";
homepage = "https://github.com/tiddly-gittly/TidGi-Desktop";
license = lib.licenses.mpl20;
maintainers = with lib.maintainers; [klchen0112];
platforms = ["aarch64-darwin" "x86_64-darwin"];
sourceProvenance = with lib.sourceTypes; [binaryNativeCode];
};
}