nixpkgs-suyu/pkgs/applications/virtualization/podman-tui/default.nix

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

59 lines
1.3 KiB
Nix
Raw Normal View History

2022-02-14 15:55:36 +01:00
{ lib
2022-06-02 08:28:58 +02:00
, stdenv
2022-02-14 15:55:36 +01:00
, pkg-config
, fetchFromGitHub
2022-07-24 07:32:22 +02:00
, fetchpatch
2022-02-14 15:55:36 +01:00
, buildGoModule
, btrfs-progs
, gpgme
2022-03-11 11:36:54 +01:00
, libassuan
2022-02-14 15:55:36 +01:00
, lvm2
, testers
2022-03-11 11:36:54 +01:00
, podman-tui
2022-02-14 15:55:36 +01:00
}:
buildGoModule rec {
pname = "podman-tui";
2022-07-24 07:32:22 +02:00
version = "0.5.0";
2022-02-14 15:55:36 +01:00
src = fetchFromGitHub {
owner = "containers";
repo = "podman-tui";
rev = "v${version}";
2022-07-24 07:32:22 +02:00
sha256 = "sha256-XLC1DqOME9xMF4z+cOPe5H60JnxU9gGaSOQQIofdtj8=";
2022-02-14 15:55:36 +01:00
};
2022-07-24 07:32:22 +02:00
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=";
})
];
2022-02-14 15:55:36 +01:00
vendorSha256 = null;
nativeBuildInputs = [ pkg-config ];
2022-06-02 08:28:58 +02:00
buildInputs = [ gpgme libassuan ]
++ lib.optionals stdenv.isLinux [ btrfs-progs lvm2 ];
2022-02-14 15:55:36 +01:00
ldflags = [ "-s" "-w" ];
2022-07-24 07:32:22 +02:00
preCheck = ''
export HOME=/home/$(whoami)
'';
passthru.tests.version = testers.testVersion {
2022-03-11 11:36:54 +01:00
package = podman-tui;
command = "podman-tui version";
version = "v${version}";
};
2022-02-14 15:55:36 +01:00
meta = with lib; {
homepage = "https://github.com/containers/podman-tui";
description = "Podman Terminal UI";
license = licenses.asl20;
maintainers = with maintainers; [ aaronjheng ];
};
}