Add flake.nix

This commit is contained in:
2025-04-15 20:49:16 +02:00
parent f488a08851
commit 6f7b89f2a2
2 changed files with 56 additions and 0 deletions

29
flake.nix Normal file
View File

@@ -0,0 +1,29 @@
{
inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
};
outputs = { self, nixpkgs, ... }: let
forAllSystems = f: (nixpkgs.lib.genAttrs [ "x86_64-linux" "aarch64-linux" ] (system: let
pkgs = import nixpkgs { inherit system; };
in f { inherit pkgs system; } ));
in {
packages = forAllSystems ({pkgs, system, ...}: {
dhcpv6stateless = pkgs.rustPlatform.buildRustPackage rec {
pname = "dhcpv6stateless";
version = "0.1.0";
src = ./.;
cargoLock.lockFile = ./Cargo.lock;
};
default = self.packages."${system}".dhcpv6stateless;
});
hydraJobs = {
inherit (self)
packages;
};
};
}