mirror of
https://github.com/YosysHQ/yosys
synced 2025-04-06 01:24:10 +00:00
nix: fix abc
This commit is contained in:
parent
badd803beb
commit
1f9f2518fc
10
flake.nix
10
flake.nix
|
@ -12,19 +12,23 @@
|
||||||
pkgs = import nixpkgs {
|
pkgs = import nixpkgs {
|
||||||
inherit system;
|
inherit system;
|
||||||
};
|
};
|
||||||
|
# TODO: don't override src when ./abc is empty
|
||||||
|
# which happens when the command used is `nix build` and not `nix build ?submodules=1`
|
||||||
|
abc-verifier = pkgs.abc-verifier.overrideAttrs(x: y: {src = ./abc;});
|
||||||
customYosys = pkgs.clangStdenv.mkDerivation {
|
customYosys = pkgs.clangStdenv.mkDerivation {
|
||||||
name = "yosys";
|
name = "yosys";
|
||||||
src = ./. ;
|
src = ./. ;
|
||||||
buildInputs = with pkgs; [ clang bison flex libffi tcl readline python3 llvmPackages.libcxxClang zlib git pkg-configUpstream ];
|
buildInputs = with pkgs; [ clang bison flex libffi tcl readline python3 llvmPackages.libcxxClang zlib git pkg-configUpstream ];
|
||||||
checkInputs = with pkgs; [ gtest ];
|
checkInputs = with pkgs; [ gtest ];
|
||||||
propagatedBuildInputs = with pkgs; [ abc-verifier ];
|
propagatedBuildInputs = [ abc-verifier ];
|
||||||
preConfigure = "make config-clang";
|
preConfigure = "make config-clang";
|
||||||
checkTarget = "test";
|
checkTarget = "test";
|
||||||
installPhase = ''
|
installPhase = ''
|
||||||
make install PREFIX=$out
|
make install PREFIX=$out ABCEXTERNAL=yosys-abc
|
||||||
|
ln -s ${abc-verifier}/bin/abc $out/bin/yosys-abc
|
||||||
'';
|
'';
|
||||||
buildPhase = ''
|
buildPhase = ''
|
||||||
make -j$(nproc)
|
make -j$(nproc) ABCEXTERNAL=yosys-abc
|
||||||
'';
|
'';
|
||||||
meta = with pkgs.lib; {
|
meta = with pkgs.lib; {
|
||||||
description = "Yosys Open SYnthesis Suite";
|
description = "Yosys Open SYnthesis Suite";
|
||||||
|
|
Loading…
Reference in a new issue