Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
at python-updates 47 lines 1.1 kB view raw
1{ 2 lib, 3 buildPythonPackage, 4 fetchFromGitHub, 5 amaranth, 6 pdm-backend, 7 unstableGitUpdater, 8}: 9 10buildPythonPackage rec { 11 pname = "amaranth-soc"; 12 version = "0.1a-unstable-2026-01-28"; 13 pyproject = true; 14 # from `pdm show` 15 realVersion = 16 let 17 tag = builtins.elemAt (lib.splitString "-" version) 0; 18 rev = lib.substring 0 7 src.rev; 19 in 20 "${tag}1.dev1+g${rev}"; 21 22 src = fetchFromGitHub { 23 owner = "amaranth-lang"; 24 repo = "amaranth-soc"; 25 rev = "12a83ad650ae88fcc1b0821a4bb6f4bbf7e19707"; 26 hash = "sha256-qW2Uie4E/PeIHjTCEnnZwBO3mv4UBMH+vlYK+fHFh+Q="; 27 }; 28 29 build-system = [ pdm-backend ]; 30 dependencies = [ amaranth ]; 31 32 preBuild = '' 33 export PDM_BUILD_SCM_VERSION="${realVersion}" 34 ''; 35 36 passthru.updateScript = unstableGitUpdater { tagPrefix = "v"; }; 37 38 meta = { 39 description = "System on Chip toolkit for Amaranth HDL"; 40 homepage = "https://github.com/amaranth-lang/amaranth-soc"; 41 license = lib.licenses.bsd2; 42 maintainers = with lib.maintainers; [ 43 thoughtpolice 44 pbsds 45 ]; 46 }; 47}