-
Notifications
You must be signed in to change notification settings - Fork 2
/
flake.nix
34 lines (32 loc) · 1.07 KB
/
flake.nix
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
# SPDX-License-Identifier: Apache-2.0
# SPDX-FileCopyrightText: 2024 Jiuyang Liu <[email protected]>
{
description = "Chisel Nix";
inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
flake-utils.url = "github:numtide/flake-utils";
};
outputs = inputs@{ self, nixpkgs, flake-utils }:
let overlay = import ./nix/overlay.nix;
in {
# System-independent attr
inherit inputs;
overlays.default = overlay;
} // flake-utils.lib.eachDefaultSystem (system:
let
pkgs = import nixpkgs {
overlays = [ overlay ];
inherit system;
};
in
{
formatter = pkgs.nixpkgs-fmt;
legacyPackages = pkgs;
devShells.default = pkgs.mkShell ({
inputsFrom = [ pkgs.sdram.sdram-compiled pkgs.sdram.tb-dpi-lib ];
nativeBuildInputs = [ pkgs.cargo pkgs.rustfmt pkgs.rust-analyzer pkgs.clippy pkgs.nixfmt-rfc-style pkgs.nixpkgs-fmt ];
RUST_SRC_PATH =
"${pkgs.rust.packages.stable.rustPlatform.rustLibSrc}";
} // pkgs.sdram.tb-dpi-lib.env);
});
}