2026-03-12 14:41:33 +00:00
|
|
|
{
|
|
|
|
|
description = "WEFT OS — capability-secure Wayland compositor and app runtime";
|
|
|
|
|
|
|
|
|
|
inputs = {
|
2026-03-12 20:19:11 +00:00
|
|
|
nixpkgs.url = "github:NixOS/nixpkgs/nixos-25.05";
|
2026-03-12 14:41:33 +00:00
|
|
|
flake-utils.url = "github:numtide/flake-utils";
|
2026-03-12 20:28:14 +00:00
|
|
|
rust-overlay = {
|
|
|
|
|
url = "github:oxalica/rust-overlay";
|
|
|
|
|
inputs.nixpkgs.follows = "nixpkgs";
|
|
|
|
|
};
|
2026-03-12 14:41:33 +00:00
|
|
|
};
|
|
|
|
|
|
2026-03-12 20:28:14 +00:00
|
|
|
outputs = { self, nixpkgs, flake-utils, rust-overlay }:
|
2026-03-12 14:41:33 +00:00
|
|
|
let
|
|
|
|
|
supportedSystems = [ "x86_64-linux" "aarch64-linux" ];
|
|
|
|
|
in
|
|
|
|
|
flake-utils.lib.eachSystem supportedSystems (system:
|
|
|
|
|
let
|
2026-03-12 20:28:14 +00:00
|
|
|
pkgs = import nixpkgs {
|
|
|
|
|
inherit system;
|
|
|
|
|
overlays = [ rust-overlay.overlays.default ];
|
|
|
|
|
};
|
|
|
|
|
rust193 = pkgs.rust-bin.stable."1.93.0".default;
|
|
|
|
|
weftPkgs = pkgs.callPackage ./infra/nixos/weft-packages.nix {
|
|
|
|
|
inherit rust193;
|
|
|
|
|
};
|
2026-03-12 14:41:33 +00:00
|
|
|
in
|
|
|
|
|
{
|
|
|
|
|
packages = weftPkgs // {
|
|
|
|
|
default = weftPkgs.weft-appd;
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
devShells.default = pkgs.mkShell {
|
|
|
|
|
name = "weft-dev";
|
|
|
|
|
nativeBuildInputs = with pkgs; [
|
2026-03-12 20:28:14 +00:00
|
|
|
rust193
|
2026-03-12 14:41:33 +00:00
|
|
|
pkg-config
|
|
|
|
|
cmake
|
|
|
|
|
clang
|
|
|
|
|
python3
|
|
|
|
|
];
|
|
|
|
|
buildInputs = with pkgs; [
|
|
|
|
|
openssl
|
|
|
|
|
libdrm
|
|
|
|
|
mesa
|
|
|
|
|
wayland
|
|
|
|
|
wayland-protocols
|
|
|
|
|
libxkbcommon
|
|
|
|
|
libseat
|
|
|
|
|
udev
|
|
|
|
|
dbus
|
|
|
|
|
libGL
|
|
|
|
|
];
|
|
|
|
|
shellHook = ''
|
|
|
|
|
export LIBCLANG_PATH="${pkgs.libclang.lib}/lib"
|
|
|
|
|
export LD_LIBRARY_PATH="${pkgs.lib.makeLibraryPath [
|
|
|
|
|
pkgs.mesa pkgs.wayland pkgs.libxkbcommon pkgs.libdrm
|
|
|
|
|
]}:$LD_LIBRARY_PATH"
|
|
|
|
|
'';
|
|
|
|
|
};
|
|
|
|
|
}
|
|
|
|
|
) // {
|
|
|
|
|
nixosConfigurations.weft-vm = nixpkgs.lib.nixosSystem {
|
|
|
|
|
system = "x86_64-linux";
|
2026-03-12 20:28:14 +00:00
|
|
|
specialArgs = {
|
|
|
|
|
inherit self;
|
|
|
|
|
rustOverlay = rust-overlay.overlays.default;
|
|
|
|
|
};
|
2026-03-12 14:41:33 +00:00
|
|
|
modules = [
|
|
|
|
|
./infra/nixos/configuration.nix
|
|
|
|
|
];
|
|
|
|
|
};
|
|
|
|
|
};
|
|
|
|
|
}
|