r/o
1
{
2
description = "Pipa Index";
3
4
inputs = {
5
nixpkgs.url = "github:NixOS/nixpkgs/nixos-25.11";
6
flake-parts.url = "github:hercules-ci/flake-parts";
7
flake-root.url = "github:srid/flake-root";
8
fenix = {
9
url = "github:nix-community/fenix";
10
inputs.nixpkgs.follows = "nixpkgs";
11
};
12
};
13
14
outputs =
15
{
16
nixpkgs,
17
fenix,
18
flake-parts,
19
flake-root,
20
...
21
}@inputs:
22
flake-parts.lib.mkFlake { inherit inputs; } (
23
{ withSystem, ... }:
24
{
25
imports = [
26
flake-root.flakeModule
27
];
28
systems = [
29
"aarch64-darwin"
30
"aarch64-linux"
31
"x86_64-darwin"
32
"x86_64-linux"
33
];
34
perSystem =
35
{
36
config,
37
system,
38
pkgs,
39
...
40
}:
41
let
42
callPackage = pkgs.lib.callPackageWith (
43
pkgs
44
// rec {
45
erlang = pkgs.beam_minimal.interpreters.erlang_28;
46
beamPackages = pkgs.beam_minimal.packagesWith erlang;
47
elixir = beamPackages.elixir_1_19;
48
fenixOverlays = fenix.overlays;
49
}
50
);
51
in
52
{
53
_module.args.pkgs = import nixpkgs {
54
inherit system;
55
overlays = [ fenix.overlays.default ];
56
};
57
58
packages = {
59
default = config.packages.pipa;
60
61
pipa = callPackage ./nix/package.nix { };
62
};
63
64
devShells = {
65
default = callPackage ./nix/shell.nix { inherit (config) flake-root; };
66
};
67
};
68
69
flake.darwinModules.pipa =
70
{ pkgs, ... }:
71
{
72
imports = [ ./nix/module.nix ];
73
services.pipa.package = withSystem pkgs.stdenv.hostPlatform.system (
74
{ config, ... }: config.packages.pipa
75
);
76
};
77
78
}
79
);
80
}
81