depot/third_party/nixpkgs/pkgs/applications/science/logic/uhdm/default.nix
Default email 1be0098156 Project import generated by Copybara.
GitOrigin-RevId: 667e5581d16745bcda791300ae7e2d73f49fff25
2022-11-04 13:27:35 +01:00

49 lines
971 B
Nix

{ lib
, stdenv
, fetchFromGitHub
, cmake
, python3
}:
stdenv.mkDerivation rec {
pname = "UHDM";
version = "0.9.1.40";
src = fetchFromGitHub {
owner = "chipsalliance";
repo = pname;
rev = "v${version}";
hash = "sha256-CliKU2WM8B9012aDcS/mTyIf+JcsVsc4uRRi9+FRWbM=";
fetchSubmodules = true;
};
nativeBuildInputs = [
cmake
];
buildInputs = [
(python3.withPackages (p: with p; [ orderedmultidict ]))
];
doCheck = true;
checkPhase = "make test";
postInstall = ''
mv $out/lib/uhdm/* $out/lib/
rm -rf $out/lib/uhdm
'';
prePatch = ''
substituteInPlace CMakeLists.txt --replace \
'capnp compile' \
'capnp compile --src-prefix=''${GENDIR}/..'
'';
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;
};
}