2022-11-04 12:27:35 +00:00
|
|
|
{ lib
|
|
|
|
, stdenv
|
|
|
|
, fetchFromGitHub
|
|
|
|
, cmake
|
|
|
|
, python3
|
2023-04-29 16:46:19 +00:00
|
|
|
, capnproto
|
2022-11-21 17:40:18 +00:00
|
|
|
, gtest
|
2022-11-04 12:27:35 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
pname = "UHDM";
|
2023-04-29 16:46:19 +00:00
|
|
|
version = "1.57";
|
2022-11-04 12:27:35 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "chipsalliance";
|
|
|
|
repo = pname;
|
|
|
|
rev = "v${version}";
|
2023-04-29 16:46:19 +00:00
|
|
|
hash = "sha256-z3vURlKXCW5W2naVwJjBXcn94u80JsBxlUOIy9ylsJw=";
|
2022-11-04 12:27:35 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
nativeBuildInputs = [
|
|
|
|
cmake
|
2023-04-29 16:46:19 +00:00
|
|
|
(python3.withPackages (p: with p; [ orderedmultidict ]))
|
|
|
|
gtest
|
2022-11-04 12:27:35 +00:00
|
|
|
];
|
|
|
|
|
|
|
|
buildInputs = [
|
2023-04-29 16:46:19 +00:00
|
|
|
capnproto
|
2022-11-21 17:40:18 +00:00
|
|
|
];
|
|
|
|
|
|
|
|
cmakeFlags = [
|
|
|
|
"-DUHDM_USE_HOST_GTEST=On"
|
2023-04-29 16:46:19 +00:00
|
|
|
"-DUHDM_USE_HOST_CAPNP=On"
|
2022-11-04 12:27:35 +00:00
|
|
|
];
|
|
|
|
|
|
|
|
doCheck = true;
|
|
|
|
checkPhase = "make test";
|
|
|
|
|
|
|
|
meta = {
|
|
|
|
description = "Universal Hardware Data Model";
|
|
|
|
homepage = "https://github.com/chipsalliance/UHDM";
|
|
|
|
license = lib.licenses.asl20;
|
|
|
|
maintainers = with lib.maintainers; [ matthuszagh ];
|
|
|
|
platforms = lib.platforms.all;
|
|
|
|
};
|
|
|
|
}
|