-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathflake.nix
65 lines (56 loc) · 1.53 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
62
63
64
65
{
# Menu stands for: My Excellent NixOS Utils
description = "Menu, a collection of NixOS utilities.";
inputs =
{
# If you want to use `follows`, make it follow your own unstable input
# for access to nixos-rebuild-ng
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
llakaLib =
{
url = "github:llakala/llakaLib";
inputs.nixpkgs.follows = "nixpkgs";
};
};
outputs = { self, nixpkgs, ... } @ inputs:
let
lib = nixpkgs.lib;
# The "normal" systems. If it ever doesn't work with one of these, or you want me
# to add a system, let me know!
supportedSystems = [ "x86_64-linux" "x86_64-darwin" "aarch64-linux" "aarch64-darwin" ];
forAllSystems = function: lib.genAttrs
supportedSystems
(system: function nixpkgs.legacyPackages.${system});
in
{
legacyPackages = forAllSystems
(
pkgs: let llakaLib = inputs.llakaLib.fullLib.${pkgs.system};
in llakaLib.collectDirectoryPackages
{
inherit pkgs;
directory = ./packages;
extras = { inherit llakaLib; }; # Lets the packages rely on llakaLib
}
);
devShells = forAllSystems
(
pkgs:
{
default = pkgs.mkShellNoCC
{
packages = with self.legacyPackages.${pkgs.system};
[
rbld
unify
fuiska
# Internal dependencies of the other commands, added to the devshell for debugging
hue
fight
revive
];
};
}
);
};
}