depot/third_party/nixpkgs/pkgs/applications/virtualization/podman-tui/default.nix
Default email 02cf88bb76 Project import generated by Copybara.
GitOrigin-RevId: c4a0efdd5a728e20791b8d8d2f26f90ac228ee8d
2022-08-12 15:06:08 +03:00

58 lines
1.3 KiB
Nix

{ lib
, stdenv
, pkg-config
, fetchFromGitHub
, fetchpatch
, buildGoModule
, btrfs-progs
, gpgme
, libassuan
, lvm2
, testers
, podman-tui
}:
buildGoModule rec {
pname = "podman-tui";
version = "0.5.0";
src = fetchFromGitHub {
owner = "containers";
repo = "podman-tui";
rev = "v${version}";
sha256 = "sha256-XLC1DqOME9xMF4z+cOPe5H60JnxU9gGaSOQQIofdtj8=";
};
patches = [
# Fix flaky tests. See https://github.com/containers/podman-tui/pull/129.
(fetchpatch {
url = "https://github.com/containers/podman-tui/commit/7fff27e95a3891163da79d86bbc796f29b523f80.patch";
sha256 = "sha256-mETDXoMLq7vb8Qhpz/CmNG1LmY2DTaogI10Qav/qN9Q=";
})
];
vendorSha256 = null;
nativeBuildInputs = [ pkg-config ];
buildInputs = [ gpgme libassuan ]
++ lib.optionals stdenv.isLinux [ btrfs-progs lvm2 ];
ldflags = [ "-s" "-w" ];
preCheck = ''
export HOME=/home/$(whoami)
'';
passthru.tests.version = testers.testVersion {
package = podman-tui;
command = "podman-tui version";
version = "v${version}";
};
meta = with lib; {
homepage = "https://github.com/containers/podman-tui";
description = "Podman Terminal UI";
license = licenses.asl20;
maintainers = with maintainers; [ aaronjheng ];
};
}