at master 1.2 kB view raw
1{ 2 lib, 3 fetchFromGitHub, 4 buildPythonPackage, 5 iverilog, 6 ghdl, 7 pytest, 8 pytest-xdist, 9}: 10 11buildPythonPackage { 12 pname = "myhdl"; 13 # The stable version is from 2019 and it doesn't pass tests 14 version = "unstable-2022-04-26"; 15 format = "setuptools"; 16 # The pypi src doesn't contain the ci script used in checkPhase 17 src = fetchFromGitHub { 18 owner = "myhdl"; 19 repo = "myhdl"; 20 rev = "1a4f5cd4e9de2e7bbf1053c3c2bc9526b5cc524a"; 21 hash = "sha256-Tgoem88Y6AhlCKVhMm0Khg6GPcrEktYOqV8xcMaNkl4="; 22 }; 23 24 nativeCheckInputs = [ 25 pytest 26 pytest-xdist 27 iverilog 28 ghdl 29 ]; 30 passthru = { 31 # If using myhdl as a dependency, use these if needed and not ghdl and 32 # verlog from all-packages.nix 33 inherit ghdl iverilog; 34 }; 35 checkPhase = '' 36 runHook preCheck 37 38 for target in {core,iverilog,ghdl}; do 39 env CI_TARGET="$target" bash ./scripts/ci.sh 40 done; 41 42 runHook postCheck 43 ''; 44 45 meta = with lib; { 46 description = "Free, open-source package for using Python as a hardware description and verification language"; 47 homepage = "https://www.myhdl.org/"; 48 license = licenses.lgpl21; 49 maintainers = with maintainers; [ doronbehar ]; 50 }; 51}