From 6b1750e42972aec2c82c5a72064b1559e4a3d4e1 Mon Sep 17 00:00:00 2001 From: Peder Bergebakken Sundt Date: Fri, 18 Oct 2024 17:29:37 +0200 Subject: [PATCH] python312Packages.amaranth-boards: 0-unstable-2024-05-01 -> 0-unstable-2024-10-18 --- .../amaranth-boards/default.nix | 30 +++++++++---------- 1 file changed, 14 insertions(+), 16 deletions(-) diff --git a/pkgs/development/python-modules/amaranth-boards/default.nix b/pkgs/development/python-modules/amaranth-boards/default.nix index a010d3570b7c..cfd76b23a8ad 100644 --- a/pkgs/development/python-modules/amaranth-boards/default.nix +++ b/pkgs/development/python-modules/amaranth-boards/default.nix @@ -3,38 +3,36 @@ buildPythonPackage, fetchFromGitHub, amaranth, - setuptools, - setuptools-scm, + pdm-backend, unstableGitUpdater, }: buildPythonPackage rec { pname = "amaranth-boards"; - version = "0-unstable-2024-05-01"; + version = "0-unstable-2024-10-18"; pyproject = true; - # python setup.py --version - realVersion = "0.1.dev202+g${lib.substring 0 7 src.rev}"; + # from `pdm show` + realVersion = + let + tag = builtins.elemAt (lib.splitString "-" version) 0; + rev = lib.substring 0 7 src.rev; + in + "${tag}1.dev1+g${rev}"; src = fetchFromGitHub { owner = "amaranth-lang"; repo = "amaranth-boards"; - rev = "aba2300dc83216523e1c98fdb22471cb4bac5027"; + rev = "23c66d68045831de0a372c8c237274d74c71ef4e"; # these files change depending on git branch status postFetch = "rm -f $out/.git_archival.txt $out/.gitattributes"; - hash = "sha256-jldXyMJtuSGcZKmtwpZBYrR/UBe4ufblPYRYpBmReM8="; + hash = "sha256-cC7uvj9+6h3RPbFdu3/T1t/jhw5CuLOF8aKwDSkRE54="; }; - nativeBuildInputs = [ - setuptools - setuptools-scm - ]; - dependencies = [ - setuptools - amaranth - ]; + build-system = [ pdm-backend ]; + dependencies = [ amaranth ]; preBuild = '' - export SETUPTOOLS_SCM_PRETEND_VERSION="${realVersion}" + export PDM_BUILD_SCM_VERSION="${realVersion}" ''; # no tests