2023-01-11 07:51:40 +00:00
|
|
|
{ lib
|
|
|
|
, rustPlatform
|
|
|
|
, fetchFromGitHub
|
|
|
|
, pkg-config
|
|
|
|
, installShellFiles
|
|
|
|
, dbus
|
|
|
|
, libseccomp
|
|
|
|
, systemd
|
|
|
|
}:
|
|
|
|
|
|
|
|
rustPlatform.buildRustPackage rec {
|
|
|
|
pname = "youki";
|
2024-02-07 01:22:34 +00:00
|
|
|
version = "0.3.2";
|
2023-01-11 07:51:40 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "containers";
|
|
|
|
repo = pname;
|
|
|
|
rev = "v${version}";
|
2024-02-07 01:22:34 +00:00
|
|
|
hash = "sha256-/cc+gHnakxC446MxErvgCDvc1gMWNi45h6fZ1Cd1Pj0=";
|
2023-01-11 07:51:40 +00:00
|
|
|
};
|
|
|
|
|
2024-02-07 01:22:34 +00:00
|
|
|
cargoPatches = [
|
|
|
|
./fix-cargo-lock.patch
|
|
|
|
];
|
|
|
|
|
2023-01-11 07:51:40 +00:00
|
|
|
nativeBuildInputs = [ pkg-config installShellFiles ];
|
|
|
|
|
|
|
|
buildInputs = [ dbus libseccomp systemd ];
|
|
|
|
|
|
|
|
postInstall = ''
|
|
|
|
installShellCompletion --cmd youki \
|
|
|
|
--bash <($out/bin/youki completion -s bash) \
|
|
|
|
--fish <($out/bin/youki completion -s fish) \
|
|
|
|
--zsh <($out/bin/youki completion -s zsh)
|
|
|
|
'';
|
|
|
|
|
|
|
|
cargoBuildFlags = [ "-p" "youki" ];
|
|
|
|
cargoTestFlags = [ "-p" "youki" ];
|
|
|
|
|
2024-02-07 01:22:34 +00:00
|
|
|
cargoHash = "sha256-PKn448fOCnyMC42NtQnLt8kvZIBautsq4Fw/bRvwmpw=";
|
2023-01-11 07:51:40 +00:00
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
description = "A container runtime written in Rust";
|
|
|
|
homepage = "https://containers.github.io/youki/";
|
|
|
|
changelog = "https://github.com/containers/youki/releases/tag/v${version}";
|
|
|
|
license = licenses.asl20;
|
2023-04-12 12:48:02 +00:00
|
|
|
maintainers = [];
|
2023-01-11 07:51:40 +00:00
|
|
|
platforms = platforms.linux;
|
2024-01-02 11:29:13 +00:00
|
|
|
mainProgram = "youki";
|
2023-01-11 07:51:40 +00:00
|
|
|
};
|
|
|
|
}
|