36 lines
806 B
Nix
36 lines
806 B
Nix
{ pkgs ? import <nixpkgs> {
|
|
overlays = [
|
|
(import (fetchTarball "https://github.com/oxalica/rust-overlay/archive/master.tar.gz"))
|
|
];
|
|
}
|
|
}:
|
|
with pkgs;
|
|
let
|
|
agent = callPackage "${fetchgit {
|
|
url = "https://gitea.rixxc.de/rixxc/agent_harness.git";
|
|
rev = "d2154ade95b88fe90709cdb12a35da50e0ddb5ee";
|
|
hash = "sha256-low2S2z5vaFSS6ZdDVaxJdwBZk+mjXaG2zhConCWQPQ=";
|
|
}}/default.nix"
|
|
{ inherit pkgs; };
|
|
in
|
|
rustPlatform.buildRustPackage
|
|
{
|
|
name = "wireguard-agent";
|
|
src = nix-gitignore.gitignoreSource [ ] ./.;
|
|
|
|
nativeBuildInputs = [
|
|
(rust-bin.fromRustupToolchainFile ./rust-toolchain.toml)
|
|
agent
|
|
];
|
|
|
|
cargoLock = {
|
|
lockFile = ./Cargo.lock;
|
|
};
|
|
|
|
doCheck = false;
|
|
|
|
AGENT_PATH = "${agent}/bin/agent_harness";
|
|
KEY_FILE = "keyfile";
|
|
RUST_LOG = "debug";
|
|
}
|