mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-06-10 03:23:29 +03:00
podman-bootc: init at 0.1.2
This commit is contained in:
parent
f365bef3cc
commit
361f29cf69
2 changed files with 92 additions and 0 deletions
78
pkgs/by-name/po/podman-bootc/package.nix
Normal file
78
pkgs/by-name/po/podman-bootc/package.nix
Normal file
|
@ -0,0 +1,78 @@
|
||||||
|
{
|
||||||
|
lib,
|
||||||
|
buildGoModule,
|
||||||
|
buildPackages,
|
||||||
|
fetchFromGitHub,
|
||||||
|
installShellFiles,
|
||||||
|
libisoburn,
|
||||||
|
libvirt,
|
||||||
|
pkg-config,
|
||||||
|
stdenv,
|
||||||
|
}:
|
||||||
|
|
||||||
|
buildGoModule rec {
|
||||||
|
pname = "podman-bootc";
|
||||||
|
version = "0.1.2";
|
||||||
|
|
||||||
|
src = fetchFromGitHub {
|
||||||
|
owner = "containers";
|
||||||
|
repo = "podman-bootc";
|
||||||
|
tag = "v${version}";
|
||||||
|
hash = "sha256-Hxg2QSedPAWYZpuesUEFol9bpTppjB0/MpCcB+txMDc=";
|
||||||
|
};
|
||||||
|
|
||||||
|
patches = [ ./respect-home-env.patch ];
|
||||||
|
|
||||||
|
vendorHash = "sha256-8QP4NziLwEo0M4NW5UgSEMAVgBDxmnE+PLbpyclK9RQ=";
|
||||||
|
|
||||||
|
tags = [
|
||||||
|
"exclude_graphdriver_btrfs"
|
||||||
|
"btrfs_noversion"
|
||||||
|
"exclude_graphdriver_devicemapper"
|
||||||
|
"containers_image_openpgp"
|
||||||
|
"remote"
|
||||||
|
];
|
||||||
|
|
||||||
|
nativeBuildInputs = [
|
||||||
|
pkg-config
|
||||||
|
installShellFiles
|
||||||
|
];
|
||||||
|
buildInputs = [
|
||||||
|
libvirt
|
||||||
|
libisoburn
|
||||||
|
];
|
||||||
|
|
||||||
|
# All tests depend on booting virtual machines, which is infeasible here.
|
||||||
|
doCheck = false;
|
||||||
|
|
||||||
|
postInstall =
|
||||||
|
let
|
||||||
|
podman-bootc = "${stdenv.hostPlatform.emulator buildPackages} $out/bin/podman-bootc";
|
||||||
|
in
|
||||||
|
lib.optionalString (stdenv.hostPlatform.emulatorAvailable buildPackages) ''
|
||||||
|
# podman-bootc always tries to touch cache and run dirs, no matter the command
|
||||||
|
export HOME=$TMPDIR
|
||||||
|
export XDG_RUNTIME_DIR=$TMPDIR
|
||||||
|
|
||||||
|
installShellCompletion --cmd podman-bootc \
|
||||||
|
--bash <(${podman-bootc} completion bash) \
|
||||||
|
--fish <(${podman-bootc} completion fish) \
|
||||||
|
--zsh <(${podman-bootc} completion zsh)
|
||||||
|
'';
|
||||||
|
|
||||||
|
meta = {
|
||||||
|
description = "Streamlining podman+bootc interactions";
|
||||||
|
homepage = "https://github.com/containers/podman-bootc";
|
||||||
|
changelog = "https://github.com/containers/podman-bootc/releases/tag/${src.tag}";
|
||||||
|
maintainers = with lib.maintainers; [ evan-goode ];
|
||||||
|
license = lib.licenses.asl20;
|
||||||
|
# x86_64-darwin does not seem to be supported at this time:
|
||||||
|
# https://github.com/containers/podman-bootc/issues/46
|
||||||
|
platforms = [
|
||||||
|
"aarch64-linux"
|
||||||
|
"aarch64-darwin"
|
||||||
|
"x86_64-linux"
|
||||||
|
];
|
||||||
|
mainProgram = "podman-bootc";
|
||||||
|
};
|
||||||
|
}
|
14
pkgs/by-name/po/podman-bootc/respect-home-env.patch
Normal file
14
pkgs/by-name/po/podman-bootc/respect-home-env.patch
Normal file
|
@ -0,0 +1,14 @@
|
||||||
|
diff --git a/pkg/user/user.go b/pkg/user/user.go
|
||||||
|
index 1f8dbcf..713a6a7 100644
|
||||||
|
--- a/pkg/user/user.go
|
||||||
|
+++ b/pkg/user/user.go
|
||||||
|
@@ -38,6 +38,9 @@ func NewUser() (u User, err error) {
|
||||||
|
}
|
||||||
|
|
||||||
|
func (u *User) HomeDir() string {
|
||||||
|
+ if envHome := os.Getenv("HOME"); envHome != "" {
|
||||||
|
+ return envHome
|
||||||
|
+ }
|
||||||
|
return u.OSUser.HomeDir
|
||||||
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue