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
|
|
|
}:
|
|
|
|
|
2023-10-09 19:29:22 +00:00
|
|
|
stdenv.mkDerivation (finalAttrs: {
|
2022-11-04 12:27:35 +00:00
|
|
|
pname = "UHDM";
|
2023-10-19 13:55:26 +00:00
|
|
|
# When updating this package, also consider updating science/logic/surelog
|
2024-04-21 15:54:59 +00:00
|
|
|
version = "1.82";
|
2022-11-04 12:27:35 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "chipsalliance";
|
2023-10-09 19:29:22 +00:00
|
|
|
repo = finalAttrs.pname;
|
|
|
|
rev = "v${finalAttrs.version}";
|
2024-04-21 15:54:59 +00:00
|
|
|
hash = "sha256-sl83l6nLN/bluED5bnFShviD1Vv8hmRazxIcLUg/ego=";
|
2023-10-09 19:29:22 +00:00
|
|
|
fetchSubmodules = false; # we use all dependencies from nix
|
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;
|
|
|
|
};
|
2023-10-09 19:29:22 +00:00
|
|
|
})
|