depot/third_party/nixpkgs/pkgs/applications/virtualization/podman-tui/default.nix
Default email 01ed8ef136 Project import generated by Copybara.
GitOrigin-RevId: 20fc948445a6c22d4e8d5178e9a6bc6e1f5417c8
2022-11-21 19:40:18 +02:00

50 lines
1.1 KiB
Nix

{ lib, stdenv, fetchFromGitHub, buildGoModule, testers, podman-tui }:
buildGoModule rec {
pname = "podman-tui";
version = "0.7.0";
src = fetchFromGitHub {
owner = "containers";
repo = "podman-tui";
rev = "v${version}";
hash = "sha256-UhlhNmVPTOXVWpL4pxF5c6ZQj//pXrzZWlRUaKGSTSA=";
};
vendorHash = null;
CGO_ENABLED = 0;
tags = [ "containers_image_openpgp" "remote" ]
++ lib.optional stdenv.isDarwin "darwin";
ldflags = [ "-s" "-w" ];
preCheck =
let
skippedTests = [
"TestDialogs"
"TestNetdialogs"
];
in
''
export USER=$(whoami)
export HOME=/home/$USER
# Disable flaky tests
buildFlagsArray+=("-run" "[^(${builtins.concatStringsSep "|" skippedTests})]")
'';
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 ];
};
}