-
Notifications
You must be signed in to change notification settings - Fork 0
/
flake.nix
53 lines (50 loc) · 1.36 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
42
43
44
45
46
47
48
49
50
51
52
53
{
description = "Package and dev environment for the dapla-cli";
inputs = {
flake-parts.url = "github:hercules-ci/flake-parts";
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" "aarch64-darwin" "x86_64-darwin"];
perSystem = {
config,
self',
inputs',
pkgs,
system,
...
}: {
devShells.default = pkgs.mkShell {
name = "dapla-lab";
packages = with pkgs; [
python3
poetry
ruff-lsp
];
};
formatter = pkgs.alejandra;
packages.dapla-cli = let
inherit (poetry2nix.lib.mkPoetry2Nix {inherit pkgs;}) mkPoetryApplication overrides;
in
mkPoetryApplication {
projectDir = ./.;
overrides = overrides.withDefaults (final: prev: {
ruff = prev.ruff.override {preferWheel = true;};
ruamel-yaml-clib = null;
sphinx-click = null;
furo = null;
});
};
packages.default = self'.packages.dapla-cli;
};
};
}