-
Notifications
You must be signed in to change notification settings - Fork 5
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Added sv-lang version 7.0 and sv-bugpoint #69
Open
HU90m
wants to merge
3
commits into
lowRISC:main
Choose a base branch
from
HU90m:sv-bugpoint
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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}" | ||||||||||
Comment on lines
+28
to
+29
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||||||
"-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; | ||||||||||
}; | ||||||||||
} |
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 | ||||||||
---|---|---|---|---|---|---|---|---|---|---|
|
@@ -6,74 +6,67 @@ | |||||||||
fetchFromGitHub, | ||||||||||
boost182, | ||||||||||
catch2_3, | ||||||||||
fmt_10, | ||||||||||
cmake, | ||||||||||
ninja, | ||||||||||
python3, | ||||||||||
}: let | ||||||||||
fmt = fetchFromGitHub { | ||||||||||
owner = "fmtlib"; | ||||||||||
repo = "fmt"; | ||||||||||
rev = "10.2.1"; | ||||||||||
hash = "sha256-pEltGLAHLZ3xypD/Ur4dWPWJ9BGVXwqQyKcDWVmC3co="; | ||||||||||
}; | ||||||||||
catch2 = fetchFromGitHub { | ||||||||||
owner = "catchorg"; | ||||||||||
repo = "Catch2"; | ||||||||||
rev = "v3.5.3"; | ||||||||||
hash = "sha256-A7vVRHMabm75Udy0fXwsPw4/JkXfjQq/MwmJukdS1Ic="; | ||||||||||
}; | ||||||||||
in | ||||||||||
stdenv.mkDerivation rec { | ||||||||||
pname = "sv-lang"; | ||||||||||
version = "6.0"; | ||||||||||
svLangDerivation = version: hash: | ||||||||||
stdenv.mkDerivation rec { | ||||||||||
pname = "sv-lang"; | ||||||||||
inherit version; | ||||||||||
|
||||||||||
src = fetchFromGitHub { | ||||||||||
owner = "MikePopoloski"; | ||||||||||
repo = "slang"; | ||||||||||
rev = "v${version}"; | ||||||||||
sha256 = "sha256-mT8sfUz0H4jWM/SkV/uW4kmVKE9UQy6XieG65yJvIA8="; | ||||||||||
}; | ||||||||||
src = fetchFromGitHub { | ||||||||||
owner = "MikePopoloski"; | ||||||||||
repo = "slang"; | ||||||||||
rev = "v${version}"; | ||||||||||
inherit hash; | ||||||||||
}; | ||||||||||
|
||||||||||
cmakeFlags = [ | ||||||||||
# fix for https://github.com/NixOS/nixpkgs/issues/144170 | ||||||||||
"-DCMAKE_INSTALL_INCLUDEDIR=include" | ||||||||||
"-DCMAKE_INSTALL_LIBDIR=lib" | ||||||||||
cmakeFlags = [ | ||||||||||
# fix for https://github.com/NixOS/nixpkgs/issues/144170 | ||||||||||
"-DCMAKE_INSTALL_INCLUDEDIR=include" | ||||||||||
"-DCMAKE_INSTALL_LIBDIR=lib" | ||||||||||
|
||||||||||
"-DFETCHCONTENT_SOURCE_DIR_FMT=${fmt}" | ||||||||||
"-DFETCHCONTENT_SOURCE_DIR_CATCH2=${catch2}" | ||||||||||
"-DFETCHCONTENT_SOURCE_DIR_FMT=${fmt_10.src.outPath}" | ||||||||||
"-DFETCHCONTENT_SOURCE_DIR_CATCH2=${catch2_3.src.outPath}" | ||||||||||
Comment on lines
+31
to
+32
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||||||
|
||||||||||
"-DSLANG_INCLUDE_TESTS=${ | ||||||||||
if doCheck | ||||||||||
then "ON" | ||||||||||
else "OFF" | ||||||||||
}" | ||||||||||
"-DSLANG_USE_MIMALLOC=OFF" | ||||||||||
]; | ||||||||||
"-DSLANG_INCLUDE_TESTS=${ | ||||||||||
if doCheck | ||||||||||
then "ON" | ||||||||||
else "OFF" | ||||||||||
}" | ||||||||||
"-DSLANG_USE_MIMALLOC=OFF" | ||||||||||
]; | ||||||||||
|
||||||||||
nativeBuildInputs = [ | ||||||||||
cmake | ||||||||||
python3 | ||||||||||
ninja | ||||||||||
nativeBuildInputs = [ | ||||||||||
cmake | ||||||||||
python3 | ||||||||||
ninja | ||||||||||
|
||||||||||
# though only used in tests, cmake will complain its absence when configuring | ||||||||||
catch2_3 | ||||||||||
]; | ||||||||||
# though only used in tests, cmake will complain its absence when configuring | ||||||||||
catch2_3 | ||||||||||
]; | ||||||||||
|
||||||||||
buildInputs = [ | ||||||||||
boost182 | ||||||||||
]; | ||||||||||
buildInputs = [ | ||||||||||
boost182 | ||||||||||
]; | ||||||||||
|
||||||||||
# TODO: a mysterious linker error occurs when building the unittests on darwin. | ||||||||||
# The error occurs when using catch2_3 in nixpkgs, not when fetching catch2_3 using CMake | ||||||||||
doCheck = !stdenv.isDarwin; | ||||||||||
# TODO: a mysterious linker error occurs when building the unittests on darwin. | ||||||||||
# The error occurs when using catch2_3 in nixpkgs, not when fetching catch2_3 using CMake | ||||||||||
doCheck = !stdenv.isDarwin; | ||||||||||
|
||||||||||
meta = with lib; { | ||||||||||
description = "SystemVerilog compiler and language services"; | ||||||||||
homepage = "https://github.com/MikePopoloski/slang"; | ||||||||||
license = licenses.mit; | ||||||||||
maintainers = with maintainers; [sharzy]; | ||||||||||
mainProgram = "slang"; | ||||||||||
broken = stdenv.isDarwin; | ||||||||||
platforms = platforms.all; | ||||||||||
meta = with lib; { | ||||||||||
description = "SystemVerilog compiler and language services"; | ||||||||||
homepage = "https://github.com/MikePopoloski/slang"; | ||||||||||
license = licenses.mit; | ||||||||||
maintainers = with maintainers; [sharzy]; | ||||||||||
mainProgram = "slang"; | ||||||||||
broken = stdenv.isDarwin; | ||||||||||
platforms = platforms.all; | ||||||||||
}; | ||||||||||
}; | ||||||||||
} | ||||||||||
in { | ||||||||||
sv-lang_6 = svLangDerivation "6.0" "sha256-mT8sfUz0H4jWM/SkV/uW4kmVKE9UQy6XieG65yJvIA8="; | ||||||||||
sv-lang_7 = svLangDerivation "7.0" "sha256-msSc6jw2xbEZfOwtqwFEDIKcwf5SDKp+j15lVbNO98g="; | ||||||||||
} |
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think the latest convention in nixpkgs when a package has no version itself is to use
0-unstable-<DATE>