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