basic file tree buildin

This commit is contained in:
Chance 2025-03-28 02:28:52 -04:00 committed by lily
parent 74faf8fcc9
commit a8e88d9126
Signed by: lily
GPG key ID: 601F3263FBCBC4B9
10 changed files with 462 additions and 36 deletions

53
flake.nix Normal file
View file

@ -0,0 +1,53 @@
{
description = "Kosmora - A space efficient virtual filesystem written in RUst.";
inputs = {
nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
utils.url = "github:numtide/flake-utils";
rust-overlay.url = "github:oxalica/rust-overlay";
flake-compat.url = "https://flakehub.com/f/edolstra/flake-compat/1.tar.gz";
alejandra.url = "github:kamadorueda/alejandra/3.1.0";
alejandra.inputs.nixpkgs.follows = "nixpkgs";
};
outputs = {
self,
nixpkgs,
utils,
rust-overlay,
alejandra,
...
}:
{
overlays.default = final: prev: {
};
}
// utils.lib.eachDefaultSystem (
system: let
pkgs = import nixpkgs {
inherit system;
overlays = [
self.overlays.default
(import rust-overlay)
];
};
buildInputs = with pkgs; [
pkg-config
];
in {
devShells.default = pkgs.mkShell {
name = "kosmora";
nativeBuildInputs = with pkgs; [
rust-bin.stable.latest.default
pkg-config
];
buildInputs = buildInputs;
shellHook = ''
export LD_LIBRARY_PATH="$LD_LIBRARY_PATH:${builtins.toString (pkgs.lib.makeLibraryPath buildInputs)}";
echo "Rust version: $(rustc --version)";
'';
};
formatter = alejandra.packages.${system}.default;
}
);
}