46 lines
1.2 KiB
Nix
46 lines
1.2 KiB
Nix
{
|
|
description = "Doggo flake";
|
|
inputs = {
|
|
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
|
|
crane = {
|
|
url = "github:ipetkov/crane";
|
|
inputs.nixpkgs.follows = "nixpkgs";
|
|
};
|
|
flake-utils.url = "github:numtide/flake-utils";
|
|
rust-overlay = {
|
|
url = "github:oxalica/rust-overlay";
|
|
inputs = {
|
|
nixpkgs.follows = "nixpkgs";
|
|
flake-utils.follows = "flake-utils";
|
|
};
|
|
};
|
|
};
|
|
|
|
outputs = { self, nixpkgs, crane, flake-utils, rust-overlay }:
|
|
flake-utils.lib.eachDefaultSystem (system:
|
|
let
|
|
pkgs = import nixpkgs {
|
|
system = system;
|
|
overlays = [ (import rust-overlay) ];
|
|
};
|
|
|
|
rustToolchain = pkgs.pkgsBuildHost.rust-bin.fromRustupToolchainFile ./rust-toolchain.toml;
|
|
craneLib = crane.lib.${system}.overrideToolchain rustToolchain;
|
|
in {
|
|
packages.default = craneLib.buildPackage {
|
|
src = craneLib.cleanCargoSource ./.;
|
|
|
|
# Add extra inputs here or any other derivation settings
|
|
buildInputs = with pkgs; [
|
|
libxkbcommon
|
|
];
|
|
|
|
nativeBuildInputs = with pkgs; [
|
|
just
|
|
rust-analyzer
|
|
];
|
|
};
|
|
}
|
|
);
|
|
}
|