mirror of
https://github.com/YosysHQ/yosys
synced 2025-07-24 05:08:56 +00:00
Add nix flake and lock file. Add nix build step. Pending nix flake update step
This commit is contained in:
parent
bdce7fac66
commit
1c89e2ab92
3 changed files with 118 additions and 0 deletions
44
flake.nix
Normal file
44
flake.nix
Normal file
|
@ -0,0 +1,44 @@
|
|||
{
|
||||
description = "A nix flake for the Yosys synthesis suite";
|
||||
|
||||
inputs = {
|
||||
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
|
||||
flake-utils.url = "github:numtide/flake-utils";
|
||||
};
|
||||
|
||||
outputs = { self, nixpkgs, flake-utils }:
|
||||
flake-utils.lib.eachDefaultSystem (system:
|
||||
let
|
||||
pkgs = import nixpkgs {
|
||||
inherit system;
|
||||
};
|
||||
customYosys = pkgs.clangStdenv.mkDerivation {
|
||||
name = "yosys";
|
||||
src = ./. ;
|
||||
buildInputs = with pkgs; [ clang bison flex libffi tcl readline python3 llvmPackages.libcxxClang zlib git ];
|
||||
checkInputs = with pkgs; [ gtest ];
|
||||
propagatedBuildInputs = with pkgs; [ abc-verifier ];
|
||||
preConfigure = "make config-clang";
|
||||
checkTarget = "test";
|
||||
installPhase = ''
|
||||
make install PREFIX=$out
|
||||
'';
|
||||
buildPhase = ''
|
||||
make -j$(nproc)
|
||||
'';
|
||||
meta = with pkgs.lib; {
|
||||
description = "Yosys Open SYnthesis Suite";
|
||||
homepage = "https://yosyshq.net/yosys/";
|
||||
license = licenses.isc;
|
||||
maintainers = with maintainers; [ ];
|
||||
};
|
||||
};
|
||||
in {
|
||||
packages.default = customYosys;
|
||||
defaultPackage = customYosys;
|
||||
devShell = pkgs.mkShell {
|
||||
buildInputs = with pkgs; [ clang bison flex libffi tcl readline python3 llvmPackages.libcxxClang zlib git gtest abc-verifier ];
|
||||
};
|
||||
}
|
||||
);
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue