about summary refs log tree commit diff stats
path: root/modules/by-name/lf/lf/ctpv/prev/application/archive/default.nix
diff options
context:
space:
mode:
Diffstat (limited to 'modules/by-name/lf/lf/ctpv/prev/application/archive/default.nix')
-rw-r--r--modules/by-name/lf/lf/ctpv/prev/application/archive/default.nix89
1 files changed, 89 insertions, 0 deletions
diff --git a/modules/by-name/lf/lf/ctpv/prev/application/archive/default.nix b/modules/by-name/lf/lf/ctpv/prev/application/archive/default.nix
new file mode 100644
index 00000000..befed06c
--- /dev/null
+++ b/modules/by-name/lf/lf/ctpv/prev/application/archive/default.nix
@@ -0,0 +1,89 @@
+{pkgs, ...}: {
+  soispha.programs.lf.ctpv.previewers = {
+    atool = {
+      previewer = ./atool.sh;
+      matches.mime = [
+        "application/gzip"
+        "application/java-archive"
+        "application/vnd.debian.binary-package"
+        "application/x-7z-compressed"
+        "application/x-bzip2"
+        "application/x-rar"
+        "application/x-tar"
+        "application/x-xz"
+        "application/zip"
+        "application/zlib"
+      ];
+
+      matches.extension = [
+        "7z"
+        "Z"
+        "a"
+        "ace"
+        "alz"
+        "arc"
+        "arj"
+        "bz"
+        "bz2"
+        "cab"
+        "cpio"
+        "deb"
+        "gz"
+        "jar"
+        "lha"
+        "lrz"
+        "lz"
+        "lzh"
+        "lzma"
+        "lzo"
+        "rar"
+        "rpm"
+        "rz"
+        "t7z"
+        "tZ"
+        "tar"
+        "tar.7z"
+        "tar.Z"
+        "tar.bz"
+        "tar.bz2"
+        "tar.gz"
+        "tar.lz"
+        "tar.lzo"
+        "tar.xz"
+        "tbz"
+        "tbz2"
+        "tgz"
+        "tlz"
+        "txz"
+        "tzo"
+        "war"
+        "xz"
+        "zip"
+      ];
+      dependencies = [
+        pkgs.atool
+
+        # archive tools
+        pkgs.archiver # for arc
+        pkgs.arj
+        pkgs.cpio
+        pkgs.dpkg
+        pkgs.file
+        pkgs.gnutar
+        pkgs.gzip
+        pkgs.lzop
+        pkgs.p7zip
+        pkgs.pbzip2
+        pkgs.plzip
+        pkgs.rpm
+        pkgs.unzip
+        pkgs.xz
+        pkgs.zip
+
+        # Unfree stuff
+        # pkgs.lha
+        # pkgs.rar
+      ];
+    };
+  };
+}