Skip to content

Commit

Permalink
nix: fix abc
Browse files Browse the repository at this point in the history
  • Loading branch information
widlarizer authored and RCoeurjoly committed May 13, 2024
1 parent badd803 commit 1f9f251
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -12,19 +12,23 @@
pkgs = import nixpkgs {
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 {
name = "yosys";
src = ./. ;
buildInputs = with pkgs; [ clang bison flex libffi tcl readline python3 llvmPackages.libcxxClang zlib git pkg-configUpstream ];
checkInputs = with pkgs; [ gtest ];
propagatedBuildInputs = with pkgs; [ abc-verifier ];
propagatedBuildInputs = [ abc-verifier ];
preConfigure = "make config-clang";
checkTarget = "test";
installPhase = ''
make install PREFIX=$out
make install PREFIX=$out ABCEXTERNAL=yosys-abc
ln -s ${abc-verifier}/bin/abc $out/bin/yosys-abc
'';
buildPhase = ''
make -j$(nproc)
make -j$(nproc) ABCEXTERNAL=yosys-abc
'';
meta = with pkgs.lib; {
description = "Yosys Open SYnthesis Suite";
Expand Down

0 comments on commit 1f9f251

Please sign in to comment.