-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathflake.nix
32 lines (30 loc) · 1.04 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
{
inputs.nixpkgs.url = "github:NixOS/nixpkgs/nixpkgs-unstable";
inputs.poetry2nix.url = "github:nix-community/poetry2nix";
outputs = { self, nixpkgs, poetry2nix }:
let
supportedSystems = [ "x86_64-linux" "x86_64-darwin" "aarch64-linux" "aarch64-darwin" ];
forAllSystems = nixpkgs.lib.genAttrs supportedSystems;
pkgs = forAllSystems (system: nixpkgs.legacyPackages.${system});
in
{
packages = forAllSystems (system: let
inherit (poetry2nix.lib.mkPoetry2Nix { pkgs = pkgs.${system}; }) mkPoetryApplication;
in {
default = mkPoetryApplication { projectDir = self; preferWheels = false; };
});
devShells = forAllSystems (system: let
inherit (poetry2nix.lib.mkPoetry2Nix {
pkgs = pkgs.${system};
}) mkPoetryEnv;
in {
default = pkgs.${system}.mkShellNoCC {
packages = with pkgs.${system}; [
(mkPoetryEnv { projectDir = self; preferWheels = true; })
poetry
sqlite
];
};
});
};
}