Add nix derivation
This commit is contained in:
35
default.nix
Normal file
35
default.nix
Normal file
@@ -0,0 +1,35 @@
|
||||
{ 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";
|
||||
}
|
||||
Reference in New Issue
Block a user