refactor: use a more generic flake style
This commit is contained in:
parent
4bdb51968f
commit
d7b77fe5b5
1 changed files with 10 additions and 8 deletions
18
flake.nix
18
flake.nix
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Reference in a new issue