-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
sv-bugpoint: added sv-bugpoint package
- Loading branch information
Showing
2 changed files
with
49 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
# SPDX-FileCopyrightText: lowRISC contributors | ||
# SPDX-License-Identifier: MIT | ||
{ | ||
lib, | ||
stdenv, | ||
fetchFromGitHub, | ||
cmake, | ||
ninja, | ||
sv-lang, | ||
fmt_10, | ||
python3, | ||
}: let | ||
rev = "1e078fa961ac5ade9e2506ce63c091b53ad9dbdb"; | ||
in | ||
stdenv.mkDerivation { | ||
pname = "sv-bugpoint"; | ||
# take the first 10 characters of the revision | ||
version = builtins.head (builtins.match "(.{10}).*" rev); | ||
|
||
src = fetchFromGitHub { | ||
owner = "antmicro"; | ||
repo = "sv-bugpoint"; | ||
inherit rev; | ||
hash = "sha256-HGWPtadi+L+cXHSWSPelOv0KOPnkjVGKchRaYfZwwFg="; | ||
}; | ||
|
||
cmakeFlags = [ | ||
"-DFETCHCONTENT_SOURCE_DIR_SLANG=${sv-lang.src.outPath}" | ||
"-DFETCHCONTENT_SOURCE_DIR_FMT=${fmt_10.src.outPath}" | ||
"-DSLANG_USE_MIMALLOC=OFF" | ||
]; | ||
|
||
nativeBuildInputs = [ | ||
cmake | ||
ninja | ||
python3 | ||
sv-lang | ||
]; | ||
|
||
meta = with lib; { | ||
description = "Minimizes SystemVerilog code while preserving a user-defined property of that code."; | ||
homepage = "https://github.com/antmicro/sv-bugpoint"; | ||
license = licenses.asl20; | ||
maintainers = []; | ||
mainProgram = "sv-bugpoint"; | ||
platforms = platforms.all; | ||
}; | ||
} |