depot/third_party/nixpkgs/pkgs/development/python-modules/amaranth-soc/default.nix
Default email 5e7c2d6cef Project import generated by Copybara.
GitOrigin-RevId: f99e5f03cc0aa231ab5950a15ed02afec45ed51a
2023-10-09 21:29:22 +02:00

35 lines
895 B
Nix

{ lib
, buildPythonPackage
, fetchFromGitHub
, amaranth
, setuptools
, setuptools-scm
}:
buildPythonPackage rec {
pname = "amaranth-soc";
version = "unstable-2023-09-15";
# python setup.py --version
realVersion = "0.1.dev70+g${lib.substring 0 7 src.rev}";
src = fetchFromGitHub {
owner = "amaranth-lang";
repo = "amaranth-soc";
rev = "cce8a79a37498f4d5900be21a295ba77e51e6c9d";
sha256 = "sha256-hfkJaqICuy3iSTwLM9lbUPvSMDBLW8GdxqswyAOsowo=";
};
nativeBuildInputs = [ setuptools-scm ];
propagatedBuildInputs = [ setuptools amaranth ];
preBuild = ''
export SETUPTOOLS_SCM_PRETEND_VERSION="${realVersion}"
'';
meta = with lib; {
description = "System on Chip toolkit for Amaranth HDL";
homepage = "https://github.com/amaranth-lang/amaranth-soc";
license = licenses.bsd2;
maintainers = with maintainers; [ emily thoughtpolice ];
};
}