podman-bootc: init at 0.1.2 (#376469)

authored by Seth Flynn and committed by GitHub 46750884 99a97445

+92
+78
pkgs/by-name/po/podman-bootc/package.nix
··· 1 + { 2 + lib, 3 + buildGoModule, 4 + buildPackages, 5 + fetchFromGitHub, 6 + installShellFiles, 7 + libisoburn, 8 + libvirt, 9 + pkg-config, 10 + stdenv, 11 + }: 12 + 13 + buildGoModule rec { 14 + pname = "podman-bootc"; 15 + version = "0.1.2"; 16 + 17 + src = fetchFromGitHub { 18 + owner = "containers"; 19 + repo = "podman-bootc"; 20 + tag = "v${version}"; 21 + hash = "sha256-Hxg2QSedPAWYZpuesUEFol9bpTppjB0/MpCcB+txMDc="; 22 + }; 23 + 24 + patches = [ ./respect-home-env.patch ]; 25 + 26 + vendorHash = "sha256-8QP4NziLwEo0M4NW5UgSEMAVgBDxmnE+PLbpyclK9RQ="; 27 + 28 + tags = [ 29 + "exclude_graphdriver_btrfs" 30 + "btrfs_noversion" 31 + "exclude_graphdriver_devicemapper" 32 + "containers_image_openpgp" 33 + "remote" 34 + ]; 35 + 36 + nativeBuildInputs = [ 37 + pkg-config 38 + installShellFiles 39 + ]; 40 + buildInputs = [ 41 + libvirt 42 + libisoburn 43 + ]; 44 + 45 + # All tests depend on booting virtual machines, which is infeasible here. 46 + doCheck = false; 47 + 48 + postInstall = 49 + let 50 + podman-bootc = "${stdenv.hostPlatform.emulator buildPackages} $out/bin/podman-bootc"; 51 + in 52 + lib.optionalString (stdenv.hostPlatform.emulatorAvailable buildPackages) '' 53 + # podman-bootc always tries to touch cache and run dirs, no matter the command 54 + export HOME=$TMPDIR 55 + export XDG_RUNTIME_DIR=$TMPDIR 56 + 57 + installShellCompletion --cmd podman-bootc \ 58 + --bash <(${podman-bootc} completion bash) \ 59 + --fish <(${podman-bootc} completion fish) \ 60 + --zsh <(${podman-bootc} completion zsh) 61 + ''; 62 + 63 + meta = { 64 + description = "Streamlining podman+bootc interactions"; 65 + homepage = "https://github.com/containers/podman-bootc"; 66 + changelog = "https://github.com/containers/podman-bootc/releases/tag/${src.tag}"; 67 + maintainers = with lib.maintainers; [ evan-goode ]; 68 + license = lib.licenses.asl20; 69 + # x86_64-darwin does not seem to be supported at this time: 70 + # https://github.com/containers/podman-bootc/issues/46 71 + platforms = [ 72 + "aarch64-linux" 73 + "aarch64-darwin" 74 + "x86_64-linux" 75 + ]; 76 + mainProgram = "podman-bootc"; 77 + }; 78 + }
+14
pkgs/by-name/po/podman-bootc/respect-home-env.patch
··· 1 + diff --git a/pkg/user/user.go b/pkg/user/user.go 2 + index 1f8dbcf..713a6a7 100644 3 + --- a/pkg/user/user.go 4 + +++ b/pkg/user/user.go 5 + @@ -38,6 +38,9 @@ func NewUser() (u User, err error) { 6 + } 7 + 8 + func (u *User) HomeDir() string { 9 + + if envHome := os.Getenv("HOME"); envHome != "" { 10 + + return envHome 11 + + } 12 + return u.OSUser.HomeDir 13 + } 14 +