Unverified Commit 86bc1764 authored by Nick Cao's avatar Nick Cao Committed by GitHub
Browse files

ocelot: init at 0.5.2 (#508434)

parents 87a0027b 6b36e648
Loading
Loading
Loading
Loading
+43 −0
Original line number Diff line number Diff line
{
  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";
  };
})