From e5deb5d8cb430d2cf1a648e2e4e545cf2c9f4f29 Mon Sep 17 00:00:00 2001 From: Anton Mosich Date: Sun, 9 Feb 2025 18:17:16 +0100 Subject: [PATCH] pimsync: 0.1.0 -> 0.2.0 (#380387) pimsync now tries to create a version string using git-describe[1], but only if there isn't an environment variable PIMSYNC_VERSION. That is then used instead. Also, makeFlags in fact don't change the behavior of buildRustPackage as far as I know. Up until now man pages were neither generated nor installed. [1]: https://git.sr.ht/~whynothugo/pimsync/commit/4df1e23799ab71cf9fb214f608a6612775baf910 --- pkgs/by-name/pi/pimsync/package.nix | 24 +++++++++++++++++------- 1 file changed, 17 insertions(+), 7 deletions(-) diff --git a/pkgs/by-name/pi/pimsync/package.nix b/pkgs/by-name/pi/pimsync/package.nix index 2f5f3a6fc543..34cb166d8fda 100644 --- a/pkgs/by-name/pi/pimsync/package.nix +++ b/pkgs/by-name/pi/pimsync/package.nix @@ -5,37 +5,47 @@ pkg-config, sqlite, scdoc, + installShellFiles, makeWrapper, + nix-update-script, }: rustPlatform.buildRustPackage rec { pname = "pimsync"; - version = "0.1.0"; + version = "0.2.0"; src = fetchFromSourcehut { owner = "~whynothugo"; repo = "pimsync"; rev = "v${version}"; - hash = "sha256-upOCrpbveSSFrhdHDkTOmja4MLmsgtuoDHMsgXyulWI="; + hash = "sha256-mNOKAnBpCo4LFn7l16UG7V3cCJkUhRxhB/0jwoPLttM="; }; useFetchCargoVendor = true; - cargoHash = "sha256-i9t/6z1UJFppv3y7anB+df+UldGP2TynYKKIUAZff5Y="; + cargoHash = "sha256-2Uj+dDtuykQx1tBSGN3AE3Bz904bHfkbhKN3VIeG40M="; + + PIMSYNC_VERSION = version; nativeBuildInputs = [ pkg-config scdoc makeWrapper + installShellFiles ]; buildInputs = [ sqlite ]; - makeFlags = [ - "build" - "PREFIX=${placeholder "out"}" - ]; + postBuild = '' + make man + ''; + + postInstall = '' + installManPage target/pimsync.1 target/pimsync.conf.5 target/pimsync-migration.7 + ''; + + passthru.updateScript = nix-update-script { }; meta = { description = "Synchronise calendars and contacts";