sv-lang: 9.1 -> 11.0; sv-lang_9: init at 9.1
Different versions of sv-lang are not compatible, so packages depending on this package need a specific version. The original sv-lang (v9.1) becomes sv-lang_9.
This commit is contained in:
@@ -9,7 +9,7 @@
|
||||
ninja,
|
||||
lit,
|
||||
z3,
|
||||
sv-lang,
|
||||
sv-lang_9, # update sv-lang version here according to upstream requirements
|
||||
fmt,
|
||||
boost,
|
||||
mimalloc,
|
||||
@@ -53,7 +53,7 @@ stdenv.mkDerivation (finalAttrs: {
|
||||
boost
|
||||
fmt
|
||||
mimalloc
|
||||
sv-lang
|
||||
sv-lang_9
|
||||
];
|
||||
|
||||
cmakeFlags = [
|
||||
|
||||
@@ -13,21 +13,15 @@
|
||||
|
||||
stdenv.mkDerivation (finalAttrs: {
|
||||
pname = "sv-lang";
|
||||
version = "9.1";
|
||||
version = "11.0";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "MikePopoloski";
|
||||
repo = "slang";
|
||||
tag = "v${finalAttrs.version}";
|
||||
hash = "sha256-IfRh6F6vA+nFa+diPKD2aMv9kRbvVIY80IqX0d+d5JA=";
|
||||
hash = "sha256-popHzwX0qwv2POAl7/qX3e//OwJRXGtSl9xogpSn2LI=";
|
||||
};
|
||||
|
||||
postPatch = ''
|
||||
substituteInPlace external/CMakeLists.txt --replace-fail \
|
||||
'set(mimalloc_min_version "2.2")' \
|
||||
'set(mimalloc_min_version "${lib.versions.majorMinor mimalloc.version}")'
|
||||
'';
|
||||
|
||||
cmakeFlags = [
|
||||
# fix for https://github.com/NixOS/nixpkgs/issues/144170
|
||||
"-DCMAKE_INSTALL_INCLUDEDIR=include"
|
||||
@@ -36,6 +30,8 @@ stdenv.mkDerivation (finalAttrs: {
|
||||
"-DSLANG_INCLUDE_TESTS=${if finalAttrs.finalPackage.doCheck then "ON" else "OFF"}"
|
||||
];
|
||||
|
||||
__structuredAttrs = true;
|
||||
|
||||
nativeBuildInputs = [
|
||||
cmake
|
||||
python3
|
||||
|
||||
@@ -0,0 +1,70 @@
|
||||
{
|
||||
lib,
|
||||
stdenv,
|
||||
fetchFromGitHub,
|
||||
boost,
|
||||
catch2_3,
|
||||
cmake,
|
||||
ninja,
|
||||
fmt,
|
||||
mimalloc,
|
||||
python3,
|
||||
}:
|
||||
|
||||
stdenv.mkDerivation (finalAttrs: {
|
||||
pname = "sv-lang";
|
||||
version = "9.1";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "MikePopoloski";
|
||||
repo = "slang";
|
||||
tag = "v${finalAttrs.version}";
|
||||
hash = "sha256-IfRh6F6vA+nFa+diPKD2aMv9kRbvVIY80IqX0d+d5JA=";
|
||||
};
|
||||
|
||||
postPatch = ''
|
||||
substituteInPlace external/CMakeLists.txt --replace-fail \
|
||||
'set(mimalloc_min_version "2.2")' \
|
||||
'set(mimalloc_min_version "${lib.versions.majorMinor mimalloc.version}")'
|
||||
'';
|
||||
|
||||
cmakeFlags = [
|
||||
# fix for https://github.com/NixOS/nixpkgs/issues/144170
|
||||
"-DCMAKE_INSTALL_INCLUDEDIR=include"
|
||||
"-DCMAKE_INSTALL_LIBDIR=lib"
|
||||
|
||||
"-DSLANG_INCLUDE_TESTS=${if finalAttrs.finalPackage.doCheck then "ON" else "OFF"}"
|
||||
];
|
||||
|
||||
__structuredAttrs = true;
|
||||
|
||||
nativeBuildInputs = [
|
||||
cmake
|
||||
python3
|
||||
ninja
|
||||
];
|
||||
|
||||
strictDeps = true;
|
||||
|
||||
buildInputs = [
|
||||
boost
|
||||
fmt
|
||||
mimalloc
|
||||
# though only used in tests, cmake will complain its absence when configuring
|
||||
catch2_3
|
||||
];
|
||||
|
||||
# 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.hostPlatform.isDarwin;
|
||||
|
||||
meta = {
|
||||
description = "SystemVerilog compiler and language services";
|
||||
homepage = "https://github.com/MikePopoloski/slang";
|
||||
license = lib.licenses.mit;
|
||||
maintainers = with lib.maintainers; [ sharzy ];
|
||||
mainProgram = "slang";
|
||||
platforms = lib.platforms.all;
|
||||
broken = stdenv.hostPlatform.isDarwin;
|
||||
};
|
||||
})
|
||||
@@ -10,7 +10,7 @@
|
||||
boost,
|
||||
fmt,
|
||||
openssl,
|
||||
sv-lang,
|
||||
sv-lang_9, # update sv-lang version here according to upstream requirements
|
||||
mimalloc,
|
||||
|
||||
verible,
|
||||
@@ -43,7 +43,7 @@ rustPlatform.buildRustPackage {
|
||||
boost
|
||||
fmt
|
||||
openssl
|
||||
sv-lang
|
||||
sv-lang_9
|
||||
mimalloc
|
||||
];
|
||||
|
||||
@@ -69,7 +69,7 @@ rustPlatform.buildRustPackage {
|
||||
OPENSSL_NO_VENDOR = "1";
|
||||
RUSTFLAGS = "-C link-args=-lmimalloc";
|
||||
# this is needed so that veridian doesn't try to build the sv-lang package itself
|
||||
SLANG_INSTALL_PATH = sv-lang;
|
||||
SLANG_INSTALL_PATH = sv-lang_9;
|
||||
};
|
||||
|
||||
passthru = {
|
||||
|
||||
Reference in New Issue
Block a user