]> git.immae.eu Git - perso/Immae/Config/Nix.git/commitdiff
Add comment engine
authorIsmaël Bouya <ismael.bouya@normalesup.org>
Sun, 7 Jun 2020 16:46:27 +0000 (18:46 +0200)
committerIsmaël Bouya <ismael.bouya@normalesup.org>
Sun, 7 Jun 2020 17:13:09 +0000 (19:13 +0200)
modules/private/default.nix
modules/private/environment.nix
modules/private/websites/default.nix
modules/private/websites/immae/history/_posts/2020-06-06-Moteur-de-commentaires.md [new file with mode: 0644]
modules/private/websites/tools/commento/default.nix [new file with mode: 0644]
modules/private/websites/tools/tools/landing/config.yml
modules/private/websites/tools/tools/landing/icons/commento.svg [new file with mode: 0644]
pkgs/commento/default.nix [new file with mode: 0644]
pkgs/default.nix

index 21b98459367a47d7e7fc9b646d933b9a4d9b49e8..bcd6e233084b7feb16d5f64efa3d71f73edc33ac 100644 (file)
@@ -71,6 +71,7 @@ set = {
 
   # Tools
   cloudTool = ./websites/tools/cloud;
+  commentoTool = ./websites/tools/commento;
   davTool = ./websites/tools/dav;
   vpnTool = ./websites/tools/vpn;
   dbTool = ./websites/tools/db;
index ec9bf29f3c5d2736a2822482f2eed75b5cabd52a..82e39817190ac31cf6efccb979cba58824366a43 100644 (file)
@@ -108,6 +108,19 @@ let
       };
     };
   };
+  smtpOptions = {
+    host = mkOption { description = "Host to access SMTP"; type = str; };
+    port = mkOption { description = "Port to access SMTP"; type = str; };
+  };
+  mkSmtpOptions = name: mkOption {
+    description = "${name} smtp configuration";
+    type = submodule {
+      options = smtpOptions // {
+        email = mkOption { description = "${name} email"; type = str; };
+        password = mkOption { description = "SMTP password of the ${name} user"; type = str; };
+      };
+    };
+  };
   hostEnv = submodule {
     options = {
       fqdn = mkOption {
@@ -258,6 +271,10 @@ in
         };
       };
     };
+    smtp = mkOption {
+      type = submodule { options = smtpOptions; };
+      description = "SMTP configuration";
+    };
     ldap = mkOption {
       description = ''
         LDAP server configuration
@@ -1051,6 +1068,16 @@ in
             type = attrsOf str;
             description = "Mapping 'name'.php => script for webhooks";
           };
