nixpkgs mirror (for testing)
github.com/NixOS/nixpkgs
nix
1{
2 lib,
3 rustPlatform,
4 fetchFromGitHub,
5 installShellFiles,
6 mandown,
7 protobuf,
8 nixosTests,
9 go-md2man,
10}:
11
12rustPlatform.buildRustPackage rec {
13 pname = "netavark";
14 version = "1.15.2";
15
16 src = fetchFromGitHub {
17 owner = "containers";
18 repo = "netavark";
19 rev = "v${version}";
20 hash = "sha256-sZzbhlrjTuMwOm0+vBMSqHbpqLGhz6jExpBSokqj/VE=";
21 };
22
23 cargoHash = "sha256-ZIFD76GLe44Hx7+/YgBeixsZ+KuYDHBCzMC91R+uTNw=";
24
25 nativeBuildInputs = [
26 installShellFiles
27 mandown
28 protobuf
29 go-md2man
30 ];
31
32 postBuild = ''
33 make -C docs netavark.1
34 installManPage docs/netavark.1
35 '';
36
37 passthru.tests = { inherit (nixosTests) podman; };
38
39 meta = with lib; {
40 changelog = "https://github.com/containers/netavark/releases/tag/${src.rev}";
41 description = "Rust based network stack for containers";
42 homepage = "https://github.com/containers/netavark";
43 license = licenses.asl20;
44 teams = [ teams.podman ];
45 platforms = platforms.linux;
46 };
47}