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 science/logic/surelog
14 version = "1.84-unstable-2024-11-12";
15
16 src = fetchFromGitHub {
17 owner = "chipsalliance";
18 repo = "UHDM";
19 # After we're back on a stable tag, use v${finalAttrs.version}
20 rev = "7d90dd0e68759775d0c86885d991925096b5b496";
21 hash = "sha256-msdtBAlOXwYJd0HhWmVo8oMJ6h8OUmy0ILxV1MV52PE=";
22 fetchSubmodules = false; # we use all dependencies from nix
23 };
24
25 nativeBuildInputs = [
26 cmake
27 (python3.withPackages (p: with p; [ orderedmultidict ]))
28 gtest
29 ];
30
31 buildInputs = [
32 capnproto
33 ];
34
35 cmakeFlags = [
36 "-DUHDM_USE_HOST_GTEST=On"
37 "-DUHDM_USE_HOST_CAPNP=On"
38 ];
39
40 doCheck = true;
41 checkPhase = "make test";
42
43 meta = {
44 description = "Universal Hardware Data Model";
45 homepage = "https://github.com/chipsalliance/UHDM";
46 license = lib.licenses.asl20;
47 maintainers = with lib.maintainers; [
48 matthuszagh
49 hzeller
50 ];
51 platforms = lib.platforms.all;
52 };
53})