Add nix derivation
This commit is contained in:
4
.gitignore
vendored
4
.gitignore
vendored
@@ -1,5 +1,5 @@
|
|||||||
/target
|
/target
|
||||||
**/*.rs.bk
|
**/*.rs.bk
|
||||||
proptest-regressions/
|
proptest-regressions/
|
||||||
Cargo.lock
|
.idea/
|
||||||
.idea/
|
result
|
||||||
|
|||||||
576
Cargo.lock
generated
576
Cargo.lock
generated
File diff suppressed because it is too large
Load Diff
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";
|
||||||
|
}
|
||||||
2
rust-toolchain.toml
Normal file
2
rust-toolchain.toml
Normal file
@@ -0,0 +1,2 @@
|
|||||||
|
[toolchain]
|
||||||
|
channel = "nightly"
|
||||||
Reference in New Issue
Block a user