summary refs log tree commit diff
path: root/pkgs/tools
diff options
context:
space:
mode:
authorzowoq <59103226+zowoq@users.noreply.github.com>2022-01-22 17:09:34 +1000
committerzowoq <59103226+zowoq@users.noreply.github.com>2022-02-22 11:34:35 +1000
commit74b10859829153d5c5d50f7c77b86763759e8654 (patch)
tree8860e62f88503c3b2e9e69bb012c5ea9db62bba0 /pkgs/tools
parentd4dc5559857ea6132a557b570809ee7f8edf7c12 (diff)
downloadnixpkgs-74b10859829153d5c5d50f7c77b86763759e8654.tar
nixpkgs-74b10859829153d5c5d50f7c77b86763759e8654.tar.gz
nixpkgs-74b10859829153d5c5d50f7c77b86763759e8654.tar.bz2
nixpkgs-74b10859829153d5c5d50f7c77b86763759e8654.tar.lz
nixpkgs-74b10859829153d5c5d50f7c77b86763759e8654.tar.xz
nixpkgs-74b10859829153d5c5d50f7c77b86763759e8654.tar.zst
nixpkgs-74b10859829153d5c5d50f7c77b86763759e8654.zip
netavark: init at 1.0.0
Diffstat (limited to 'pkgs/tools')
-rw-r--r--pkgs/tools/networking/netavark/default.nix48
1 files changed, 48 insertions, 0 deletions
diff --git a/pkgs/tools/networking/netavark/default.nix b/pkgs/tools/networking/netavark/default.nix
new file mode 100644
index 00000000000..e29acd23dc4
--- /dev/null
+++ b/pkgs/tools/networking/netavark/default.nix
@@ -0,0 +1,48 @@
+{ lib
+, rustPlatform
+, fetchFromGitHub
+, installShellFiles
+, mandown
+}:
+
+rustPlatform.buildRustPackage rec {
+  pname = "netavark";
+  version = "1.0.0";
+
+  src = fetchFromGitHub {
+    owner = "containers";
+    repo = pname;
+    rev = "v${version}";
+    sha256 = "sha256-E3Mdrc8/IwuOOwwVf4LaLrNFzuO95MEvy8BbStQRgoE=";
+  };
+
+  cargoVendorDir = "vendor";
+
+  preBuild = ''
+    substituteInPlace Cargo.toml \
+      --replace 'build = "build.rs"' ""
+
+    rm build.rs
+
+    export \
+      VERGEN_BUILD_SEMVER="${version}" \
+      VERGEN_BUILD_TIMESTAMP="$SOURCE_DATE_EPOCH" \
+      VERGEN_GIT_SHA="${src.rev}" \
+      VERGEN_RUSTC_HOST_TRIPLE=""
+  '';
+
+  nativeBuildInputs = [ installShellFiles mandown ];
+
+  postBuild = ''
+    make -C docs
+    installManPage docs/*.1
+  '';
+
+  meta = with lib; {
+    description = "Rust based network stack for containers";
+    homepage = "https://github.com/containers/netavark";
+    license = licenses.asl20;
+    maintainers = with maintainers; [ ] ++ teams.podman.members;
+    platforms = platforms.linux;
+  };
+}