{ lib, rustPlatform, fetchFromGitHub, pkg-config, sqlite, zstd, nixosTests, }: rustPlatform.buildRustPackage rec { pname = "wastebin"; version = "3.4.0"; src = fetchFromGitHub { owner = "matze"; repo = "wastebin"; rev = version; hash = "sha256-cujMs7R6CBSsoQ3p8PyHAJYwWjd8NGYX+qMB4ntrorg="; }; cargoHash = "sha256-wS4WkOjaDTlrIEjeSTmEqzfC1XZgXQUTqpfs7FYr60Y="; nativeBuildInputs = [ pkg-config ]; buildInputs = [ sqlite zstd ]; env = { ZSTD_SYS_USE_PKG_CONFIG = true; }; passthru.tests = { inherit (nixosTests) wastebin; }; meta = { description = "Pastebin service"; homepage = "https://github.com/matze/wastebin"; changelog = "https://github.com/matze/wastebin/blob/${src.rev}/CHANGELOG.md"; license = lib.licenses.mit; maintainers = with lib.maintainers; [ pinpox matthiasbeyer ]; mainProgram = "wastebin"; }; }