-
-
Notifications
You must be signed in to change notification settings - Fork 11
/
Copy pathflake.nix
69 lines (56 loc) · 1.6 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
66
67
68
69
{
description = "Faster neofetch alternative, written in C";
nixConfig = {
extra-substituters = [ "https://albafetch.cachix.org" ];
extra-trusted-public-keys = [
"albafetch.cachix.org-1:wTFl2hoUXiYlzUp/XA/bfZTP5KqZTToyq0+sfIVseUU="
];
};
inputs = {
nixpkgs.url = "nixpkgs/nixos-unstable";
flake-utils.url = "github:numtide/flake-utils";
};
outputs =
{
self,
nixpkgs,
flake-utils,
}:
flake-utils.lib.eachDefaultSystem (
system:
let
inherit (nixpkgs) lib;
pkgs = nixpkgs.legacyPackages.${system};
callWith = pkgs: (lib.makeScope pkgs.newScope (lib.flip self.overlays.default pkgs)).albafetch;
armPkgs = pkgs.pkgsCross.aarch64-multiplatform;
albafetch-static = callWith pkgs.pkgsStatic;
in
{
devShells.default = pkgs.mkShell {
inputsFrom = [ self.packages.${system}.albafetch ];
};
formatter = pkgs.alejandra;
packages = {
albafetch = callWith pkgs;
default = self.packages.${system}.albafetch;
};
legacyPackages =
{
x86_64-linux = {
albafetch-arm = callWith armPkgs.pkgsStatic;
inherit albafetch-static;
};
aarch64-linux = { inherit albafetch-static; };
x86_64-darwin = {
albafetch-arm = callWith armPkgs;
};
}
.${system} or { };
}
)
// {
overlays.default = final: _: {
albafetch = final.callPackage ./nix/package.nix { inherit self; };
};
};
}