1{ lib 2, buildPythonPackage 3, fetchFromGitHub 4, amaranth 5, setuptools 6, setuptools-scm 7}: 8 9buildPythonPackage rec { 10 pname = "amaranth-boards"; 11 version = "unstable-2021-12-17"; 12 # python setup.py --version 13 realVersion = "0.1.dev202+g${lib.substring 0 7 src.rev}"; 14 15 src = fetchFromGitHub { 16 owner = "amaranth-lang"; 17 repo = "amaranth-boards"; 18 rev = "8e2615765e255144403431ca95c5cdf6c78eb638"; 19 sha256 = "3EOG8SO5xBNevshXMRrxKWoJUbeaVi8ckbkmqd6Tw70="; 20 }; 21 22 nativeBuildInputs = [ setuptools-scm ]; 23 propagatedBuildInputs = [ setuptools amaranth ]; 24 25 preBuild = '' 26 export SETUPTOOLS_SCM_PRETEND_VERSION="${realVersion}" 27 ''; 28 29 # no tests 30 doCheck = false; 31 32 meta = with lib; { 33 description = "Board definitions for Amaranth HDL"; 34 homepage = "https://github.com/amaranth-lang/amaranth-boards"; 35 license = licenses.bsd2; 36 maintainers = with maintainers; [ emily thoughtpolice ]; 37 }; 38}