btrbk: add mainProgram (#356350)
[NixPkgs.git] / pkgs / by-name / ru / rustypaste / package.nix
blobf0a1fc8c3b9c1f4b44f6e5cd7c081bfdf4f5d532
1 { lib, rustPlatform, fetchFromGitHub, stdenv, darwin }:
3 rustPlatform.buildRustPackage rec {
4   pname = "rustypaste";
5   version = "0.15.1";
7   src = fetchFromGitHub {
8     owner = "orhun";
9     repo = pname;
10     rev = "v${version}";
11     sha256 = "sha256-C/ndU09+yQTXEUWDO3u9Bl5M3x3aaRHVuWpomUAa/B8=";
12   };
14   cargoHash = "sha256-b9KZzevaTl52pduN4gkF8k6yqgDcE8x5sOwmPxzYfWA=";
16   buildInputs = lib.optionals stdenv.hostPlatform.isDarwin [
17     darwin.apple_sdk.frameworks.CoreServices
18   ];
20   dontUseCargoParallelTests = true;
22   checkFlags = [
23     # requires internet access
24     "--skip=paste::tests::test_paste_data"
25     "--skip=server::tests::test_upload_remote_file"
26   ];
28   __darwinAllowLocalNetworking = true;
30   meta = with lib; {
31     description = "Minimal file upload/pastebin service";
32     homepage = "https://github.com/orhun/rustypaste";
33     changelog = "https://github.com/orhun/rustypaste/blob/v${version}/CHANGELOG.md";
34     license = licenses.mit;
35     maintainers = with maintainers; [ figsoda seqizz ];
36     mainProgram = "rustypaste";
37   };