poetry2nix/flake.nix

33 lines
807 B
Nix
Raw Normal View History

2019-11-19 19:33:44 +00:00
{
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.
2019-12-11 13:31:22 +01:00
nixpkgsFor = forAllSystems (
system:
import nixpkgs {
inherit system;
overlays = [ self.overlay ];
}
2019-11-19 19:33:44 +00:00
);
2019-12-11 13:31:22 +01:00
in
{
2019-11-19 19:33:44 +00:00
2019-12-11 13:31:22 +01:00
overlay = import ./overlay.nix;
2019-11-19 19:33:44 +00:00
2019-12-11 13:31:22 +01:00
# TODO: I feel like `packages` is the wrong place for the poetry2nix attr
packages = forAllSystems (
system: {
inherit (nixpkgsFor.${system}) poetry poetry2nix;
}
);
2019-11-19 19:33:44 +00:00
2019-12-11 13:31:22 +01:00
};
2019-11-19 19:33:44 +00:00
}