Commit 57201334 authored by salivala's avatar salivala
Browse files

noogle-search: init at 0.2.0



hash correction

Update pkgs/by-name/no/noogle-search/package.nix

Co-authored-by: default avatarHythera <87016780+Hythera@users.noreply.github.com>

Update pkgs/by-name/no/noogle-search/package.nix

Co-authored-by: default avatarHythera <87016780+Hythera@users.noreply.github.com>

added update-script

tweak to passthru position
parent d7978171
Loading
Loading
Loading
Loading
+55 −0
Original line number Diff line number Diff line
{
  lib,
  rustPlatform,
  fetchFromGitHub,
  pkg-config,
  openssl,
  makeWrapper,
  bat,
  fzf,
  xdg-utils,
  nix-update-script,
}:
rustPlatform.buildRustPackage (finalAttrs: {
  pname = "noogle-search";
  version = "0.2.0";

  src = fetchFromGitHub {
    owner = "argosnothing";
    repo = "noogle-search";
    tag = "v${finalAttrs.version}";
    hash = "sha256-js3jBZsyukleQW2BwggfYUvKCdS8pBTjD6ysWyMUtpI=";
  };

  cargoHash = "sha256-axqFE5ZEiVP8PzFTtW5mbyyYcR4q9g3LX/0i6y+cgy8=";

  nativeBuildInputs = [
    makeWrapper
    pkg-config
  ];

  buildInputs = [
    openssl
  ];

  postInstall = ''
    wrapProgram $out/bin/noogle-search \
      --prefix PATH : ${
        lib.makeBinPath [
          bat
          fzf
          xdg-utils
        ]
      }
  '';

  passthru.updateScript = nix-update-script { };

  meta = {
    description = "Search Noogle functions with fzf";
    homepage = "https://github.com/argosnothing/noogle-search";
    license = lib.licenses.gpl3Plus;
    mainProgram = "noogle-search";
    maintainers = with lib.maintainers; [ argos_nothing ];
  };
})