Skip to content

Commit

Permalink
karlender: 0.9.2 -> 0.10.4
Browse files Browse the repository at this point in the history
  • Loading branch information
Bot-wxt1221 committed Nov 5, 2024
1 parent 7af2edf commit 3368b85
Show file tree
Hide file tree
Showing 2 changed files with 106 additions and 4 deletions.
87 changes: 87 additions & 0 deletions pkgs/by-name/ka/karlender/0001-update-time-rs.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,87 @@
From 04ae9c80bfc0cbff6437409aad84784e7307a2e3 Mon Sep 17 00:00:00 2001
From: wxt <[email protected]>
Date: Tue, 5 Nov 2024 18:41:14 +0800
Subject: [PATCH] update time-rs

---
Cargo.lock | 28 ++++++++++++++++++++++------
1 file changed, 22 insertions(+), 6 deletions(-)

diff --git a/Cargo.lock b/Cargo.lock
index 04a5fbe..51ded8b 100644
--- a/Cargo.lock
+++ b/Cargo.lock
@@ -463,10 +463,11 @@ dependencies = [

[[package]]
name = "deranged"
-version = "0.3.8"
+version = "0.3.11"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "f2696e8a945f658fd14dc3b87242e6b80cd0f36ff04ea560fa39082368847946"
+checksum = "b42b6fa04a440b495c8b04d0e71b707c585f83cb9cb28cf8cd0d976c315e31b4"
dependencies = [
+ "powerfmt",
"serde",
]

@@ -1532,6 +1533,12 @@ dependencies = [
"num-traits",
]

+[[package]]
+name = "num-conv"
+version = "0.1.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "51d515d32fb182ee37cda2ccdcb92950d6a3c2893aa280e540671c2cd0f3b1d9"
+
[[package]]
name = "num-integer"
version = "0.1.45"
@@ -1739,6 +1746,12 @@ dependencies = [
"windows-sys",
]

+[[package]]
+name = "powerfmt"
+version = "0.2.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "439ee305def115ba05938db6eb1644ff94165c5ab5e9420d1c1bcedbba909391"
+
[[package]]
name = "ppv-lite86"
version = "0.2.17"
@@ -2274,12 +2287,14 @@ dependencies = [

[[package]]
name = "time"
-version = "0.3.29"
+version = "0.3.36"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "426f806f4089c493dcac0d24c29c01e2c38baf8e30f1b716ee37e83d200b18fe"
+checksum = "5dfd88e563464686c916c7e46e623e520ddc6d79fa6641390f2e3fa86e83e885"
dependencies = [
"deranged",
"itoa",
+ "num-conv",
+ "powerfmt",
"serde",
"time-core",
"time-macros",
@@ -2293,10 +2308,11 @@ checksum = "ef927ca75afb808a4d64dd374f00a2adf8d0fcff8e7b184af886c3c87ec4a3f3"

[[package]]
name = "time-macros"
-version = "0.2.15"
+version = "0.2.18"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "4ad70d68dba9e1f8aceda7aa6711965dfec1cac869f311a51bd08b3a2ccbce20"
+checksum = "3f252a68540fde3a3877aeea552b832b40ab9a69e318efd078774a01ddee1ccf"
dependencies = [
+ "num-conv",
"time-core",
]

--
2.46.1

23 changes: 19 additions & 4 deletions pkgs/by-name/ka/karlender/package.nix
Original file line number Diff line number Diff line change
Expand Up @@ -9,35 +9,50 @@
glib,
tzdata,
nix-update-script,
dbus,
cargo-gra,
}:

rustPlatform.buildRustPackage rec {
pname = "karlender";
version = "0.9.2";
version = "0.10.4";

src = fetchFromGitLab {
owner = "floers";
repo = pname;
rev = "v${version}";
hash = "sha256-txPMOWwxgs9PH1Scnwr/X4cuMIUa+eoLW3K2aqmqRMQ=";
hash = "sha256-W+s1RCPwy7ZiK514AaQLwV9y+VJ58oMGlrS5cdoFKIg=";
};

cargoHash = "sha256-OyyzzkoYBed2XFCesj3QBodT9e/BaapGl/z0f6+cDZA=";
cargoPatches = [
./0001-update-time-rs.patch
];

cargoHash = "sha256-CeHIx6oUtAcr6tBdqmIDTLuYcesaA6G72L3HwHDLY7Y=";

nativeBuildInputs = [
pkg-config
wrapGAppsHook4
glib
cargo-gra
];

buildInputs = [
gtk4
libadwaita
dbus
];

checkFlags = [
"--skip domain::time::tests::test_get_correct_offset_for_dst" # Need time
];

preBuild = ''
cargo-gra gen
'';

postPatch = ''
substituteInPlace src/domain/time.rs --replace "/usr/share/zoneinfo" "${tzdata}/share/zoneinfo"
substituteInPlace build.rs --replace "// gra::build" "gra::build"
'';

postInstall = ''
Expand Down

0 comments on commit 3368b85

Please sign in to comment.