2024-08-14 09:01:37 +00:00
|
|
|
{
|
|
|
|
inputs = {
|
|
|
|
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
|
|
|
|
nixpkgs-circt162.url = "github:NixOS/nixpkgs/7995cae3ad60e3d6931283d650d7f43d31aaa5c7";
|
|
|
|
nur-xin = {
|
|
|
|
url = "git+https://git.xinyang.life/xin/nur.git";
|
|
|
|
inputs.nixpkgs.follows = "nixpkgs";
|
|
|
|
};
|
|
|
|
flake-utils.url = "github:numtide/flake-utils";
|
|
|
|
sbt-derivation = {
|
|
|
|
url = "github:zaninime/sbt-derivation";
|
|
|
|
inputs.nixpkgs.follows = "nixpkgs";
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
outputs = { self, nixpkgs, flake-utils, nur-xin, nixpkgs-circt162, sbt-derivation }:
|
|
|
|
flake-utils.lib.eachDefaultSystem (system:
|
|
|
|
let
|
|
|
|
pkgs = import nixpkgs {
|
|
|
|
inherit system;
|
|
|
|
config.allowUnfree = true;
|
|
|
|
overlays = [
|
|
|
|
(self: super: {
|
|
|
|
nvboard = nur-xin.legacyPackages.${system}.nvboard;
|
|
|
|
mini-gdbstub = nur-xin.legacyPackages.${system}.mini-gdbstub;
|
|
|
|
})
|
|
|
|
];
|
|
|
|
};
|
|
|
|
in
|
|
|
|
{
|
|
|
|
packages = rec {
|
|
|
|
flow = pkgs.callPackage ./flow.nix {
|
|
|
|
inherit (sbt-derivation.lib) mkSbtDerivation;
|
|
|
|
};
|
|
|
|
|
|
|
|
flow-simlib = pkgs.callPackage ./flow-simlib.nix {
|
|
|
|
inherit flow;
|
|
|
|
};
|
|
|
|
};
|
2024-09-03 03:29:22 +00:00
|
|
|
|
|
|
|
devShells.default = pkgs.mkShell.override { stdenv = pkgs.ccacheStdenv; } {
|
|
|
|
nativeBuildInputs = with pkgs; [
|
|
|
|
cmake
|
|
|
|
ninja
|
|
|
|
flex
|
|
|
|
bison
|
|
|
|
nvboard
|
|
|
|
verilator
|
|
|
|
flow
|
|
|
|
espresso
|
|
|
|
bloop
|
|
|
|
coursier
|
|
|
|
sbt
|
|
|
|
];
|
|
|
|
CHISEL_FIRTOOL_PATH = "${nixpkgs-circt162.legacyPackages.${system}.circt}/bin";
|
|
|
|
|
|
|
|
buildInputs = with pkgs; [
|
|
|
|
cli11
|
|
|
|
spdlog
|
|
|
|
mini-gdbstub
|
|
|
|
];
|
|
|
|
};
|
2024-08-14 09:01:37 +00:00
|
|
|
});
|
|
|
|
}
|