forked from nicoa/koma_archive
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathflake.nix
46 lines (39 loc) · 1.32 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
42
43
44
45
46
# package the pad archiver as a flake for the Nix package manager (https://nixos.org)
{
inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/nixos-23.11";
utils.url = "github:gytis-ivaskevicius/flake-utils-plus";
poetry2nix = {
url = "github:nix-community/poetry2nix";
inputs = {
nixpkgs.follows = "nixpkgs";
flake-utils.follows = "utils/flake-utils";
};
};
};
outputs = { self, nixpkgs, utils, ... }@inputs:
utils.lib.mkFlake {
inherit self inputs;
sharedOverlays =
[ inputs.poetry2nix.overlays.default self.overlays.default ];
overlays = rec {
poetry2nix = inputs.poetry2nix.overlays.default;
koma-archive = (final: prev: {
koma-archive =
final.poetry2nix.mkPoetryApplication { projectDir = ./.; };
});
default = koma-archive;
};
outputsBuilder = channels: {
packages =
let exports = utils.lib.exportPackages self.overlays channels;
in exports // { default = exports.koma-archive; };
devShells.default = let
poetryEnv =
channels.nixpkgs.poetry2nix.mkPoetryEnv { projectDir = ./.; };
in poetryEnv.env.overrideAttrs (oldAttrs: {
buildInputs = [ channels.nixpkgs.poetry channels.nixpkgs.black ];
});
};
};
}