default.nix (834B)
1 { 2 lib, 3 stdenv, 4 rustPlatform, 5 fetchFromSourcehut, 6 pkg-config, 7 openssl, 8 darwin, 9 }: 10 11 rustPlatform.buildRustPackage rec { 12 pname = "gemserv"; 13 version = "0.6.6"; 14 15 src = fetchFromSourcehut { 16 owner = "~int80h"; 17 repo = "gemserv"; 18 rev = "v${version}"; 19 hash = "sha256-jFh7OksYGXGWwLb4HtAuDQ7OsWxedqeLARPI20RyAgQ="; 20 }; 21 22 cargoHash = "sha256-mGcZiSOwgRki3OfbbcNL/1avj6T5XD7ebjg9THIzUIQ="; 23 24 nativeBuildInputs = [ pkg-config ]; 25 26 buildInputs = [ openssl ] ++ lib.optional stdenv.isDarwin darwin.apple_sdk.frameworks.Security; 27 28 postInstall = '' 29 install -Dm644 config.toml -t $out/share/gemserv 30 ''; 31 32 meta = { 33 description = "A gemini server written in rust"; 34 homepage = "https://git.sr.ht/~int80h/gemserv"; 35 license = lib.licenses.mit; 36 maintainers = [ lib.maintainers.sikmir ]; 37 }; 38 }