push sheeet
Some checks failed
Periodic Merges (6h) / master → staging-nixos (push) Failing after 12m50s
Periodic Merges (6h) / master → staging-next (push) Failing after 12m54s
Periodic Merges (24h) / merge-base(master,staging) → haskell-updates (push) Failing after 11m54s
Periodic Merges (6h) / staging-next → staging (push) Failing after 12m13s
Periodic Merges (24h) / staging-next-25.05 → staging-25.05 (push) Failing after 13m24s
Periodic Merges (24h) / release-25.05 → staging-next-25.05 (push) Failing after 14m28s

This commit is contained in:
Dark Steveneq
2025-10-09 14:15:47 +02:00
commit 646b892680
49168 changed files with 5897842 additions and 0 deletions

View File

@@ -0,0 +1,45 @@
{
stdenv,
lib,
fetchFromGitHub,
pkg-config,
yosys,
readline,
zlib,
bluespec,
}:
stdenv.mkDerivation {
pname = "yosys-bluespec";
version = "2021.09.08";
plugin = "bluespec";
src = fetchFromGitHub {
owner = "thoughtpolice";
repo = "yosys-bluespec";
rev = "f6f4127a4e96e18080fd5362b6769fa3e24c76b1";
sha256 = "sha256-3cNFP/k4JsgLyUQHWU10Htl2Rh0staAcA3R4piD6hDE=";
};
buildInputs = [
yosys
readline
zlib
bluespec
];
nativeBuildInputs = [ pkg-config ];
doCheck = true;
makeFlags = [
"PREFIX=$(out)/share/yosys/plugins"
"STATIC_BSC_PATH=${bluespec}/bin/bsc"
"STATIC_BSC_LIBDIR=${bluespec}/lib"
];
meta = with lib; {
description = "Bluespec plugin for Yosys";
license = licenses.isc;
platforms = platforms.all;
maintainers = with maintainers; [ thoughtpolice ];
};
}

View File

@@ -0,0 +1,47 @@
{
stdenv,
lib,
fetchFromGitHub,
pkg-config,
yosys,
readline,
zlib,
ghdl,
}:
stdenv.mkDerivation {
pname = "yosys-ghdl";
version = "0-unstable-2025-05-23";
plugin = "ghdl";
src = fetchFromGitHub {
owner = "ghdl";
repo = "ghdl-yosys-plugin";
rev = "1b97dc71377cea7e861be6625be4353c377a5fb5";
hash = "sha256-TFMUqIXJzgpnZ8cDlVb47btPqsCNJil0MN4Tdt83140=";
};
buildInputs = [
yosys
readline
zlib
ghdl
];
nativeBuildInputs = [
pkg-config
];
doCheck = true;
installPhase = ''
mkdir -p $out/share/yosys/plugins
cp ghdl.so $out/share/yosys/plugins/ghdl.so
'';
meta = with lib; {
description = "GHDL plugin for Yosys";
homepage = "https://github.com/ghdl/ghdl-yosys-plugin";
license = licenses.isc;
platforms = platforms.all;
maintainers = with maintainers; [ thoughtpolice ];
};
}

View File

