forked from nix-community/poetry2nix
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathflake.nix
42 lines (34 loc) · 1002 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
33
34
35
36
37
38
39
40
41
42
{
description = "Poetry2nix flake";
inputs.flake-utils.url = "github:numtide/flake-utils";
inputs.nixpkgs.url = "github:NixOS/nixpkgs";
outputs = { self, nixpkgs, flake-utils }:
rec {
overlay = import ./overlay.nix;
templates = {
app = {
path = ./templates/app;
description = "An example of a NixOS container";
};
};
defaultTemplate = templates.app;
} // (flake-utils.lib.eachDefaultSystem (system:
let
pkgs = import nixpkgs {
inherit system;
overlays = [ self.overlay ];
};
in
rec {
packages = {
inherit (pkgs) poetry;
poetry2nix = pkgs.poetry2nix.cli;
};
defaultPackage = packages.poetry2nix;
apps = {
poetry = flake-utils.lib.mkApp { drv = packages.poetry; };
poetry2nix = flake-utils.lib.mkApp { drv = packages.poetry2nix; };
};
defaultApp = apps.poetry2nix;
}));
}