nixpkgs/pkgs/by-name/yo/youki/package.nix

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

68 lines
1.3 KiB
Nix
Raw Normal View History

2024-08-10 11:05:33 +00:00
{
lib,
rustPlatform,
fetchFromGitHub,
pkg-config,
installShellFiles,
2024-09-29 13:32:47 +00:00
getconf,
2024-08-10 11:05:33 +00:00
dbus,
libseccomp,
systemd,
stdenv,
2023-01-09 01:10:27 +00:00
}:
rustPlatform.buildRustPackage rec {
pname = "youki";
2024-09-04 15:07:47 +00:00
version = "0.4.1";
2023-01-09 01:10:27 +00:00
src = fetchFromGitHub {
owner = "containers";
repo = pname;
rev = "v${version}";
2024-09-04 15:07:47 +00:00
hash = "sha256-vXYoLjmPiK2f6Yg5YGTp76hmawnbfcnMOOppsWwKtAk=";
2023-01-09 01:10:27 +00:00
};
2024-08-10 11:05:33 +00:00
nativeBuildInputs = [
pkg-config
installShellFiles
2024-09-29 13:32:47 +00:00
getconf
2024-08-10 11:05:33 +00:00
];
2023-01-09 01:10:27 +00:00
2024-08-10 11:05:33 +00:00
buildInputs = [
dbus
libseccomp
systemd
];
2023-01-09 01:10:27 +00:00
postInstall = lib.optionalString (stdenv.buildPlatform.canExecute stdenv.hostPlatform) ''
2023-01-09 01:10:27 +00:00
installShellCompletion --cmd youki \
--bash <($out/bin/youki completion -s bash) \
--fish <($out/bin/youki completion -s fish) \
--zsh <($out/bin/youki completion -s zsh)
'';
2024-08-10 11:05:33 +00:00
cargoBuildFlags = [
"-p"
"youki"
"--features"
"systemd"
2024-08-10 11:05:33 +00:00
];
2024-08-10 11:05:33 +00:00
cargoTestFlags = [
"-p"
"youki"
];
2023-01-09 01:10:27 +00:00
2024-09-04 15:07:47 +00:00
cargoHash = "sha256-s8L/L3be5fRahDiLKnHQcU52F+AJVr7Q3uL8mcloVv8=";
2023-01-09 01:10:27 +00:00
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;
2024-08-10 11:05:33 +00:00
maintainers = with maintainers; [ builditluc ];
2023-01-09 01:10:27 +00:00
platforms = platforms.linux;
2023-11-27 01:17:53 +00:00
mainProgram = "youki";
2023-01-09 01:10:27 +00:00
};
}