depot/third_party/nixpkgs/pkgs/applications/virtualization/youki/default.nix
Default email bcb2f287e1 Project import generated by Copybara.
GitOrigin-RevId: d603719ec6e294f034936c0d0dc06f689d91b6c3
2024-06-20 20:27:18 +05:30

51 lines
1.2 KiB
Nix

{ lib
, rustPlatform
, fetchFromGitHub
, pkg-config
, installShellFiles
, dbus
, libseccomp
, systemd
}:
rustPlatform.buildRustPackage rec {
pname = "youki";
version = "0.3.2";
src = fetchFromGitHub {
owner = "containers";
repo = pname;
rev = "v${version}";
hash = "sha256-/cc+gHnakxC446MxErvgCDvc1gMWNi45h6fZ1Cd1Pj0=";
};
cargoPatches = [
./fix-cargo-lock.patch
];
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" ];
cargoHash = "sha256-PKn448fOCnyMC42NtQnLt8kvZIBautsq4Fw/bRvwmpw=";
meta = with lib; {
description = "Container runtime written in Rust";
homepage = "https://containers.github.io/youki/";
changelog = "https://github.com/containers/youki/releases/tag/v${version}";
license = licenses.asl20;
maintainers = [];
platforms = platforms.linux;
mainProgram = "youki";
};
}