-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathflake.nix
41 lines (39 loc) · 1.14 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
35
36
37
38
39
40
41
{
description = "A wrapper around cocotb that facilitates using cocotb";
inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/nixpkgs-unstable";
poetry2nix = {
url = "github:nix-community/poetry2nix";
inputs.nixpkgs.follows = "nixpkgs";
};
};
outputs = inputs@{ flake-parts, poetry2nix, ... }:
flake-parts.lib.mkFlake { inherit inputs; } {
systems = [
"x86_64-linux"
"aarch64-linux"
"x86_64-darwin"
"aarch64-darwin"
];
perSystem = { config, pkgs, ... }:
let
inherit (poetry2nix.lib.mkPoetry2Nix { inherit pkgs; }) mkPoetryApplication;
in
{
formatter = pkgs.nixpkgs-fmt;
packages = {
cocotb-wrapper = mkPoetryApplication {
projectDir = ./.;
preferWheels = true;
};
default = config.packages.cocotb-wrapper;
};
devShells = {
default = pkgs.mkShell {
name = "cocotb-wrapper";
packages = with pkgs; [ nodejs poetry poetryPlugins.poetry-plugin-export pre-commit ];
};
};
};
};
}