From 6b36e648c75819d332379c2ef53caa867d0ecb24 Mon Sep 17 00:00:00 2001 From: xrelkd <46590321+xrelkd@users.noreply.github.com> Date: Fri, 10 Apr 2026 04:51:38 +0800 Subject: [PATCH] ocelot: init at 0.5.2 --- pkgs/by-name/oc/ocelot/package.nix | 43 ++++++++++++++++++++++++++++++ 1 file changed, 43 insertions(+) create mode 100644 pkgs/by-name/oc/ocelot/package.nix diff --git a/pkgs/by-name/oc/ocelot/package.nix b/pkgs/by-name/oc/ocelot/package.nix new file mode 100644 index 000000000000..3247bc247292 --- /dev/null +++ b/pkgs/by-name/oc/ocelot/package.nix @@ -0,0 +1,43 @@ +{ + lib, + stdenv, + fetchFromGitHub, + rustPlatform, + installShellFiles, +}: + +rustPlatform.buildRustPackage (finalAttrs: { + pname = "ocelot"; + version = "0.5.2"; + + src = fetchFromGitHub { + owner = "xrelkd"; + repo = "ocelot"; + tag = "v${finalAttrs.version}"; + hash = "sha256-Z0RKEHeDhHjZtqXWueASMgiqnFRNsPe2rdoC7LZ/Mh8="; + }; + + cargoHash = "sha256-rJoIElM7fYg+oEV5idUNGys88x6dFeO4Ux8TxJKNqPU="; + + nativeBuildInputs = [ + installShellFiles + ]; + + postInstall = lib.optionalString (stdenv.buildPlatform.canExecute stdenv.hostPlatform) '' + installShellCompletion --cmd ocelot \ + --bash <($out/bin/ocelot completions bash) \ + --fish <($out/bin/ocelot completions fish) \ + --zsh <($out/bin/ocelot completions zsh) + ''; + + __structuredAttrs = true; + + meta = { + description = "Process supervisor and init system written in Rust Programming Language"; + homepage = "https://github.com/xrelkd/ocelot"; + license = lib.licenses.gpl3Only; + platforms = lib.platforms.linux; + maintainers = with lib.maintainers; [ xrelkd ]; + mainProgram = "ocelot"; + }; +})