add nix flake

This commit is contained in:
xunuwu 2025-06-19 01:52:29 +02:00
parent 331d63a6cb
commit 20693cdf66
Signed by: xun
SSH key fingerprint: SHA256:Uot/1WoAjWAeqLOHA5vYy4phhVydsH7jCPmBjaPZfgI
2 changed files with 100 additions and 0 deletions

23
flake.nix Normal file
View file

@ -0,0 +1,23 @@
{
inputs = {
nixpkgs.url = "github:nixos/nixpkgs/nixos-25.05";
flake-utils.url = "github:numtide/flake-utils";
crane.url = "github:ipetkov/crane";
};
outputs = {
nixpkgs,
crane,
flake-utils,
...
}:
flake-utils.lib.eachDefaultSystem (system: let
pkgs = import nixpkgs {inherit system;};
craneLib = crane.mkLib pkgs;
in {
packages.default = craneLib.buildPackage {
pname = "crosshair-overlay";
src = craneLib.cleanCargoSource ./.;
};
});
}