Unverified Commit 6a907cbb authored by Fernando Rodrigues's avatar Fernando Rodrigues Committed by GitHub
Browse files

noogle-search: init at 0.2.0 (#487263)

parents 485a880f 57201334
Loading
Loading
Loading
Loading
+6 −0
Original line number Diff line number Diff line
@@ -2154,6 +2154,12 @@
    githubId = 58516559;
    name = "Alexander Rezvov";
  };
  argos_nothing = {
    email = "argosnothing@gmail.com";
    github = "argosnothing";
    githubId = 225423001;
    name = "Argos Nothing";
  };
  argrat = {
    email = "n.bertazzo@protonmail.com";
    github = "brtz-cs";
+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 ];
  };
})