nixpkgs mirror (for testing) github.com/NixOS/nixpkgs
nix
at python-updates 81 lines 1.5 kB view raw
1{ 2 lib, 3 stdenv, 4 fetchFromGitHub, 5 cmake, 6 python3, 7 pkg-config, 8 libuuid, 9 openjdk, 10 gperftools, 11 gtest, 12 uhdm, 13 antlr4, 14 capnproto, 15 nlohmann_json, 16}: 17 18stdenv.mkDerivation (finalAttrs: { 19 pname = "surelog"; 20 version = "1.86"; 21 22 src = fetchFromGitHub { 23 owner = "chipsalliance"; 24 repo = "surelog"; 25 tag = "v${finalAttrs.version}"; 26 hash = "sha256-EEhaYimyzOgQB7dxbbTfsa7APC6SlFkz9ah9BLcKDq4="; 27 fetchSubmodules = false; # we use all dependencies from nix 28 }; 29 30 nativeBuildInputs = [ 31 cmake 32 pkg-config 33 openjdk 34 (python3.withPackages ( 35 p: with p; [ 36 psutil 37 orderedmultidict 38 ] 39 )) 40 gtest 41 antlr4 42 ]; 43 44 buildInputs = [ 45 libuuid 46 gperftools 47 uhdm 48 capnproto 49 antlr4.runtime.cpp 50 nlohmann_json 51 ]; 52 53 cmakeFlags = [ 54 "-DSURELOG_USE_HOST_CAPNP=On" 55 "-DSURELOG_USE_HOST_UHDM=On" 56 "-DSURELOG_USE_HOST_GTEST=On" 57 "-DSURELOG_USE_HOST_ANTLR=On" 58 "-DSURELOG_USE_HOST_JSON=On" 59 "-DANTLR_JAR_LOCATION=${antlr4.jarLocation}" 60 ]; 61 62 doCheck = true; 63 checkPhase = '' 64 runHook preCheck 65 make -j $NIX_BUILD_CORES UnitTests 66 ctest --output-on-failure 67 runHook postCheck 68 ''; 69 70 meta = { 71 description = "SystemVerilog 2017 Pre-processor, Parser, Elaborator, UHDM Compiler"; 72 homepage = "https://github.com/chipsalliance/Surelog"; 73 license = lib.licenses.asl20; 74 mainProgram = "surelog"; 75 maintainers = with lib.maintainers; [ 76 matthuszagh 77 hzeller 78 ]; 79 platforms = lib.platforms.all; 80 }; 81})