nixpkgs mirror (for testing)
github.com/NixOS/nixpkgs
nix
1{
2 lib,
3 stdenv,
4 fetchFromGitHub,
5 cmake,
6 python3,
7 capnproto,
8 gtest,
9}:
10
11stdenv.mkDerivation (finalAttrs: {
12 pname = "uhdm";
13 # When updating this package, also consider updating surelog
14 version = "1.86";
15
16 src = fetchFromGitHub {
17 owner = "chipsalliance";
18 repo = "UHDM";
19 tag = "v${finalAttrs.version}";
20 hash = "sha256-f7QJJEP/jL69DdMJOL5WQdDZU+kBnnLi2eX37AoaXls=";
21 fetchSubmodules = false; # we use all dependencies from nix
22 };
23
24 nativeBuildInputs = [
25 cmake
26 (python3.withPackages (p: with p; [ orderedmultidict ]))
27 gtest
28 ];
29
30 buildInputs = [
31 capnproto
32 ];
33
34 cmakeFlags = [
35 "-DUHDM_USE_HOST_GTEST=On"
36 "-DUHDM_USE_HOST_CAPNP=On"
37 ];
38
39 doCheck = true;
40
41 checkPhase = ''
42 runHook preCheck
43
44 make test
45
46 runHook postCheck
47 '';
48
49 meta = {
50 description = "Universal Hardware Data Model";
51 homepage = "https://github.com/chipsalliance/UHDM";
52 license = lib.licenses.asl20;
53 maintainers = with lib.maintainers; [
54 matthuszagh
55 hzeller
56 ];
57 platforms = lib.platforms.all;
58 };
59})