2023-03-24 00:07:29 +00:00
|
|
|
{ lib, rustPlatform, fetchFromGitHub, stdenv, darwin }:
|
2022-08-21 13:32:41 +00:00
|
|
|
|
|
|
|
rustPlatform.buildRustPackage rec {
|
|
|
|
pname = "rustypaste";
|
2023-05-24 13:37:59 +00:00
|
|
|
version = "0.9.0";
|
2022-08-21 13:32:41 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub{
|
|
|
|
owner = "orhun";
|
|
|
|
repo = pname;
|
|
|
|
rev = "v${version}";
|
2023-05-24 13:37:59 +00:00
|
|
|
sha256 = "sha256-s0IpyybF0haTQu30QBaPDmCSFivpMeESt9S6a6NWfTM=";
|
2022-08-21 13:32:41 +00:00
|
|
|
};
|
|
|
|
|
2023-05-24 13:37:59 +00:00
|
|
|
cargoHash = "sha256-87JxmZsjXZ7kf4LHgqrgrWbQtVj/XdZrf0G/6wP/ip8=";
|
2022-08-21 13:32:41 +00:00
|
|
|
|
2023-03-24 00:07:29 +00:00
|
|
|
buildInputs = lib.optionals stdenv.isDarwin [
|
|
|
|
darwin.apple_sdk.frameworks.CoreServices
|
|
|
|
];
|
|
|
|
|
2022-08-21 13:32:41 +00:00
|
|
|
# Some tests need network
|
|
|
|
checkFlags = [
|
|
|
|
"--skip paste::tests::test_paste_data"
|
|
|
|
"--skip server::tests::test_upload_file"
|
|
|
|
"--skip server::tests::test_upload_remote_file"
|
|
|
|
"--skip util::tests::test_get_expired_files"
|
|
|
|
];
|
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
description = "A minimal file upload/pastebin service";
|
|
|
|
homepage = "https://github.com/orhun/rustypaste";
|
|
|
|
changelog = "https://github.com/orhun/rustypaste/blob/v${version}/CHANGELOG.md";
|
|
|
|
license = licenses.mit;
|
|
|
|
maintainers = with maintainers; [ seqizz ];
|
|
|
|
};
|
|
|
|
}
|