flake
This commit is contained in:
36
flake.nix
Normal file
36
flake.nix
Normal file
@@ -0,0 +1,36 @@
|
||||
{
|
||||
description = "Shibumi Mothership";
|
||||
|
||||
inputs.nixpkgs.url = "github:nixos/nixpkgs?ref=nixos-25.11";
|
||||
inputs.flake-parts.url = "github:hercules-ci/flake-parts";
|
||||
|
||||
outputs = inputs@{flake-parts, ...}:
|
||||
flake-parts.lib.mkFlake { inherit inputs; } {
|
||||
systems = [
|
||||
"x86_64-linux"
|
||||
"x86_64-darwin"
|
||||
"aarch64-darwin"
|
||||
];
|
||||
|
||||
perSystem = {pkgs, ...}:
|
||||
let kube = pkgs.callPackage ./kube.nix {};
|
||||
in {
|
||||
packages.default = kube;
|
||||
packages.kube = kube;
|
||||
|
||||
devShells.default = pkgs.mkShell {
|
||||
name = "kube";
|
||||
inputsFrom = [kube];
|
||||
nativeBuildInputs = with pkgs; [
|
||||
rust-analyzer
|
||||
clippy
|
||||
rustfmt
|
||||
];
|
||||
shellHook = ''
|
||||
export RUST_BACKTRACE=1
|
||||
'';
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
|
||||
19
kube.nix
Normal file
19
kube.nix
Normal file
@@ -0,0 +1,19 @@
|
||||
{
|
||||
rustPlatform,
|
||||
lib
|
||||
}:
|
||||
rustPlatform.buildRustPackage {
|
||||
name = "kube";
|
||||
src = lib.fileset.toSource {
|
||||
root = ./.;
|
||||
fileset = lib.fileset.unions [
|
||||
./src
|
||||
./Cargo.toml
|
||||
./Cargo.lock
|
||||
];
|
||||
};
|
||||
|
||||
cargoLock.lockFile = ./Cargo.lock;
|
||||
auditable = false;
|
||||
meta.mainProgram = "kube";
|
||||
}
|
||||
Reference in New Issue
Block a user