2022-04-27 22:25:32 +02:00
|
|
|
{
|
2022-06-10 21:53:06 +02:00
|
|
|
description = "Build OpenWRT images in Nix derivations";
|
2022-04-27 22:25:32 +02:00
|
|
|
|
2022-06-23 03:32:09 +02:00
|
|
|
outputs = { self, nixpkgs }@inputs:
|
|
|
|
let pkgs' = nixpkgs.legacyPackages.x86_64-linux;
|
|
|
|
in {
|
2022-04-28 02:38:30 +02:00
|
|
|
|
2022-06-23 03:32:09 +02:00
|
|
|
lib = {
|
|
|
|
build = { pkgs ? pkgs', ... }@args:
|
|
|
|
import ./builder.nix (args // { inherit pkgs; });
|
|
|
|
|
|
|
|
profiles = { pkgs ? pkgs', release ? "21.02.3", ... }@args:
|
|
|
|
import ./profiles.nix (args // { inherit pkgs release; });
|
2022-04-27 22:25:32 +02:00
|
|
|
|
2022-06-23 03:32:09 +02:00
|
|
|
openwrtSystem = import ./lib/openwrt-system.nix;
|
2022-04-29 00:03:47 +02:00
|
|
|
};
|
2022-04-27 22:29:58 +02:00
|
|
|
|
2022-06-23 03:32:09 +02:00
|
|
|
packages.x86_64-linux.profiles-list = import ./profiles-list.nix {
|
|
|
|
pkgs = pkgs';
|
|
|
|
};
|
2022-04-27 22:29:58 +02:00
|
|
|
|
2022-06-23 03:32:09 +02:00
|
|
|
# `nix run .#generate-hashes`
|
|
|
|
packages.x86_64-linux.generate-hashes = import ./generate-hashes.nix {
|
|
|
|
pkgs = pkgs';
|
|
|
|
};
|
|
|
|
|
|
|
|
packages.x86_64-linux.example-image = self.lib.openwrtSystem {
|
|
|
|
pkgs = pkgs';
|
|
|
|
modules = [ ./example.nix ];
|
|
|
|
};
|
|
|
|
|
|
|
|
checks = self.packages;
|
|
|
|
|
|
|
|
hydraJobs = {
|
|
|
|
example-image =
|
|
|
|
nixpkgs.lib.hydraJob self.packages.x86_64-linux.example-image;
|
|
|
|
};
|
2022-04-27 22:29:58 +02:00
|
|
|
};
|
2022-04-27 22:25:32 +02:00
|
|
|
}
|