forked from nix-community/poetry2nix
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathflake.nix
32 lines (26 loc) · 807 Bytes
/
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
{
description = "Poetry2nix flake";
edition = 201909;
outputs = { self, nixpkgs }: let
# TODO: There must be a better way to provide arch-agnostic flakes..
systems = [ "x86_64-linux" "i686-linux" "x86_64-darwin" "aarch64-linux" ];
forAllSystems = f: nixpkgs.lib.genAttrs systems (system: f system);
# Memoize nixpkgs for different platforms for efficiency.
nixpkgsFor = forAllSystems (
system:
import nixpkgs {
inherit system;
overlays = [ self.overlay ];
}
);
in
{
overlay = import ./overlay.nix;
# TODO: I feel like `packages` is the wrong place for the poetry2nix attr
packages = forAllSystems (
system: {
inherit (nixpkgsFor.${system}) poetry poetry2nix;
}
);
};
}