๐Ÿ A very simple static Gemini server, now with Titan support!
cpp gemini titan gemini-protocol titan-protocol
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

chore(nix): set up flake

Fuwn d8dbcc4e 0b5e41a0

+190
+9
.envrc
··· 1 + #!/usr/bin/env bash 2 + 3 + if type -P lorri &>/dev/null; then 4 + eval "$(lorri direnv)" 5 + else 6 + echo 'while direnv evaluated .envrc, could not find the command "lorri" [https://github.com/nix-community/lorri]' 7 + 8 + use flake 9 + fi
+2
.gitignore
··· 14 14 # Ninja 15 15 .ninja_log 16 16 17 + # Nix 18 + result
+80
flake.lock
··· 1 + { 2 + "nodes": { 3 + "flake-compat": { 4 + "flake": false, 5 + "locked": { 6 + "lastModified": 1696426674, 7 + "narHash": "sha256-kvjfFW7WAETZlt09AgDn1MrtKzP7t90Vf7vypd3OL1U=", 8 + "owner": "edolstra", 9 + "repo": "flake-compat", 10 + "rev": "0f9255e01c2351cc7d116c072cb317785dd33b33", 11 + "type": "github" 12 + }, 13 + "original": { 14 + "owner": "edolstra", 15 + "repo": "flake-compat", 16 + "type": "github" 17 + } 18 + }, 19 + "flake-utils": { 20 + "inputs": { 21 + "systems": [ 22 + "systems" 23 + ] 24 + }, 25 + "locked": { 26 + "lastModified": 1726560853, 27 + "narHash": "sha256-X6rJYSESBVr3hBoH0WbKE5KvhPU5bloyZ2L4K60/fPQ=", 28 + "owner": "numtide", 29 + "repo": "flake-utils", 30 + "rev": "c1dfcf08411b08f6b8615f7d8971a2bfa81d5e8a", 31 + "type": "github" 32 + }, 33 + "original": { 34 + "owner": "numtide", 35 + "repo": "flake-utils", 36 + "type": "github" 37 + } 38 + }, 39 + "nixpkgs": { 40 + "locked": { 41 + "lastModified": 1727653192, 42 + "narHash": "sha256-YBIXvJOLKU1FIQM0fB5lBLT1CoPpMCn03vHyNsVFXZ4=", 43 + "owner": "NixOS", 44 + "repo": "nixpkgs", 45 + "rev": "c6f2346239c6f6abdc8befcb2a10759083c85f5d", 46 + "type": "github" 47 + }, 48 + "original": { 49 + "owner": "NixOS", 50 + "repo": "nixpkgs", 51 + "type": "github" 52 + } 53 + }, 54 + "root": { 55 + "inputs": { 56 + "flake-compat": "flake-compat", 57 + "flake-utils": "flake-utils", 58 + "nixpkgs": "nixpkgs", 59 + "systems": "systems" 60 + } 61 + }, 62 + "systems": { 63 + "locked": { 64 + "lastModified": 1681028828, 65 + "narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=", 66 + "owner": "nix-systems", 67 + "repo": "default", 68 + "rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e", 69 + "type": "github" 70 + }, 71 + "original": { 72 + "owner": "nix-systems", 73 + "repo": "default", 74 + "type": "github" 75 + } 76 + } 77 + }, 78 + "root": "root", 79 + "version": 7 80 + }
+89
flake.nix
··· 1 + { 2 + description = "A very simple static Gemini server, now with Titan support!"; 3 + 4 + inputs = { 5 + nixpkgs.url = "github:NixOS/nixpkgs"; 6 + systems.url = "github:nix-systems/default"; 7 + 8 + flake-compat = { 9 + url = "github:edolstra/flake-compat"; 10 + flake = false; 11 + }; 12 + 13 + flake-utils = { 14 + url = "github:numtide/flake-utils"; 15 + inputs.systems.follows = "systems"; 16 + }; 17 + }; 18 + 19 + outputs = 20 + { 21 + nixpkgs, 22 + flake-utils, 23 + self, 24 + ... 25 + }: 26 + flake-utils.lib.eachDefaultSystem ( 27 + system: 28 + let 29 + pkgs = import nixpkgs { inherit system; }; 30 + 31 + meta = with pkgs.lib; { 32 + description = "A very simple static Gemini server, now with Titan support!"; 33 + homepage = "https://github.com/gemrest/maple"; 34 + license = licenses.gpl3Only; 35 + maintainers = [ maintainers.Fuwn ]; 36 + mainPackage = "maple"; 37 + platforms = platforms.linux; 38 + }; 39 + 40 + maple = (pkgs.stdenvAdapters.useMoldLinker pkgs.clangStdenv).mkDerivation { 41 + inherit meta; 42 + 43 + name = "maple"; 44 + version = "0.1.6"; 45 + src = pkgs.lib.cleanSource ./.; 46 + 47 + nativeBuildInputs = with pkgs; [ 48 + ninja 49 + clang 50 + ]; 51 + 52 + buildInputs = [ 53 + pkgs.libressl.dev 54 + ]; 55 + 56 + buildPhase = '' 57 + mkdir -p $out/bin 58 + ninja 59 + ''; 60 + 61 + installPhase = '' 62 + cp build/maple $out/bin/maple 63 + ''; 64 + }; 65 + in 66 + { 67 + packages = { 68 + inherit maple; 69 + 70 + default = maple; 71 + }; 72 + 73 + apps = { 74 + maple = { 75 + inherit meta; 76 + 77 + type = "app"; 78 + program = "${maple}/bin/maple"; 79 + }; 80 + 81 + default = self.apps.${system}.maple; 82 + }; 83 + 84 + devShells.default = import ./shell.nix { 85 + inherit pkgs; 86 + }; 87 + } 88 + ); 89 + }
+10
shell.nix
··· 1 + { 2 + pkgs ? import <nixpkgs> { }, 3 + }: 4 + pkgs.mkShell { 5 + buildInputs = with pkgs; [ 6 + libressl 7 + ninja 8 + clang 9 + ]; 10 + }