depot/third_party/nixpkgs/pkgs/by-name/wa/wastebin/package.nix
Default email 7e47f3658e Project import generated by Copybara.
GitOrigin-RevId: 1925c603f17fc89f4c8f6bf6f631a802ad85d784
2024-09-26 11:04:55 +00:00

52 lines
1 KiB
Nix

{ lib
, rustPlatform
, fetchFromGitHub
, pkg-config
, sqlite
, zstd
, stdenv
, darwin
, nixosTests
}:
rustPlatform.buildRustPackage rec {
pname = "wastebin";
version = "2.5.0";
src = fetchFromGitHub {
owner = "matze";
repo = "wastebin";
rev = version;
hash = "sha256-abqVjjV1RK9F8xo23Ir8jqoo9jqSe/Kra1IJNHadqXs=";
};
cargoHash = "sha256-D/a+aEK4Usa4HFOKCxCIy9bHabH5tmBdFRRRQ7aKs/I=";
nativeBuildInputs = [
pkg-config
];
buildInputs = [
sqlite
zstd
] ++ lib.optionals stdenv.hostPlatform.isDarwin [
darwin.apple_sdk.frameworks.SystemConfiguration
];
env = {
ZSTD_SYS_USE_PKG_CONFIG = true;
};
passthru.tests = {
inherit (nixosTests) wastebin;
};
meta = with lib; {
description = "Wastebin is a pastebin";
homepage = "https://github.com/matze/wastebin";
changelog = "https://github.com/matze/wastebin/blob/${src.rev}/CHANGELOG.md";
license = licenses.mit;
maintainers = with maintainers; [ pinpox matthiasbeyer ];
mainProgram = "wastebin";
};
}