From 9abe8e8ea26d60a3488e3699b402dd0e02eb96d1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Robert=20Sch=C3=BCtz?= Date: Sat, 16 Sep 2023 13:37:43 -0700 Subject: [PATCH 1/2] celeste: 0.5.2 -> 0.5.8 Diff: https://github.com/hwittenborn/celeste/compare/v0.5.2...v0.5.8 Changelog: https://github.com/hwittenborn/celeste/blob/v0.5.8/CHANGELOG.md --- .../networking/sync/celeste/default.nix | 22 ++++--------------- 1 file changed, 4 insertions(+), 18 deletions(-) diff --git a/pkgs/applications/networking/sync/celeste/default.nix b/pkgs/applications/networking/sync/celeste/default.nix index 0e0b36263831..d7a83967450f 100644 --- a/pkgs/applications/networking/sync/celeste/default.nix +++ b/pkgs/applications/networking/sync/celeste/default.nix @@ -4,7 +4,6 @@ , rustPlatform , fetchFromGitHub , substituteAll -, fetchpatch , pkg-config , wrapGAppsHook4 , cairo @@ -20,25 +19,18 @@ , rclone }: -let - # https://github.com/trevyn/librclone/pull/8 - librclone-mismatched-types-patch = fetchpatch { - name = "use-c_char-to-be-platform-independent.patch"; - url = "https://github.com/trevyn/librclone/commit/91fdf3fa5f5eea0dfd06981ba72e09034974fdad.patch"; - hash = "sha256-8YDyUNP/ISP5jCliT6UCxZ89fdRFud+6u6P29XdPy58="; - }; -in rustPlatform.buildRustPackage rec { +rustPlatform.buildRustPackage rec { pname = "celeste"; - version = "0.5.2"; + version = "0.5.8"; src = fetchFromGitHub { owner = "hwittenborn"; repo = "celeste"; rev = "v${version}"; - hash = "sha256-pFtyfKGPlwum/twGXi/e82BjINy6/MMvvmVfrwWHTQg="; + hash = "sha256-U/6aqQig+uuWj/B9CODnV6chxY+KfMH7DqnPtSTDSA0="; }; - cargoHash = "sha256-wcgu4KApkn68Tpk3PQ9Tkxif++/8CmS4f8AOOpCA/X8="; + cargoHash = "sha256-69LK/oicfmSPbUGGzWV9kvXkHqMvEzCG8xCu61MxSdk="; patches = [ (substituteAll { @@ -56,12 +48,6 @@ in rustPlatform.buildRustPackage rec { substituteInPlace .cargo-checksum.json \ --replace $oldHash $(sha256sum build.rs | cut -d " " -f 1) popd - pushd $cargoDepsCopy/librclone - oldHash=$(sha256sum src/lib.rs | cut -d " " -f 1) - patch -p1 < ${librclone-mismatched-types-patch} - substituteInPlace .cargo-checksum.json \ - --replace $oldHash $(sha256sum src/lib.rs | cut -d " " -f 1) - popd ''; # Cargo.lock is outdated From 4738cb0cb9451b7187726b2f83146ce47b04f4c2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Robert=20Sch=C3=BCtz?= Date: Sat, 16 Sep 2023 15:14:29 -0700 Subject: [PATCH 2/2] celeste: install desktop file and icons --- pkgs/applications/networking/sync/celeste/default.nix | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/pkgs/applications/networking/sync/celeste/default.nix b/pkgs/applications/networking/sync/celeste/default.nix index d7a83967450f..b3b69571ade2 100644 --- a/pkgs/applications/networking/sync/celeste/default.nix +++ b/pkgs/applications/networking/sync/celeste/default.nix @@ -4,6 +4,7 @@ , rustPlatform , fetchFromGitHub , substituteAll +, just , pkg-config , wrapGAppsHook4 , cairo @@ -48,6 +49,11 @@ rustPlatform.buildRustPackage rec { substituteInPlace .cargo-checksum.json \ --replace $oldHash $(sha256sum build.rs | cut -d " " -f 1) popd + + substituteInPlace justfile \ + --replace "{{ env_var('DESTDIR') }}/usr" "${placeholder "out"}" + # buildRustPackage takes care of installing the binary + sed -i "#/bin/celeste#d" justfile ''; # Cargo.lock is outdated @@ -66,6 +72,7 @@ rustPlatform.buildRustPackage rec { RUSTC_BOOTSTRAP = 1; nativeBuildInputs = [ + just pkg-config rustPlatform.bindgenHook wrapGAppsHook4 @@ -90,6 +97,10 @@ rustPlatform.buildRustPackage rec { ) ''; + postInstall = '' + just install + ''; + meta = { changelog = "https://github.com/hwittenborn/celeste/blob/${src.rev}/CHANGELOG.md"; description = "GUI file synchronization client that can sync with any cloud provider";