lol

Merge pull request #179425 from McSinyx/phylactery

phylactery: init at 0.1.1

authored by

ckie and committed by
GitHub
a8c2879f be443e9a

+102
+1
nixos/modules/module-list.nix
··· 1082 1082 ./services/web-apps/nexus.nix 1083 1083 ./services/web-apps/nifi.nix 1084 1084 ./services/web-apps/node-red.nix 1085 + ./services/web-apps/phylactery.nix 1085 1086 ./services/web-apps/pict-rs.nix 1086 1087 ./services/web-apps/peertube.nix 1087 1088 ./services/web-apps/plantuml-server.nix
+51
nixos/modules/services/web-apps/phylactery.nix
··· 1 + { config, lib, pkgs, ... }: 2 + 3 + with lib; 4 + let cfg = config.services.phylactery; 5 + in { 6 + options.services.phylactery = { 7 + enable = mkEnableOption "Whether to enable Phylactery server"; 8 + 9 + host = mkOption { 10 + type = types.str; 11 + default = "localhost"; 12 + description = "Listen host for Phylactery"; 13 + }; 14 + 15 + port = mkOption { 16 + type = types.port; 17 + description = "Listen port for Phylactery"; 18 + }; 19 + 20 + library = mkOption { 21 + type = types.path; 22 + description = "Path to CBZ library"; 23 + }; 24 + 25 + package = mkOption { 26 + type = types.package; 27 + default = pkgs.phylactery; 28 + defaultText = literalExpression "pkgs.phylactery"; 29 + description = "The Phylactery package to use"; 30 + }; 31 + }; 32 + 33 + config = mkIf cfg.enable { 34 + systemd.services.phylactery = { 35 + environment = { 36 + PHYLACTERY_ADDRESS = "${cfg.host}:${toString cfg.port}"; 37 + PHYLACTERY_LIBRARY = "${cfg.library}"; 38 + }; 39 + 40 + wantedBy = [ "multi-user.target" ]; 41 + 42 + serviceConfig = { 43 + ConditionPathExists = cfg.library; 44 + DynamicUser = true; 45 + ExecStart = "${cfg.package}/bin/phylactery"; 46 + }; 47 + }; 48 + }; 49 + 50 + meta.maintainers = with maintainers; [ McSinyx ]; 51 + }
+1
nixos/tests/all-tests.nix
··· 426 426 php = handleTest ./php {}; 427 427 php80 = handleTest ./php { php = pkgs.php80; }; 428 428 php81 = handleTest ./php { php = pkgs.php81; }; 429 + phylactery = handleTest ./web-apps/phylactery.nix {}; 429 430 pict-rs = handleTest ./pict-rs.nix {}; 430 431 pinnwand = handleTest ./pinnwand.nix {}; 431 432 plasma5 = handleTest ./plasma5.nix {};
+20
nixos/tests/web-apps/phylactery.nix
··· 1 + import ../make-test-python.nix ({ pkgs, lib, ... }: { 2 + name = "phylactery"; 3 + 4 + nodes.machine = { ... }: { 5 + services.phylactery = rec { 6 + enable = true; 7 + port = 8080; 8 + library = "/tmp"; 9 + }; 10 + }; 11 + 12 + testScript = '' 13 + start_all() 14 + machine.wait_for_unit('phylactery') 15 + machine.wait_for_open_port(8080) 16 + machine.wait_until_succeeds('curl localhost:8080') 17 + ''; 18 + 19 + meta.maintainers = with lib.maintainers; [ McSinyx ]; 20 + })
+27
pkgs/servers/web-apps/phylactery/default.nix
··· 1 + { lib, buildGoPackage, fetchFromSourcehut, nixosTests }: 2 + 3 + buildGoPackage rec { 4 + pname = "phylactery"; 5 + version = "0.1.1"; 6 + 7 + goPackagePath = "git.sr.ht/~cnx/phylactery"; 8 + 9 + src = fetchFromSourcehut { 10 + owner = "~cnx"; 11 + repo = pname; 12 + rev = version; 13 + sha256 = "sha256-HcpdPQ1WOMFNdfsZb//GvUVBCbmS3jARbcXjchlv2oE="; 14 + }; 15 + 16 + # Upstream repo doesn't provide any test. 17 + doCheck = false; 18 + passthru.tests.phylactery = nixosTests.phylactery; 19 + 20 + meta = with lib; { 21 + description = "Old school comic web server"; 22 + homepage = "https://git.sr.ht/~cnx/phylactery"; 23 + license = licenses.agpl3Plus; 24 + maintainers = with maintainers; [ McSinyx ]; 25 + platforms = platforms.all; 26 + }; 27 + }
+2
pkgs/top-level/all-packages.nix
··· 29313 29313 29314 29314 phrase-cli = callPackage ../tools/misc/phrase-cli { }; 29315 29315 29316 + phylactery = callPackage ../servers/web-apps/phylactery { }; 29317 + 29316 29318 pianobar = callPackage ../applications/audio/pianobar { }; 29317 29319 29318 29320 pianobooster = qt5.callPackage ../applications/audio/pianobooster { stdenv = gcc10StdenvCompat; };