Add flake.nix
This commit is contained in:
29
flake.nix
Normal file
29
flake.nix
Normal 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;
|
||||
};
|
||||
};
|
||||
}
|
||||
|
Reference in New Issue
Block a user