+          commento = mkOption {
+            description = "Commento configuration";
+            type = submodule {
+              options = {
+                listenPort = mkOption { type = port; description = "Port to listen to"; };
+                postgresql = mkPsqlOptions "Commento";
+                smtp = mkSmtpOptions "Commento";
+              };
+            };
+          };
           ympd = mkOption {
             description = "Ympd configuration";
             type = submodule {
index 27719cca5ef44608c087fb1fdf9f6b055ad50e95..d55d2dd933dd67540b1df709cec88a2d3a58a525 100644 (file)
@@ -284,6 +284,7 @@ in
       telio_tortay.production.enable = true;
 
       tools.cloud.enable = true;
+      tools.commento.enable = true;
       tools.dav.enable = true;
       tools.db.enable = true;
       tools.diaspora.enable = true;
diff --git a/modules/private/websites/immae/history/_posts/2020-06-06-Moteur-de-commentaires.md b/modules/private/websites/immae/history/_posts/2020-06-06-Moteur-de-commentaires.md
new file mode 100644 (file)
index 0000000..6778326
--- /dev/null
@@ -0,0 +1,9 @@
+---
+title: "Moteur de commentaires"
+category: Nouveautés
+date: 2020-06-06
+---
+Un [nouveau moteur de commentaires](https://commento.immae.eu) a été
+installé, pour obtenir une fonctionnalité similaire à des outils tels
+que disqus. Il est pour l’instant uilisé pour le
+[blog](https://www.immae.eu/blog) et le [livre de recettes](https://www.immae.eu/recettes)
diff --git a/modules/private/websites/tools/commento/default.nix b/modules/private/websites/tools/commento/default.nix
new file mode 100644 (file)
index 0000000..d0e7d24
--- /dev/null
@@ -0,0 +1,60 @@
+{ lib, pkgs, config, ... }:
+let
+  cfg = config.myServices.websites.tools.commento;
+  env = config.myEnv.tools.commento;
+  webPort = "${host}:${port}";
+  port = toString env.listenPort;
+  host = "localhost";
+  postgresql_url = "postgres://${env.postgresql.user}:${env.postgresql.password}@localhost:${env.postgresql.port}/${env.postgresql.database}?sslmode=disable";
+in
+{
+  options.myServices.websites.tools.commento = {
+    enable = lib.mkEnableOption "Enable commento website";
+  };
+  config = lib.mkIf cfg.enable {
+    secrets.keys = [
+      {
+        dest = "commento/env";
+        permission = "0400";
+        text = ''
+          COMMENTO_ORIGIN=https://commento.immae.eu/
+          COMMENTO_PORT=${port}
+          COMMENTO_POSTGRES=${postgresql_url}
+          COMMENTO_FORBID_NEW_OWNERS=true
+          COMMENTO_BIND_ADDRESS=${host}
+          COMMENTO_GZIP_STATIC=true
+          COMMENTO_SMTP_HOST=${env.smtp.host}
+          COMMENTO_SMTP_PORT=${env.smtp.port}
+          COMMENTO_SMTP_USERNAME=${env.smtp.email}
+          COMMENTO_SMTP_PASSWORD=${env.smtp.password}
+          COMMENTO_SMTP_FROM_ADDRESS=${env.smtp.email}
+        '';
+      }
+    ];
+
+    services.websites.env.tools.vhostConfs.commento = {
+      certName = "eldiron";
+      addToCerts = true;
+      hosts = [ "commento.immae.eu" ];
+      root = null;
+      extraConfig = [
+        ''
+          ProxyPass / http://${webPort}/
+          ProxyPassReverse / http://${webPort}/
+          ProxyPreserveHost On
+        ''
+      ];
+    };
+    systemd.services.commento = {
+      description = "Commento";
+      wantedBy = [ "multi-user.target" ];
+      requires = ["postgresql.service"];
+      after = ["network.target" "postgresql.service"];
+      serviceConfig = {
+        User = "wwwrun";
+        ExecStart = "${pkgs.commento}/commento";
+        EnvironmentFile = config.secrets.fullPaths."commento/env";
+      };
+    };
+  };
+}
index f3de6fcb8ce33e991fca5fb58138e184a5320f3d..e86dc199b114d77b1cf8ac058e635bec5dc00327 100644 (file)
@@ -71,6 +71,9 @@ services:
   - name: "Social"
     icon: "fas fa-users"
     items:
+      - name: "Commento"
+        logo: "assets/tools/commento.svg"
+        url: "https://commento.immae.eu"
       - name: "Diaspora"
         logo: "assets/tools/diaspora.png"
         url: "https://diaspora.immae.eu"
diff --git a/modules/private/websites/tools/tools/landing/icons/commento.svg b/modules/private/websites/tools/tools/landing/icons/commento.svg
new file mode 100644 (file)
index 0000000..39da47a
--- /dev/null
@@ -0,0 +1,10 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<svg viewBox="0 0 105.65 105.65" xmlns="http://www.w3.org/2000/svg">
+<g transform="translate(0) scale(2.113)" fill="#1e2127" name="monogram_container" rel="inversefill" xmlns:name="monogram_container_inversefill">
+<title xmlns="http://www.w3.org/2000/svg">assets</title>
+<circle cx="25" cy="25" r="25" xmlns="http://www.w3.org/2000/svg"/>
+</g>
+<g transform="translate(26.5 5.65)" fill="#fff" name="monogram" rel="symbolfill" xmlns:name="monogram_symbolfill">
+<path d="m13.95 46.575v0.225c-0.075 0.15-0.075 0.3-0.075 0.45 0 0.225 0.075 0.375 0.075 0.525v0.525s0 0.3 0.075 0.525c0 0.15 0 0.3 0.075 0.525 0 0.15 0 0.3 0.075 0.375 0 0.225 0.075 0.375 0.075 0.525s0.075 0.3 0.15 0.45c0.075 0.3 0.15 0.6 0.225 0.975l0.225 0.45c0 0.15 0.075 0.225 0.15 0.375 0.075 0.3 0.225 0.6 0.375 0.9 0.075 0.15 0.15 0.3 0.3 0.525 0.075 0.15 0.15 0.3 0.225 0.375 0.15 0.3 0.375 0.6 0.525 0.9l0.3 0.3c0.075 0.15 0.15 0.3 0.225 0.375 0.225 0.225 0.45 0.525 0.675 0.75l0.675 0.675c0.3 0.3 0.525 0.45 0.825 0.675 0.225 0.225 0.45 0.45 0.75 0.6 0.525 0.375 1.05 0.75 1.65 0.975 0.15 0.075 0.3 0.15 0.375 0.225 0.225 0.075 0.375 0.15 0.6 0.225 0.15 0.075 0.225 0.075 0.375 0.15s0.3 0.15 0.45 0.15c0.375 0.15 0.675 0.225 0.975 0.3s0.675 0.15 0.975 0.225 0.675 0.075 0.975 0.15c0.3 0 0.6 0.075 0.9 0.075h1.05c0.3 0 0.675 0 1.05-0.075 0.6-0.075 1.275-0.15 1.875-0.3s1.2-0.375 1.8-0.6c0.15-0.075 0.3-0.075 0.45-0.15s0.3-0.15 0.525-0.225h4.95c-0.075 0-0.15 0.075-0.15 0.15-0.075 0-0.15 0.075-0.225 0.15-0.45 0.375-0.975 0.75-1.5 1.125-0.225 0.15-0.525 0.3-0.825 0.45-0.3 0.225-0.6 0.375-0.9 0.525-0.075 0.075-0.225 0.075-0.375 0.15l-0.45 0.225c-0.3 0.15-0.6 0.225-0.9 0.375-0.3 0.075-0.6 0.225-0.9 0.3-0.225 0.075-0.375 0.075-0.525 0.15-0.15 0-0.3 0.075-0.45 0.075-0.15 0.075-0.3 0.075-0.525 0.15h-0.15c-0.15 0.075-0.225 0.075-0.375 0.075-0.3 0.075-0.6 0.075-0.975 0.15-0.6 0.075-1.275 0.075-1.95 0.075h-0.45-0.45c-0.3 0-0.675-0.075-0.975-0.075-0.375-0.075-0.675-0.15-1.05-0.15l-0.9-0.225c-0.375-0.075-0.675-0.225-1.05-0.3-0.225-0.075-0.525-0.225-0.825-0.3-0.6-0.225-1.2-0.525-1.8-0.75-0.3-0.15-0.6-0.3-0.825-0.525-0.3-0.15-0.6-0.3-0.825-0.525-0.15-0.075-0.3-0.15-0.375-0.225-0.15-0.075-0.3-0.225-0.375-0.3-0.15-0.075-0.225-0.15-0.375-0.225l-0.375-0.375c-0.525-0.375-0.975-0.825-1.425-1.35-0.075-0.075-0.225-0.225-0.3-0.375-0.15-0.075-0.225-0.225-0.375-0.375-0.225-0.225-0.375-0.525-0.6-0.75-0.075-0.15-0.225-0.3-0.3-0.45s-0.15-0.225-0.225-0.375c-0.075-0.075-0.15-0.225-0.225-0.375-0.15-0.15-0.225-0.3-0.3-0.45-0.15-0.3-0.3-0.525-0.45-0.825s-0.3-0.6-0.375-0.9c-0.15-0.375-0.3-0.675-0.375-0.975-0.075-0.15-0.15-0.3-0.15-0.45-0.075-0.15-0.075-0.3-0.15-0.45-0.075-0.3-0.15-0.6-0.225-0.975l-0.225-0.9c0-0.15 0-0.3-0.075-0.45v-0.3s-0.075-0.15-0.075-0.225v-0.45-0.525c-0.075-0.675-0.075-1.35 0-2.025s0.15-1.275 0.225-1.95l0.225-0.9s0.225-0.675 0.3-0.975c0-0.15 0.075-0.225 0.15-0.375 0.075-0.225 0.075-0.375 0.15-0.525 0.15-0.3 0.225-0.6 0.375-0.825l0.45-0.9c0.075-0.15 0.15-0.375 0.225-0.525s0.15-0.3 0.3-0.375l0.225-0.45s0.15-0.225 0.225-0.375 0.225-0.3 0.3-0.45c0.15-0.075 0.225-0.225 0.3-0.375 0.375-0.525 0.825-0.975 1.275-1.425 0.225-0.225 0.45-0.525 0.75-0.675 0.225-0.225 0.45-0.45 0.75-0.675 0.075-0.075 0.225-0.15 0.375-0.3 0.075-0.075 0.225-0.15 0.3-0.225 0.15-0.075 0.3-0.225 0.45-0.3 0.075-0.075 0.225-0.15 0.375-0.225 0.525-0.375 1.125-0.675 1.725-0.975l0.45-0.225c0.075 0 0.225-0.075 0.375-0.15 0.3-0.15 0.675-0.225 0.975-0.375 0.3-0.075 0.6-0.225 0.975-0.3 0.15 0 0.3-0.075 0.45-0.075 0.15-0.075 0.3-0.075 0.45-0.15 0.3-0.075 0.6-0.15 0.975-0.15 0.15 0 0.3-0.075 0.45-0.075 0.225 0 0.375-0.075 0.525-0.075 0.675-0.075 1.275-0.075 1.95-0.075 0.375 0 0.675 0.075 1.05 0.075 0.3 0 0.675 0.075 0.975 0.15 0.3 0 0.6 0.075 0.9 0.15 0.225 0 0.375 0.075 0.525 0.075 0.15 0.075 0.3 0.075 0.45 0.075 0.6 0.225 1.2 0.375 1.8 0.6 0.15 0.075 0.375 0.15 0.525 0.225l0.45 0.225s0.3 0.15 0.375 0.225l1.35 0.675c0.225 0.15 0.525 0.375 0.75 0.525 0.15 0.075 0.3 0.225 0.375 0.3 0.075 0 0.15 0.075 0.225 0.15 0.075 0 0.15 0.075 0.15 0.15 0.15 0.075 0.3 0.15 0.375 0.225 0.15 0.15 0.3 0.225 0.375 0.375h-4.875c-0.075 0-0.075 0-0.15-0.075-0.3-0.075-0.6-0.225-0.9-0.375-0.15-0.075-0.3-0.15-0.525-0.15-0.15-0.075-0.3-0.15-0.45-0.15-0.3-0.15-0.6-0.225-0.9-0.3s-0.675-0.075-0.975-0.15c-0.675-0.15-1.35-0.15-2.025-0.225-0.6 0-1.275 0-1.875 0.15-0.675 0.075-1.35 0.15-1.95 0.375-0.375 0.075-0.675 0.15-0.975 0.3-0.15 0-0.3 0.075-0.45 0.15-0.15 0-0.225 0.075-0.375 0.15-0.225 0.075-0.375 0.15-0.6 0.225-0.075 0.075-0.225 0.15-0.375 0.225-0.3 0.15-0.6 0.3-0.9 0.525-0.225 0.15-0.525 0.3-0.75 0.45-0.225 0.225-0.525 0.375-0.75 0.6-0.15 0.075-0.225 0.225-0.375 0.3-0.15 0.15-0.3 0.225-0.375 0.375-0.3 0.225-0.525 0.45-0.75 0.75-0.225 0.225-0.375 0.45-0.6 0.675-0.075 0.15-0.15 0.225-0.3 0.375-0.075 0.15-0.15 0.225-0.3 0.375l-0.225 0.45c-0.075 0.075-0.15 0.225-0.225 0.375s-0.225 0.225-0.3 0.375c-0.075 0.225-0.15 0.375-0.225 0.6-0.075 0.075-0.15 0.225-0.15 0.3-0.075 0.15-0.225 0.3-0.225 0.525-0.15 0.3-0.3 0.6-0.375 0.9s-0.225 0.6-0.3 0.975c0 0.15-0.075 0.225-0.075 0.375-0.075 0.15-0.075 0.375-0.075 0.525-0.075 0.15-0.075 0.3-0.075 0.45-0.075 0.225-0.075 0.375-0.075 0.525-0.075 0.3-0.075 0.675-0.075 0.975zm28.8 13.125h9.9s-0.075 0.15-0.075 0.225c-0.15 0.225-0.3 0.525-0.45 0.75-0.15 0.3-0.3 0.6-0.45 0.825-0.075 0.15-0.225 0.3-0.3 0.45-0.075 0.075-0.15 0.225-0.225 0.375s-0.15 0.225-0.225 0.375c-0.15 0.15-0.225 0.225-0.3 0.375s-0.15 0.3-0.3 0.375c0 0.075-0.075 0.15-0.075 0.225-0.075 0-0.075 0.075-0.075 0.075l-0.075 0.075c0 0.075-0.075 0.075-0.075 0.075 0 0.075-0.075 0.075-0.075 0.15l-0.15 0.15c-0.075 0.15-0.225 0.3-0.3 0.45-0.45 0.45-0.825 0.975-1.275 1.425-0.225 0.225-0.45 0.45-0.6 0.675-0.3 0.225-0.525 0.45-0.825 0.75-0.45 0.375-0.9 0.825-1.425 1.2-0.45 0.375-0.975 0.825-1.5 1.125-0.15 0.15-0.375 0.3-0.525 0.45-0.075 0-0.225 0.075-0.3 0.15-0.3 0.225-0.6 0.375-0.9 0.6-0.6 0.3-1.2 0.675-1.8 0.975s-1.2 0.525-1.8 0.825c-0.525 0.225-1.125 0.45-1.725 0.675-0.6 0.15-1.275 0.375-1.875 0.525-0.375 0.075-0.675 0.15-1.05 0.3-0.15 0-0.3 0.075-0.45 0.075-0.225 0-0.375 0.075-0.6 0.075-0.6 0.15-1.275 0.225-1.95 0.3-0.6 0.075-1.275 0.15-1.875 0.15-0.675 0.075-1.275 0.075-1.95 0.075-0.3-0.075-0.675-0.075-0.975-0.075-0.375 0-0.75-0.075-1.125-0.075-0.15 0-0.3-0.075-0.45-0.075s-0.375-0.075-0.525-0.075c-0.375 0-0.675-0.075-1.05-0.15-0.6-0.075-1.275-0.225-1.875-0.375s-1.2-0.375-1.8-0.525c-0.3-0.15-0.6-0.225-0.9-0.3-0.375-0.15-0.675-0.3-0.975-0.375-0.3-0.15-0.675-0.3-0.975-0.45-0.15-0.075-0.3-0.075-0.375-0.15-0.225-0.15-0.375-0.225-0.6-0.3-0.6-0.3-1.125-0.6-1.725-0.9-0.525-0.375-1.05-0.675-1.575-1.05l-1.575-1.125c-0.225-0.225-0.525-0.45-0.825-0.675-0.225-0.225-0.45-0.45-0.75-0.675-0.225-0.225-0.525-0.45-0.75-0.75-0.225-0.15-0.375-0.375-0.6-0.6-0.45-0.45-0.9-0.975-1.275-1.425-0.225-0.3-0.45-0.525-0.6-0.75-0.225-0.225-0.375-0.525-0.6-0.75-0.15-0.225-0.3-0.525-0.525-0.825-0.075-0.075-0.15-0.225-0.225-0.375s-0.225-0.3-0.3-0.45c-0.15-0.225-0.3-0.45-0.45-0.75-0.075-0.15-0.15-0.225-0.225-0.375s-0.15-0.3-0.225-0.375c-0.3-0.6-0.6-1.2-0.825-1.725l-0.225-0.45c0-0.15-0.15-0.375-0.15-0.525l-0.225-0.45c0-0.15-0.075-0.3-0.15-0.45-0.225-0.6-0.375-1.2-0.6-1.8l-0.225-0.9c-0.075-0.375-0.15-0.675-0.225-0.975s-0.15-0.675-0.225-1.05c0-0.3-0.075-0.6-0.15-0.9-0.075-0.675-0.15-1.35-0.15-2.025-0.075-0.6-0.075-1.275-0.075-1.875 0-0.675 0-1.35 0.075-2.025 0-0.3 0.075-0.675 0.075-0.975 0.075-0.3 0.075-0.675 0.15-0.975s0.075-0.675 0.15-0.975c0-0.15 0.075-0.225 0.075-0.375 0-0.225 0.075-0.375 0.075-0.525 0.075-0.075 0.075-0.15 0.075-0.225s0.075-0.15 0.075-0.3 0.075-0.3 0.075-0.375c0.075-0.375 0.225-0.675 0.3-0.975 0.15-0.675 0.375-1.35 0.6-1.95s0.45-1.2 0.75-1.725l0.225-0.45c0-0.075 0.075-0.15 0.075-0.3 0.075 0 0.075 0 0.075-0.075l0.075-0.075v-0.15s0.075 0 0.075-0.075 0.075-0.15 0.15-0.225c0.075-0.15 0.075-0.3 0.15-0.375 0.15-0.3 0.3-0.525 0.45-0.825s0.375-0.525 0.525-0.825c0.075-0.15 0.15-0.225 0.225-0.375 0.15-0.15 0.225-0.3 0.3-0.45s0.225-0.225 0.3-0.375 0.15-0.225 0.225-0.375c0.225-0.225 0.375-0.525 0.6-0.75 0.15-0.225 0.375-0.45 0.6-0.75 0.15-0.225 0.375-0.45 0.6-0.675 0.225-0.3 0.45-0.525 0.675-0.75l0.3-0.3c0.075-0.15 0.225-0.225 0.3-0.3 0.225-0.225 0.45-0.45 0.75-0.675l1.575-1.35c0.225-0.225 0.525-0.375 0.825-0.6 0.225-0.225 0.525-0.375 0.825-0.6 0.525-0.375 1.125-0.675 1.65-0.975 0.525-0.375 1.125-0.6 1.65-0.9 0.3-0.15 0.6-0.3 0.9-0.375 0.3-0.15 0.6-0.3 0.975-0.45 0.3-0.15 0.6-0.225 0.975-0.375 0.3-0.075 0.6-0.225 0.975-0.3 0.6-0.225 1.275-0.375 1.95-0.525 0.6-0.15 1.2-0.3 1.8-0.375 0.675-0.15 1.275-0.225 1.95-0.3 0.3 0 0.675-0.075 1.05-0.075h0.975 1.05 1.05c0.3 0.075 0.6 0.075 0.975 0.075 0.3 0.075 0.6 0.075 0.9 0.15 0.6 0.075 1.275 0.15 1.875 0.3 0.675 0.075 1.35 0.225 2.025 0.45 0.15 0 0.3 0.075 0.45 0.075 0.15 0.075 0.3 0.15 0.45 0.15 0.375 0.15 0.75 0.225 1.05 0.375 0.075 0 0.225 0.075 0.3 0.075l0.675 0.225c0.3 0.15 0.525 0.3 0.825 0.375 0.6 0.3 1.125 0.525 1.725 0.825 0.525 0.3 1.125 0.6 1.725 0.975 0.3 0.15 0.6 0.375 0.9 0.6 0.225 0.15 0.525 0.375 0.825 0.525 0.075 0.075 0.225 0.15 0.3 0.225 0.225 0.15 0.375 0.3 0.525 0.45 0.3 0.15 0.525 0.375 0.75 0.6 0.525 0.375 0.975 0.825 1.425 1.2 0.15 0.15 0.3 0.3 0.375 0.45 0.15 0.075 0.225 0.15 0.3 0.3 0.225 0.15 0.45 0.375 0.675 0.6 0.225 0.3 0.45 0.525 0.6 0.75 0.225 0.3 0.45 0.525 0.675 0.825 0.15 0.225 0.375 0.45 0.525 0.675 0.225 0.3 0.375 0.525 0.6 0.75 0.3 0.6 0.675 1.125 0.975 1.65 0.15 0.3 0.375 0.525 0.45 0.825 0.075 0.15 0.15 0.225 0.225 0.375 0.075 0.075 0.075 0.15 0.15 0.225 0 0.075 0.075 0.15 0.075 0.225h-9.9l-0.3-0.3c-0.075-0.15-0.15-0.225-0.3-0.375-0.15-0.225-0.375-0.45-0.6-0.675-0.45-0.375-0.975-0.825-1.425-1.275-0.15-0.075-0.225-0.15-0.375-0.3-0.15-0.075-0.225-0.15-0.375-0.225-0.3-0.225-0.525-0.375-0.825-0.6-0.15-0.075-0.225-0.15-0.375-0.225s-0.225-0.15-0.375-0.225c-0.3-0.15-0.6-0.375-0.9-0.525-0.6-0.3-1.125-0.6-1.725-0.825-0.3-0.075-0.6-0.225-0.9-0.3-0.375-0.15-0.675-0.225-0.975-0.3-0.3-0.15-0.6-0.225-0.975-0.3-0.3-0.075-0.675-0.15-0.975-0.225l-2.025-0.225s-1.35-0.075-1.95-0.075c-0.375 0-0.675 0.075-0.975 0.075s-0.6 0.075-0.975 0.075c-0.6 0.075-1.275 0.15-1.875 0.3s-1.275 0.3-1.875 0.525-1.275 0.45-1.875 0.75l-1.8 0.9c-0.075 0.075-0.15 0.075-0.225 0.15 0 0-0.075 0.075-0.15 0.075-0.075 0.075-0.225 0.15-0.375 0.3-0.15 0.075-0.3 0.15-0.375 0.225-0.15 0.075-0.3 0.15-0.375 0.3-0.525 0.375-1.05 0.75-1.575 1.2-0.45 0.375-0.9 0.825-1.275 1.275-0.45 0.45-0.9 0.975-1.275 1.5-0.375 0.45-0.75 0.975-1.05 1.5-0.375 0.6-0.75 1.2-0.975 1.8l-0.45 0.9c-0.075 0.15-0.15 0.3-0.15 0.45l-0.225 0.45c-0.15 0.6-0.375 1.125-0.525 1.8-0.15 0.6-0.3 1.275-0.45 1.95-0.075 0.6-0.15 1.275-0.15 1.95-0.075 0.375-0.075 0.675-0.075 0.975s0 0.6 0.075 0.975c0 0.6 0.075 1.275 0.15 1.95s0.225 1.275 0.375 1.95 0.375 1.275 0.6 1.875c0.075 0.15 0.15 0.3 0.15 0.45l0.225 0.45c0.075 0.3 0.225 0.6 0.375 0.9l0.225 0.45s0.15 0.225 0.225 0.375c0.15 0.3 0.3 0.6 0.45 0.825 0.375 0.6 0.75 1.125 1.125 1.65s0.825 0.975 1.275 1.425c0.15 0.225 0.375 0.45 0.6 0.675l0.3 0.3c0.15 0.15 0.3 0.225 0.375 0.375 0.225 0.225 0.525 0.375 0.75 0.6s0.525 0.375 0.75 0.6c0.525 0.3 0.975 0.675 1.5 0.975 0.6 0.3 1.2 0.675 1.8 0.9 0.6 0.3 1.2 0.525 1.875 0.75 0.6 0.225 1.2 0.375 1.875 0.525 0.3 0.15 0.675 0.15 1.05 0.225 0.3 0.075 0.6 0.15 0.9 0.15 0.375 0.075 0.675 0.075 0.975 0.15h0.45 0.45 2.025c0.3-0.075 0.675-0.075 0.975-0.15 0.3 0 0.6-0.075 0.975-0.075 0.6-0.15 1.275-0.3 1.875-0.45 0.375-0.15 0.675-0.225 0.975-0.3 0.15-0.075 0.375-0.15 0.525-0.225 0.15 0 0.3-0.075 0.45-0.15 0.3-0.15 0.6-0.225 0.9-0.375l0.9-0.45c0.6-0.3 1.125-0.6 1.65-0.975 0.3-0.15 0.525-0.375 0.825-0.525 0.075-0.075 0.225-0.225 0.375-0.3 0.075-0.075 0.225-0.225 0.375-0.3 0.45-0.375 0.975-0.825 1.425-1.275s0.825-0.9 1.275-1.35z"/>
+</g>
+</svg>
diff --git a/pkgs/commento/default.nix b/pkgs/commento/default.nix
new file mode 100644 (file)
index 0000000..6361583
--- /dev/null
@@ -0,0 +1,20 @@
+{ stdenv, fetchurl, patchelfUnstable, autoPatchelfHook }:
+stdenv.mkDerivation rec {
+  pname = "commento";
+  version = "v1.8.0";
+  name = "${pname}-${version}";
+  src = fetchurl {
+    url = "https://dl.commento.io/release/${name}-linux-glibc-amd64.tar.gz";
+    sha256 = "1j88b16hdx3i8nsq56581cscij65slgbsa6yfj73ybbg1585axxs";
+  };
+  phases = [ "unpackPhase" "installPhase" "fixupPhase" ];
+  unpackPhase = ''
+    tar --one-top-level=${name} -xf "$src"
+  '';
+  installPhase = ''
+    cp -a ${name} $out
+  '';
+  postFixup = ''
+    ${patchelfUnstable}/bin/patchelf --set-interpreter "$(cat $NIX_CC/nix-support/dynamic-linker)" $out/commento
+  '';
+}
index 3b0e9377217942315bffbf78d9d9356d7886a4a2..03fee4f99add7442192dc0e33c3c2cd3b1862777 100644 (file)
@@ -8,6 +8,7 @@ rec {
   myEnvironments = callPackage ../environments {};
   boinctui = callPackage ./boinctui {};
   cnagios = callPackage ./cnagios { inherit mylibs; };
+  commento = callPackage ./commento {};
   duply = callPackage ./duply {};
   flrn = callPackage ./flrn { inherit mylibs; slang = callPackage ./slang_1 {}; };
   genius = callPackage ./genius {};