refactor: use a more generic flake style

This commit is contained in:
electria 2026-08-09 10:52:42 -07:00
commit d7b77fe5b5
Signed by: electria
SSH key fingerprint: SHA256:8LlB3ucPbBHqozqkhsNbaV5oG3SlzzqUj8FZDL6IPQs

View file

@ -15,20 +15,22 @@
cargoToml = fromTOML (builtins.readFile ./Cargo.toml);
name = cargoToml.package.name;
nativeBuildInputs = with pkgs; [
m4
];
in
{
packages.default = pkgs.rustPlatform.buildRustPackage {
inherit name nativeBuildInputs;
crate = pkgs.rustPlatform.buildRustPackage {
inherit name;
src = ./.;
cargoLock.lockFile = ./Cargo.lock;
nativeBuildInputs = with pkgs; [
m4
];
};
in
{
packages.default = crate;
devShells.default = pkgs.mkShell {
inherit nativeBuildInputs;
inputsFrom = [ crate ];
packages = with pkgs; [
rustc