generated from GarandPLG/rust-flake-template
3813eaabb3
Introduce a `--debug` option and an `Init` subcommand to the CLI. Add a new `config` module with loader and schema types for reading and creating a default `veil.yaml` (supporting a local debug config path). Update `.gitignore`, `default.nix`, and `flake.nix` comments to reference the templates directory. Provide an example configuration template and integrate it into the application’s entry point.
84 lines
2.0 KiB
Nix
84 lines
2.0 KiB
Nix
{
|
|
description = "Declarative Tauri wrapper";
|
|
|
|
inputs = {
|
|
nixpkgs.url = "github:nixos/nixpkgs?ref=nixos-unstable";
|
|
|
|
fenix = {
|
|
url = "github:nix-community/fenix";
|
|
inputs.nixpkgs.follows = "nixpkgs";
|
|
};
|
|
|
|
naersk = {
|
|
url = "github:nix-community/naersk";
|
|
inputs = {
|
|
nixpkgs.follows = "nixpkgs";
|
|
fenix.follows = "fenix";
|
|
};
|
|
};
|
|
};
|
|
|
|
outputs = {
|
|
self,
|
|
nixpkgs,
|
|
naersk,
|
|
fenix,
|
|
}: let
|
|
system = "x86_64-linux";
|
|
pkgs = nixpkgs.legacyPackages.${system};
|
|
|
|
rustToolchain = fenix.packages.${system}.stable.toolchain;
|
|
naerskLib = pkgs.callPackage naersk {
|
|
cargo = rustToolchain;
|
|
rustc = rustToolchain;
|
|
};
|
|
|
|
cargoToml = fromTOML (builtins.readFile ./Cargo.toml);
|
|
packageVersion = cargoToml.package.version;
|
|
in {
|
|
packages.${system} = {
|
|
default = pkgs.callPackage ./default.nix {};
|
|
|
|
develop = naerskLib.buildPackage {
|
|
name = "veil-rs";
|
|
|
|
src = ./.;
|
|
|
|
# buildInputs = with pkgs; [];
|
|
|
|
nativeBuildInputs = with pkgs; [pkg-config];
|
|
|
|
# postInstall = ''
|
|
# cp -r templates $out/bin
|
|
# '';
|
|
};
|
|
};
|
|
|
|
devShells.${system}.default = pkgs.mkShell {
|
|
env = {
|
|
RUST_SRC_PATH = "${pkgs.rust.packages.stable.rustPlatform.rustLibSrc}";
|
|
# LD_LIBRARY_PATH = pkgs.lib.makeLibraryPath (with pkgs; []);
|
|
};
|
|
|
|
buildInputs = [
|
|
rustToolchain
|
|
];
|
|
|
|
nativeBuildInputs = with pkgs; [pkg-config];
|
|
|
|
shellHook = ''
|
|
echo "Veil.rs v${packageVersion}"
|
|
echo ""
|
|
echo "Commands:"
|
|
echo " nix update flake - Update flakes versions"
|
|
echo " nix build - Build production version"
|
|
echo " nix run - Run production version"
|
|
echo " nix build .#develop - Build development version"
|
|
echo " nix run .#develop - Run development version"
|
|
echo ""
|
|
cargo run -- -h
|
|
'';
|
|
};
|
|
};
|
|
}
|