馃崄 A very simple static Gemini server, now with Titan support!
cpp
gemini
titan
gemini-protocol
titan-protocol
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.unix;
38 };
39
40 maple =
41 with pkgs;
42 (
43 if pkgs.stdenv.isDarwin then
44 pkgs.clangStdenvNoLibs
45 else
46 pkgs.stdenvAdapters.useMoldLinker pkgs.clangStdenvNoLibs
47 ).mkDerivation
48 {
49 inherit meta;
50
51 name = "maple";
52 version = "0.1.6";
53 src = lib.cleanSource ./.;
54
55 nativeBuildInputs = [
56 ninja
57 clang
58 ];
59
60 buildInputs = [
61 libressl.dev
62 ];
63
64 buildPhase = ''
65 mkdir -p $out/bin
66 ninja
67 '';
68
69 installPhase = ''
70 cp build/maple $out/bin/maple
71 '';
72 };
73 in
74 {
75 packages = {
76 inherit maple;
77
78 default = maple;
79 };
80
81 apps = {
82 maple = {
83 inherit meta;
84
85 type = "app";
86 program = "${maple}/bin/maple";
87 };
88
89 default = self.apps.${system}.maple;
90 };
91
92 devShells.default = import ./shell.nix {
93 inherit pkgs;
94 };
95 }
96 );
97}