Files
wireguard-rs/default.nix
2024-05-15 09:08:43 +02:00

40 lines
1005 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;
outputHashes = {
"agent_lib-0.1.0" = "sha256-G9PCNDLaJ18pXjoKmdSFOYFT81VJ9GxapOi7EFZMTks=";
"shared_memory_heap-0.1.0" = "sha256-AH+wfAMw5z3lND44feQ11VzoVdaqSGnkvTeIQOFlfXQ=";
};
};
doCheck = false;
AGENT_PATH = "${agent}/bin/agent_harness";
KEY_FILE = "keyfile";
RUST_LOG = "debug";
}