]> git.immae.eu Git - perso/Immae/Config/Nix.git/blobdiff - flakes/peertube/default.nix
Refactor flakes using follows
[perso/Immae/Config/Nix.git] / flakes / peertube / default.nix
diff --git a/flakes/peertube/default.nix b/flakes/peertube/default.nix
new file mode 100644 (file)
index 0000000..8ba0c5f
--- /dev/null
@@ -0,0 +1,41 @@
+{ stdenv, lib, src, server, client }:
+stdenv.mkDerivation rec {
+  inherit (src) version;
+  pname = "peertube";
+  inherit src;
+  buildPhase = ''
+    ln -s ${server.modules}/node_modules .
+    rm -rf dist && cp -a ${server.dist}/dist dist
+    rm -rf client/dist && cp -a ${client.dist}/dist client/
+    '';
+  installPhase = ''
+    mkdir $out
+    cp -a * $out
+    ln -s /tmp $out/.cache
+    '';
+
+  meta = {
+    description = "A free software to take back control of your videos";
+
+    longDescription = ''
+      PeerTube aspires to be a decentralized and free/libre alternative to video
+      broadcasting services.
+      PeerTube is not meant to become a huge platform that would centralize
+      videos from all around the world. Rather, it is a network of
+      inter-connected small videos hosters.
+      Anyone with a modicum of technical skills can host a PeerTube server, aka
+      an instance. Each instance hosts its users and their videos. In this way,
+      every instance is created, moderated and maintained independently by
+      various administrators.
+      You can still watch from your account videos hosted by other instances
+      though if the administrator of your instance had previously connected it
+      with other instances.
+    '';
+
+    license = lib.licenses.agpl3Plus;
+
+    homepage = "https://joinpeertube.org/";
+
+    platforms = lib.platforms.unix;
+  };
+}