From e509766da30d71f161ef8e49cb7fd6455f0c34dc Mon Sep 17 00:00:00 2001 From: Florian Klink Date: Mon, 28 Jul 2025 17:55:40 +0200 Subject: [PATCH] glasgow: simplify PDM_BUILD_SCM_VERSION Remove one manual step when updating, we don't need to maintain the commit counter, as discussed in the glasgow IRC channel. --- pkgs/by-name/gl/glasgow/package.nix | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/pkgs/by-name/gl/glasgow/package.nix b/pkgs/by-name/gl/glasgow/package.nix index ed41e2e22f30..2094b0078281 100644 --- a/pkgs/by-name/gl/glasgow/package.nix +++ b/pkgs/by-name/gl/glasgow/package.nix @@ -12,13 +12,13 @@ python3.pkgs.buildPythonApplication rec { pname = "glasgow"; version = "0-unstable-2025-07-28"; - # from `pdm show` - realVersion = + # Similar to `pdm show`, but without the commit counter + pdmVersion = let tag = builtins.elemAt (lib.splitString "-" version) 0; rev = lib.substring 0 7 src.rev; in - "${tag}.1.dev2611+g${rev}"; + "${tag}.1.dev0+g${rev}"; # the latest commit ID touching the `firmware` directory, can differ from rev! firmwareGitRev = "4fe35360"; @@ -77,7 +77,7 @@ python3.pkgs.buildPythonApplication rec { cmp -s firmware/glasgow.ihex software/glasgow/hardware/firmware.ihex cd software - export PDM_BUILD_SCM_VERSION="${realVersion}" + export PDM_BUILD_SCM_VERSION="${pdmVersion}" ''; # installCheck tries to build_ext again