mirror of
https://github.com/NotAShelf/stash.git
synced 2026-04-13 14:33:47 +00:00
initial commit
Signed-off-by: NotAShelf <raf@notashelf.dev> Change-Id: I6a6a69646c6d8861791ac018543ebd16619a53d3
This commit is contained in:
commit
5687d2d6cd
6 changed files with 104 additions and 0 deletions
30
nix/package.nix
Normal file
30
nix/package.nix
Normal file
|
|
@ -0,0 +1,30 @@
|
|||
{
|
||||
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";
|
||||
useFetchCargoVendor = true;
|
||||
enableParallelBuilding = true;
|
||||
|
||||
meta = {
|
||||
description = "Experimental nftables ruleset formatter and prettier";
|
||||
maintainers = with lib.licenses; [NotAShelf];
|
||||
};
|
||||
})
|
||||
19
nix/shell.nix
Normal file
19
nix/shell.nix
Normal file
|
|
@ -0,0 +1,19 @@
|
|||
{
|
||||
mkShell,
|
||||
rust-analyzer,
|
||||
rustfmt,
|
||||
clippy,
|
||||
cargo,
|
||||
rustPlatform,
|
||||
}:
|
||||
mkShell {
|
||||
name = "rust";
|
||||
packages = [
|
||||
rust-analyzer
|
||||
rustfmt
|
||||
clippy
|
||||
cargo
|
||||
];
|
||||
|
||||
RUST_SRC_PATH = "${rustPlatform.rustLibSrc}";
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue