clan-sidebus/flake.nix
Else Someone cbce1ae3a2 default.nix: init
Move recipes from flake.nix:s `packages` to a `callPackage`-able scope.nix.
This way out-of-tree projects can reuse the `buildRustPackage`
definitions (e.g. the in-sync `cargoLock` hashes) without depending on
the unsupported flakes feature.
2026-03-21 02:03:02 +02:00

44 lines
1 KiB
Nix

{
inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
flake-parts.url = "github:hercules-ci/flake-parts";
flake-parts.inputs.nixpkgs-lib.follows = "nixpkgs";
flake-compat = {
url = "https://git.lix.systems/lix-project/flake-compat/archive/main.tar.gz";
flake = false;
};
};
outputs =
inputs@{ flake-parts, ... }:
flake-parts.lib.mkFlake { inherit inputs; } {
systems = [
"x86_64-linux"
"aarch64-linux"
];
perSystem =
{ pkgs, ... }:
let
scope = pkgs.callPackage ./scope.nix { };
in
{
devShells.default = pkgs.mkShell {
buildInputs = with pkgs; [
cargo
rustc
rust-analyzer
clippy
];
env = scope.buildEnvVars;
};
packages = {
inherit (scope) sidebus-agent sidebus-broker;
};
};
flake = {
nixosModules.sidebus-vm = ./nixosModules/sidebus-vm.nix;
};
};
}