Skip to content

Commit

Permalink
gitbutler: 0.14.4 -> 0.14.7 (#381388)
Browse files Browse the repository at this point in the history
  • Loading branch information
wegank authored Feb 14, 2025
2 parents 9dc70f2 + 6e3495c commit 06d4355
Showing 1 changed file with 25 additions and 17 deletions.
42 changes: 25 additions & 17 deletions pkgs/by-name/gi/gitbutler/package.nix
Original file line number Diff line number Diff line change
Expand Up @@ -35,37 +35,36 @@ in

rustPlatform.buildRustPackage rec {
pname = "gitbutler";
version = "0.14.4";
version = "0.14.7";

src = fetchFromGitHub {
owner = "gitbutlerapp";
repo = "gitbutler";
tag = "release/${version}";
hash = "sha256-JeiiV7OXRI4xTTQp1dXqT1ozTrIc7cltvZ6yVOhcjGU=";
hash = "sha256-4RWZ1eRUvHj+PU9iNnDsq8k5qHpkAn6g4Zn0cXyUEzM=";
};

# Deactivate the upstream updater, set the version, and merge Tauri's
# configuration files
# Let Tauri know what version we're building
#
# Remove references to non-existent workspaces in `gix` crates
#
# Deactivate the built-in updater
postPatch = ''
jq --slurp \
'.[0] * .[1]
| .version = "${version}"
| .bundle.createUpdaterArtifacts = false
| .plugins.updater.endpoints = [ ]' \
crates/gitbutler-tauri/tauri.conf{,.release}.json \
| sponge crates/gitbutler-tauri/tauri.conf.json
tauriConfRelease="crates/gitbutler-tauri/tauri.conf.release.json"
jq '.version = "${version}" | .bundle.createUpdaterArtifacts = false' "$tauriConfRelease" | sponge "$tauriConfRelease"
tomlq -ti 'del(.lints) | del(.workspace.lints)' "$cargoDepsCopy"/gix*/Cargo.toml
substituteInPlace apps/desktop/src/lib/backend/tauri.ts \
--replace-fail 'checkUpdate = check;' 'checkUpdate = () => null;'
'';

useFetchCargoVendor = true;
cargoHash = "sha256-ooe9in3JfEPMbZSMjobVJpWZdqBTf2AsfEkcsQc0Fts=";
cargoHash = "sha256-f7FMJ4h+gFwHnKwisbn1c7Si2/aPJqxhqQ7ablNu3yo=";

pnpmDeps = pnpm_9.fetchDeps {
inherit pname version src;
hash = "sha256-bLuKG+7QncLwiwKDrlcHKaSrUmDaJUxdvpdv0Jc6UPo=";
hash = "sha256-w7DGB9OlzXMsgikCbhBcsVQzKx2atSqIOAKF+kfNoTM=";
};

nativeBuildInputs = [
Expand Down Expand Up @@ -96,7 +95,7 @@ rustPlatform.buildRustPackage rec {

tauriBuildFlags = [
"--config"
"crates/gitbutler-tauri/tauri.conf.json"
"crates/gitbutler-tauri/tauri.conf.release.json"
];

nativeCheckInputs = [ git ];
Expand All @@ -107,9 +106,18 @@ rustPlatform.buildRustPackage rec {
[
"--workspace"
]
# Errors with "Lazy instance has previously been poisoned"
++ excludeSpec "gitbutler-branch-actions"
++ excludeSpec "gitbutler-stack";
++ lib.concatMap excludeSpec [
# Requires Git directories
"but-core"
# Fails due to the issues above and below
"but-hunk-dependency"
# Errors with "Lazy instance has previously been poisoned"
"gitbutler-branch-actions"
"gitbutler-stack"
# `Expecting driver to be located at "../../target/debug/gitbutler-cli" - we also assume a certain crate location`
# We're not (usually) building in debug mode and always have a different target directory, so...
"gitbutler-edit-mode"
];

env = {
# Make sure `crates/gitbutler-tauri/inject-git-binaries.sh` can find our
Expand Down

0 comments on commit 06d4355

Please sign in to comment.