-
Notifications
You must be signed in to change notification settings - Fork 1
/
flake.nix
41 lines (41 loc) · 1.08 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 = "kup";
inputs = {
nixpkgs.url = "nixpkgs/nixos-22.05";
flake-utils.url = "github:numtide/flake-utils";
poetry2nix.url = "github:nix-community/poetry2nix";
};
outputs = { self, nixpkgs, flake-utils, poetry2nix }:
let
allOverlays = [
poetry2nix.overlay
(final: prev: {
kup = prev.poetry2nix.mkPoetryApplication {
python = prev.python39;
projectDir = ./.;
groups = [];
# We remove `"dev"` from `checkGroups`, so that poetry2nix does not try to resolve dev dependencies.
checkGroups = [];
};
})
];
in flake-utils.lib.eachSystem [
"x86_64-linux"
"x86_64-darwin"
"aarch64-linux"
"aarch64-darwin"
] (system:
let
pkgs = import nixpkgs {
inherit system;
overlays = allOverlays;
};
in rec {
packages = {
inherit (pkgs) kup;
};
defaultPackage = packages.kup;
}) // {
overlay = nixpkgs.lib.composeManyExtensions allOverlays;
};
}