-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathflake.nix
61 lines (58 loc) · 1.55 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
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
{
description = "My open flakes";
inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
flake-utils.url = "github:numtide/flake-utils";
};
nixConfig = {
extra-substituters = [ "https://aur3l14no.cachix.org" ];
extra-trusted-public-keys = [
"aur3l14no.cachix.org-1:jxuBM4n3aEvFMkxO1I/LqmAIExoXIkNzAj6tZAd6oC4="
];
};
outputs =
{
self,
nixpkgs,
flake-utils,
...
}@inputs:
flake-utils.lib.eachSystem
[
"x86_64-linux"
"aarch64-linux"
"aarch64-darwin"
]
(
system:
let
pkgs = import nixpkgs {
inherit system;
overlays = [
(final: prev: {
myLib = import ./lib final;
})
];
};
sing-box-packages-dot = (pkgs.myLib.callPackageVariants ./pkgs/sing-box { }) // {
sing-box = pkgs.callPackage ./pkgs/sing-box/default.nix { };
};
sing-box-packages-underscore = pkgs.lib.mapAttrs' (name: value: {
name = builtins.replaceStrings [ "." ] [ "_" ] name;
value = value;
}) sing-box-packages-dot;
in
{
packages = sing-box-packages-underscore // sing-box-packages-dot;
formatter = pkgs.nixfmt-rfc-style;
devShell = pkgs.mkShellNoCC {
packages = with pkgs; [
act
jq
nix-update
(python3.withPackages (ps: with ps; [ httpx ]))
];
};
}
);
}