@@ -0,0 +1,113 @@
{
fetchFromGitHub,
gtest,
lib,
python3,
readline,
stdenv,
yosys,
zlib,
yosys-symbiflow,
pkg-config,
}:
let
version = "1.20230906";
src = fetchFromGitHub {
owner = "chipsalliance";
repo = "yosys-f4pga-plugins";
rev = "v${version}";
hash = "sha256-XIn5wFw8i2njDN0Arua5BdZ0u1q6a/aJAs48YICehsc=";
};
# Supported symbiflow plugins.
#
# The following are disabled:
#
# "ql-qlf" builds but fails to load the plugin, so is not currently supported.
plugins = [
"design_introspection"
"fasm"
"integrateinv"
"params"
"ql-iob"
# "ql-qlf"
"sdc"
"xdc"
];
static_gtest = gtest.overrideAttrs (old: {
dontDisableStatic = true;
disableHardening = [ "pie" ];
cmakeFlags = old.cmakeFlags ++ [ "-DBUILD_SHARED_LIBS=OFF" ];
});
in
lib.genAttrs plugins (
plugin:
stdenv.mkDerivation rec {
pname = "yosys-symbiflow-${plugin}-plugin";
inherit src version plugin;
enableParallelBuilding = true;
nativeBuildInputs = [
python3
pkg-config
];
buildInputs = [
yosys
readline
zlib
];
# xdc has an incorrect path to a test which has yet to be patched
doCheck = plugin != "xdc";
nativeCheckInputs = [ static_gtest ];
# A Makefile rule tries to wget-fetch a yosys script from github.
# Link the script from our yosys sources in preBuild instead, so that
# the Makefile rule is a no-op.
preBuild = ''
ln -s ${yosys.src}/passes/pmgen/pmgen.py pmgen.py
'';
# Providing a symlink avoids the need for patching the test makefile
postUnpack = ''
mkdir -p source/third_party/googletest/build/
ln -s ${static_gtest}/lib source/third_party/googletest/build/lib
'';
makeFlags = [
"PLUGIN_LIST=${plugin}"
];
buildFlags = [
"YOSYS_PLUGINS_DIR=\${out}/share/yosys/plugins/"
"YOSYS_DATA_DIR=\${out}/share/yosys/"
];
checkTarget = "test";
checkFlags = [
(
"NIX_YOSYS_PLUGIN_DIRS=\${NIX_BUILD_TOP}/source/${plugin}-plugin/build"
# sdc and xdc plugins use design introspection for their tests
+ (lib.optionalString (
plugin == "sdc" || plugin == "xdc"
) ":${yosys-symbiflow.design_introspection}/share/yosys/plugins/")
)
];
installFlags = buildFlags;
meta = with lib; {
description = "Symbiflow ${plugin} plugin for Yosys";
license = licenses.isc;
platforms = platforms.all;
maintainers = with maintainers; [
ollieB
thoughtpolice
];
};
}
)

View File

@@ -0,0 +1,91 @@
{
stdenv,
lib,
fetchFromGitHub,
pkg-config,
antlr4,
capnproto,
readline,
surelog,
uhdm,
yosys,
}:
stdenv.mkDerivation (finalAttrs: {
pname = "yosys-synlig";
plugin = "synlig";
# The module has automatic regular releases, with date + short git hash
GIT_VERSION = "2024-12-10-2d838ed";
# Derive our package version from GIT_VERSION, remove hash, just keep date.
version = builtins.concatStringsSep "-" (lib.take 3 (builtins.splitVersion finalAttrs.GIT_VERSION));
src = fetchFromGitHub {
owner = "chipsalliance";
repo = "synlig";
rev = "${finalAttrs.GIT_VERSION}";
hash = "sha256-MsnRraAqsIkJ2PjBfoSrvUX/RHtL+FV2+iB3i7galLI=";
fetchSubmodules = false; # we use all dependencies from nix
};
nativeBuildInputs = [
pkg-config
];
buildInputs = [
antlr4.runtime.cpp
capnproto
readline
surelog
uhdm
yosys
];
buildPhase = ''
runHook preBuild
# Remove assumptions that submodules are available.
rm -f third_party/Build.*.mk
# Create a stub makefile include that delegates the parameter-gathering
# to yosys-config
cat > third_party/Build.yosys.mk << "EOF"
t := yosys
ts := ''$(call GetTargetStructName,''${t})
''${ts}.src_dir := ''$(shell yosys-config --datdir/include)
''${ts}.mod_dir := ''${TOP_DIR}third_party/yosys_mod/
EOF
make -j $NIX_BUILD_CORES build@systemverilog-plugin \
LDFLAGS="''$(yosys-config --ldflags --ldlibs)"
runHook postBuild
'';
# Check that the plugin can be loaded successfully and parse simple file.
doCheck = true;
checkPhase = ''
runHook preCheck
echo "module litmustest(); endmodule;" > litmustest.sv
yosys -p "plugin -i build/release/systemverilog-plugin/systemverilog.so;\
read_systemverilog litmustest.sv"
runHook postCheck
'';
installPhase = ''
runHook preInstall
mkdir -p $out/share/yosys/plugins
cp ./build/release/systemverilog-plugin/systemverilog.so \
$out/share/yosys/plugins/systemverilog.so
runHook postInstall
'';
meta = with lib; {
description = "SystemVerilog support plugin for Yosys";
homepage = "https://github.com/chipsalliance/synlig";
license = licenses.asl20;
maintainers = with maintainers; [ hzeller ];
platforms = platforms.all;
};
})