34 lines
921 B
Nix
34 lines
921 B
Nix
{
|
|
description = "Generic Rust Flake";
|
|
inputs = {
|
|
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
|
|
flake-parts = {
|
|
url = "github:hercules-ci/flake-parts";
|
|
inputs.nixpkgs-lib.follows = "nixpkgs";
|
|
};
|
|
};
|
|
|
|
outputs = inputs @ {flake-parts, ...}:
|
|
flake-parts.lib.mkFlake {inherit inputs;} {
|
|
systems = ["x86_64-linux" "aarch64-linux"];
|
|
perSystem = {
|
|
pkgs,
|
|
...
|
|
}: let
|
|
app = pkgs.rustPlatform.buildRustPackage {
|
|
pname = "app";
|
|
version = "0.1.0";
|
|
cargoLock = {
|
|
lockFile = ./Cargo.lock;
|
|
};
|
|
src = ./.;
|
|
};
|
|
in {
|
|
packages = {
|
|
default = app;
|
|
inherit app;
|
|
};
|
|
};
|
|
};
|
|
}
|