initial commit

Signed-off-by: NotAShelf <raf@notashelf.dev>
Change-Id: Ib131388c1056b6708b730a35011811026a6a6964
This commit is contained in:
raf 2026-02-18 20:13:00 +03:00
commit 033e253259
Signed by: NotAShelf
GPG key ID: 29D95B64378DB4BF
33 changed files with 3126 additions and 0 deletions

29
nix/package.nix Normal file
View file

@ -0,0 +1,29 @@
{
lib,
rustPlatform,
}:
rustPlatform.buildRustPackage (finalAttrs: {
pname = "sample-rust";
version = "0.1.0";
src = let
fs = lib.fileset;
s = ../.;
in
fs.toSource {
root = s;
fileset = fs.unions [
(fs.fileFilter (file: builtins.any file.hasExt ["rs"]) (s + /src))
(s + /Cargo.lock)
(s + /Cargo.toml)
];
};
cargoLock.lockFile = "${finalAttrs.src}/Cargo.lock";
enableParallelBuilding = true;
meta = {
description = "Sample Rust project";
maintainers = with lib.maintainers; [NotAShelf];
};
})

30
nix/shell.nix Normal file
View file

@ -0,0 +1,30 @@
{
mkShell,
rustc,
cargo,
rust-analyzer-unwrapped,
rustfmt,
clippy,
taplo,
rustPlatform,
}:
mkShell {
name = "rust";
strictDeps = true;
packages = [
rustc
cargo
# Tools
rustfmt
clippy
cargo
taplo
# LSP
rust-analyzer-unwrapped
];
RUST_SRC_PATH = "${rustPlatform.rustLibSrc}";
}