python313Packages.traits: fix build (#373698)
[NixPkgs.git] / pkgs / by-name / po / podman-tui / package.nix
blobcba37b04c3be1f71704ab62856440b4137a9ceaa
1 { lib, stdenv, fetchFromGitHub, buildGoModule, testers, podman-tui }:
3 buildGoModule rec {
4   pname = "podman-tui";
5   version = "1.3.0";
7   src = fetchFromGitHub {
8     owner = "containers";
9     repo = "podman-tui";
10     rev = "v${version}";
11     hash = "sha256-3AgPt7dRZaHrM4/y35Z5elBFq1b2ZhvwBd4CKNBbgTk=";
12   };
14   vendorHash = null;
16   env.CGO_ENABLED = 0;
18   tags = [ "containers_image_openpgp" "remote" ]
19     ++ lib.optional stdenv.hostPlatform.isDarwin "darwin";
21   ldflags = [ "-s" "-w" ];
23   preCheck = ''
24     export USER="$(whoami)"
25     export HOME="$(mktemp -d)"
26   '';
28   checkFlags =
29     let
30       skippedTests = [
31         # Disable flaky tests
32         "TestDialogs"
33         "TestVoldialogs"
34       ];
35     in
36     [ "-skip=^${builtins.concatStringsSep "$|^" skippedTests}$" ];
38   passthru.tests.version = testers.testVersion {
39     package = podman-tui;
40     command = "HOME=$(mktemp -d) podman-tui version";
41     version = "v${version}";
42   };
44   meta = {
45     homepage = "https://github.com/containers/podman-tui";
46     description = "Podman Terminal UI";
47     license = lib.licenses.asl20;
48     maintainers = with lib.maintainers; [ aaronjheng ];
49     mainProgram = "podman-tui";
50   };