Commit e16a290a authored by Noah's avatar Noah
Browse files

foodfetch: init at 0.1.1



Apply suggestions from code review

Co-authored-by: default avataremaryn <197520219+emaryn@users.noreply.github.com>

fix

Update pkgs/by-name/fo/foodfetch/package.nix

Co-authored-by: default avatarawwpotato <153149335+awwpotato@users.noreply.github.com>

Update pkgs/by-name/fo/foodfetch/package.nix

Co-authored-by: default avatarawwpotato <153149335+awwpotato@users.noreply.github.com>
parent effac2a6
Loading
Loading
Loading
Loading
+40 −0
Original line number Diff line number Diff line
{
  lib,
  rustPlatform,
  fetchFromGitHub,
  openssl,
  pkg-config,
  versionCheckHook,
  nix-update-script,
}:
rustPlatform.buildRustPackage (finalAttrs: {
  pname = "foodfetch";
  version = "0.1.1";
  src = fetchFromGitHub {
    owner = "noahfraiture";
    repo = "foodfetch";
    tag = "v${finalAttrs.version}";
    hash = "sha256-TUgj3zS18lCtkyxYrG4f156YqFSCGXzfbK6b+Owacto=";
  };

  useFetchCargoVendor = true;
  cargoHash = "sha256-ZPV6sDQHV+G0HxRAVlcilh4tCCQspTnxnH1aHxVP8tI=";

  nativeBuildInputs = [ pkg-config ];

  buildInputs = [ openssl ];

  doInstallCheck = true;
  nativeInstallCheck = [ versionCheckHook ];

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

  meta = {
    changelog = "https://github.com/noahfraiture/foodfetch/releases/tag/v${finalAttrs.version}";
    description = "Yet another fetch to quickly get recipes";
    homepage = "https://github.com/noahfraiture/foodfetch";
    license = lib.licenses.mit;
    mainProgram = "foodfetch";
    maintainers = with lib.maintainers; [ noahfraiture ];
  };
})