nixpkgs/pkgs/by-name/no/nostr-rs-relay/package.nix
aleksana 571c71e6f7 treewide: migrate packages to pkgs/by-name, take 1
We are migrating packages that meet below requirements:

1. using `callPackage`
2. called path is a directory
3. overriding set is empty (`{ }`)
4. not containing path expressions other than relative path (to
makenixpkgs-vet happy)
5. not referenced by nix files outside of the directory, other
than`pkgs/top-level/all-packages.nix`
6. not referencing nix files outside of the directory
7. not referencing `default.nix` (since it's changed to `package.nix`)
8. `outPath` doesn't change after migration

The tool is here: https://github.com/Aleksanaa/by-name-migrate.
2024-11-09 20:04:51 +08:00

44 lines
1.0 KiB
Nix

{ lib
, stdenv
, fetchFromGitHub
, rustPlatform
, openssl
, pkg-config
, libiconv
, darwin
, protobuf
}:
rustPlatform.buildRustPackage rec {
pname = "nostr-rs-relay";
version = "0.8.13-unstable-2024-08-14";
src = fetchFromGitHub {
owner = "scsibug";
repo = "nostr-rs-relay";
rev = "5a2189062560709b641bb13bedaca2cd478b4403";
hash = "sha256-ZUndTcLGdAODgSsIqajlNdaEYbYWame0vFRBVmRFzKw=";
};
cargoHash = "sha256-+agmlg6tAnEJ5o586fUY7V4fdNScDPKCbaZqt7R3gqg=";
buildInputs = [ openssl.dev ]
++ lib.optionals stdenv.hostPlatform.isDarwin [
libiconv
darwin.apple_sdk.frameworks.Security
darwin.apple_sdk.frameworks.SystemConfiguration
];
nativeBuildInputs = [
pkg-config # for openssl
protobuf
];
meta = with lib; {
description = "Nostr relay written in Rust";
homepage = "https://sr.ht/~gheartsfield/nostr-rs-relay/";
changelog = "https://github.com/scsibug/nostr-rs-relay/releases/tag/${version}";
maintainers = with maintainers; [ jurraca ];
license = licenses.mit;
};
}