forked from LadybirdBrowser/ladybird
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathflake.nix
54 lines (49 loc) · 1.39 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
{
description = "Ladybird";
inputs = {
nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
systems.url = "github:nix-systems/default";
};
outputs =
{
self,
systems,
nixpkgs,
...
}:
let
eachSystem = nixpkgs.lib.genAttrs (import systems);
in
{
packages = eachSystem (
system:
let
pkgs = nixpkgs.legacyPackages.${system};
in
{
# Default ladybird package built from source using current directory
# as the source. This is not cached.
ladybird = pkgs.callPackage ./Toolchain/Nix/package.nix { inherit self; };
# Alias for `nix run .` or `nix run github:LadybirdBrowser/ladybird`
default = self.packages.${system}.ladybird;
}
);
devShells = eachSystem (
system:
let
pkgs = nixpkgs.legacyPackages.${system};
in
{
# Override nixpkgs ladybird with the one provided
# by this flake. This will allow inputsFrom to
# remain in-sync with the package provided by the
# flake.
default = pkgs.callPackage ./Toolchain/Nix/shell.nix {
inherit (self.packages.${system}) ladybird;
};
}
);
# Provide a formatter for `nix fmt`
formatter = eachSystem (system: nixpkgs.legacyPackages.${system}.nixfmt-rfc-style);
};
}