yosys: fix plugin module flags and update environment variable (#480381)
This commit is contained in:
@@ -35,9 +35,13 @@ let
|
||||
plugins:
|
||||
let
|
||||
paths = lib.closePropagation plugins;
|
||||
libExt = stdenv.hostPlatform.extensions.sharedLibrary;
|
||||
pluginPath = "$out/share/yosys/plugins";
|
||||
module_flags =
|
||||
with builtins;
|
||||
concatStringsSep " " (map (n: "--add-flags -m --add-flags ${n.plugin}") plugins);
|
||||
concatStringsSep " " (
|
||||
map (n: "--add-flags -m --add-flags ${pluginPath}/${n.plugin}${libExt}") plugins
|
||||
);
|
||||
in
|
||||
lib.appendToName "with-plugins" (symlinkJoin {
|
||||
inherit (yosys) name;
|
||||
@@ -45,7 +49,7 @@ let
|
||||
nativeBuildInputs = [ makeWrapper ];
|
||||
postBuild = ''
|
||||
wrapProgram $out/bin/yosys \
|
||||
--set NIX_YOSYS_PLUGIN_DIRS $out/share/yosys/plugins \
|
||||
--set YOSYS_PATH $out/share/yosys \
|
||||
${module_flags}
|
||||
'';
|
||||
meta.mainProgram = "yosys";
|
||||
|
||||
Reference in New Issue
Block a user