Skip to content

Commit

Permalink
sv-bugpoint: added sv-bugpoint package
Browse files Browse the repository at this point in the history
  • Loading branch information
HU90m committed Nov 22, 2024
1 parent 7ed8b4b commit b947dd4
Show file tree
Hide file tree
Showing 2 changed files with 49 additions and 0 deletions.
1 change: 1 addition & 0 deletions pkgs/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@
uf2conv = pkgs.callPackage ./uf2conv.nix {};

inherit (pkgs.callPackage ./sv-lang.nix {}) sv-lang_6 sv-lang_7;
sv-bugpoint = pkgs.callPackage ./sv-bugpoint.nix {sv-lang = sv-lang_7;};
veridian = pkgs.callPackage ./veridian/default.nix {inherit sv-lang_6;};
peakrdl = pkgs.callPackage ./peakrdl.nix {};

Expand Down
48 changes: 48 additions & 0 deletions pkgs/sv-bugpoint.nix
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;
};
}

0 comments on commit b947dd4

Please sign in to comment.