Files
bunbun.dev/flake.nix
2025-01-27 00:00:47 -08:00

28 lines
714 B
Nix

{
inputs = {
nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
flake-utils.url = "github:numtide/flake-utils";
};
outputs = { self, nixpkgs, flake-utils }:
flake-utils.lib.eachDefaultSystem (system:
let pkgs = nixpkgs.legacyPackages.${system};
in with pkgs; {
packages.default = rustPlatform.buildRustPackage {
inherit ((lib.importTOML ./Cargo.toml).package) name;
src = ./.;
cargoLock.lockFile = ./Cargo.lock;
nativeBuildInputs = [ pkg-config ];
};
devShells.default = mkShell {
nativeBuildInputs = [ pkg-config ];
buildInputs = [ rustc cargo wasm-bindgen-cli lld ];
};
});
}