Skip to content

Commit

Permalink
pkgs/servers/gemini/molly-brown/default.nix: use fetchFromGitea, add …
Browse files Browse the repository at this point in the history
…tests, improve meta

- Replace fetchgit with fetchFromGitea for better source fetching
- Add longDescription to provide more package information
- Enable test suite during build with doCheck
- Add platforms attribute to specify supported systems
- Add comments to explain ldflags
- Improve code formatting and organization
  • Loading branch information
chiqorein authored Oct 26, 2024
1 parent 08c5673 commit 58f92a9
Showing 1 changed file with 27 additions and 6 deletions.
33 changes: 27 additions & 6 deletions pkgs/servers/gemini/molly-brown/default.nix
Original file line number Diff line number Diff line change
@@ -1,26 +1,47 @@
{ lib, buildGoModule, fetchgit, nixosTests }:
{ lib
, buildGoModule
, fetchFromGitea
, nixosTests
}:

buildGoModule rec {
pname = "molly-brown";
version = "unstable-2023-02-10";

src = fetchgit {
url = "https://tildegit.org/solderpunk/molly-brown.git";

src = fetchFromGitea {
domain = "tildegit.org";
owner = "solderpunk";
repo = "molly-brown";
rev = "56d8dde14abc90b784b7844602f12100af9756e0";
hash = "sha256-kfopRyCrDaiVjKYseyWacIT9MJ8PzB8LAs6YMgYqCrs=";
};

vendorHash = "sha256-czfHnXS9tf5vQQNXhWH7DStmhsorSc4Di/yZuv4LHRk=";

ldflags = [
"-s" # Omit symbol table and debug information
"-w" # Omit DWARF symbol table
];

ldflags = [ "-s" "-w" ];
# Ensure tests are run during build
doCheck = true;

passthru.tests.basic = nixosTests.molly-brown;
passthru = {
tests = {
basic = nixosTests.molly-brown;
};
};

meta = with lib; {
description = "Full-featured Gemini server";
longDescription = ''
Molly Brown is a full-featured Gemini server implementation written in Go,
supporting virtual hosting, CGI, SCGI, FastCGI, and more.
'';
mainProgram = "molly-brown";
homepage = "https://tildegit.org/solderpunk/molly-brown";
maintainers = with maintainers; [ ehmry ];
license = licenses.bsd2;
platforms = platforms.unix;
};
}

0 comments on commit 58f92a9

Please sign in to comment.