about summary refs log tree commit diff
path: root/pkgs/tools/filesystems
diff options
context:
space:
mode:
authorAaron Andersen <aaron@fosslib.net>2019-09-15 10:16:38 -0400
committerGitHub <noreply@github.com>2019-09-15 10:16:38 -0400
commit6f24ec8827011a7b49391761185fb69624c2816a (patch)
tree1be53c75d141ce0c91b369a8d2719bfe4e1c8049 /pkgs/tools/filesystems
parentd4e8f7908d739123470eb16ee778d5de00c8cc51 (diff)
parentd25bf0495ccfca557c62672fef5e90b599a1dbdc (diff)
downloadnixlib-6f24ec8827011a7b49391761185fb69624c2816a.tar
nixlib-6f24ec8827011a7b49391761185fb69624c2816a.tar.gz
nixlib-6f24ec8827011a7b49391761185fb69624c2816a.tar.bz2
nixlib-6f24ec8827011a7b49391761185fb69624c2816a.tar.lz
nixlib-6f24ec8827011a7b49391761185fb69624c2816a.tar.xz
nixlib-6f24ec8827011a7b49391761185fb69624c2816a.tar.zst
nixlib-6f24ec8827011a7b49391761185fb69624c2816a.zip
Merge pull request #66600 from Pamplemousse/sasquatch
sasquatch: init
Diffstat (limited to 'pkgs/tools/filesystems')
-rw-r--r--pkgs/tools/filesystems/sasquatch/default.nix53
1 files changed, 53 insertions, 0 deletions
diff --git a/pkgs/tools/filesystems/sasquatch/default.nix b/pkgs/tools/filesystems/sasquatch/default.nix
new file mode 100644
index 000000000000..c393c65a7207
--- /dev/null
+++ b/pkgs/tools/filesystems/sasquatch/default.nix
@@ -0,0 +1,53 @@
+{ fetchFromGitHub
+, fetchurl
+, lz4 ? null
+, lz4Support ? false
+, lzma
+, lzo
+, stdenv
+, xz
+, zlib
+}:
+
+assert lz4Support -> (lz4 != null);
+
+let
+  patch = fetchFromGitHub {
+    owner = "devttys0";
+    repo = "sasquatch";
+    rev = "3e0cc40fc6dbe32bd3a5e6c553b3320d5d91ceed";
+    sha256 = "19lhndjv7v9w6nmszry63zh5rqii9v7wvsbpc2n6q606hyz955g2";
+  } + "/patches/patch0.txt";
+in
+stdenv.mkDerivation rec {
+  pname = "sasquatch";
+  version = "4.3";
+
+  src = fetchurl {
+    url = mirror://sourceforge/squashfs/squashfs4.3.tar.gz;
+    sha256 = "1xpklm0y43nd9i6jw43y2xh5zvlmj9ar2rvknh0bh7kv8c95aq0d";
+  };
+
+  buildInputs = [ lzma lzo xz zlib ]
+    ++ stdenv.lib.optional lz4Support lz4;
+
+  patches = [ patch ];
+  patchFlags = [ "-p0" ];
+
+  postPatch = ''
+    cd squashfs-tools
+  '';
+
+  installFlags = "INSTALL_DIR=\${out}/bin";
+
+  makeFlags = [ "XZ_SUPPORT=1" ]
+    ++ stdenv.lib.optional lz4Support "LZ4_SUPPORT=1";
+
+  meta = with stdenv.lib; {
+    homepage = "https://github.com/devttys0/sasquatch";
+    description = "Set of patches to the standard unsquashfs utility (part of squashfs-tools) that attempts to add support for as many hacked-up vendor-specific SquashFS implementations as possible";
+    license = licenses.gpl2Plus;
+    maintainers = [ maintainers.pamplemousse ];
+    platforms = platforms.linux;
+  };
+}