Created
May 2, 2024 12:23
-
-
Save DataHearth/d0c7e3f03cfa550aaa58a89d1d5e745f to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ lib | |
, stdenv | |
, fetchurl | |
, fetchzip | |
, appimageTools | |
, undmg | |
}: | |
let | |
pname = "git-butler"; | |
version = "0.11.5"; | |
build_version = "864"; | |
src = { | |
x86_64-darwin = fetchurl { | |
url = "https://releases.gitbutler.com/releases/release/${version}-${build_version}/macos/x86_64/GitButler_${version}_x64.dmg"; | |
hash = lib.fakeSha256; | |
}; | |
aarch64-darwin = fetchurl { | |
url = "https://releases.gitbutler.com/releases/release/${version}-${build_version}/macos/aarch64/GitButler_${version}_aarch64.dmg"; | |
hash = "sha256-e9VT7LDqi4X3qsCR+1icWROoBkDExiNFmHDSaxt0yLQ="; | |
}; | |
x86_64-linux = fetchzip { | |
url = "https://releases.gitbutler.com/releases/release/${version}-${build_version}/linux/x86_64/git-butler_${version}_amd64.AppImage.tar.gz"; | |
hash = "sha256-7n0DlJjt1RW88lQhSCI1JVRdQNT8+M5M8kPOHXkDoUA="; | |
}; | |
}.${stdenv.system} or (throw "Unsupported system: ${stdenv.system}"); | |
meta = { | |
description = "A Git client for simultaneous branches on top of your existing workflow."; | |
mainProgram = "git-butler"; | |
homepage = "https://gitbutler.com/"; | |
changelog = "https://discord.com/channels/1060193121130000425/1183737922785116161"; | |
platforms = [ "aarch64-darwin" "x86_64-darwin" "x86_64-linux" ]; | |
license = lib.licenses.fsl11Mit; | |
maintainers = with lib.maintainers; [ DataHearth ]; | |
}; | |
in | |
if stdenv.isDarwin then stdenv.mkDerivation | |
{ | |
... | |
} | |
else appimageTools.wrapType2 { | |
inherit pname version src meta; | |
extraPkgs = pkgs: | |
appimageTools.defaultFhsEnvArgs.multiPkgs pkgs; | |
extraInstallCommands = | |
let | |
appimageContents = appimageTools.extractType2 { inherit pname version src; }; | |
in | |
'' | |
# Install .desktop files | |
install -Dm444 ${appimageContents}/git-butler.desktop -t $out/share/applications | |
install -Dm444 ${appimageContents}/git-butler.png -t $out/share/pixmaps | |
''; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Logs: