forked from renlabs-dev/torus-cli
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathflake.nix
45 lines (43 loc) · 1.1 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
{
description = "Torus official CLI / SDK";
inputs = {
nixpkgs.url = "github:NixOS/nixpkgs?ref=nixos-24.11";
flake-utils.url = "github:numtide/flake-utils";
poetry2nix = {
url = "github:nix-community/poetry2nix";
inputs.nixpkgs.follows = "nixpkgs";
};
};
outputs = { self, nixpkgs, flake-utils, poetry2nix }:
flake-utils.lib.eachDefaultSystem (system:
let
pkgs = import nixpkgs {
system = system;
config.allowUnfree = true;
};
p2n = poetry2nix.lib.mkPoetry2Nix {
inherit pkgs;
};
p2n-overrides = import ./nix/poetry2nix-overrides.nix {
inherit pkgs p2n;
};
python = pkgs.python310;
in
{
devShells.default = pkgs.mkShell {
buildInputs = [
python
pkgs.poetry
pkgs.ruff
];
};
packages = rec {
torus = p2n.mkPoetryApplication {
projectDir = ./.;
python = python;
overrides = p2n-overrides;
};
default = torus;
};
});
}