summary refs log tree commit diff
path: root/pkgs/tools/filesystems
diff options
context:
space:
mode:
authorJoachim F <joachifm@users.noreply.github.com>2016-09-16 11:22:09 +0200
committerGitHub <noreply@github.com>2016-09-16 11:22:09 +0200
commit0ffdb89d956c9daef80858c57040ffe2862164c6 (patch)
tree1c98b7df88cec4b7f42e265e0cbd81473154b13c /pkgs/tools/filesystems
parent321843426d4bdbbd8cb83dd8c63edb37ae924b97 (diff)
parent4653160057ceb2a44977c4378b175352409a62a4 (diff)
downloadnixlib-0ffdb89d956c9daef80858c57040ffe2862164c6.tar
nixlib-0ffdb89d956c9daef80858c57040ffe2862164c6.tar.gz
nixlib-0ffdb89d956c9daef80858c57040ffe2862164c6.tar.bz2
nixlib-0ffdb89d956c9daef80858c57040ffe2862164c6.tar.lz
nixlib-0ffdb89d956c9daef80858c57040ffe2862164c6.tar.xz
nixlib-0ffdb89d956c9daef80858c57040ffe2862164c6.tar.zst
nixlib-0ffdb89d956c9daef80858c57040ffe2862164c6.zip
Merge pull request #18628 from joachifm/squashfs-lz4
squashfsTools: optional lz4 support
Diffstat (limited to 'pkgs/tools/filesystems')
-rw-r--r--pkgs/tools/filesystems/squashfs/default.nix18
1 files changed, 13 insertions, 5 deletions
diff --git a/pkgs/tools/filesystems/squashfs/default.nix b/pkgs/tools/filesystems/squashfs/default.nix
index 5e1700af0178..a2fc5bc3d40b 100644
--- a/pkgs/tools/filesystems/squashfs/default.nix
+++ b/pkgs/tools/filesystems/squashfs/default.nix
@@ -1,21 +1,29 @@
-{ stdenv, fetchgit, zlib, xz }:
+{ stdenv, fetchFromGitHub, zlib, xz
+, lz4 ? null
+, lz4Support ? false
+}:
+
+assert lz4Support -> (lz4 != null);
 
 stdenv.mkDerivation rec {
   name = "squashfs-4.4dev";
 
-  src = fetchgit {
-    url = https://github.com/plougher/squashfs-tools.git;
+  src = fetchFromGitHub {
+    owner = "plougher";
+    repo = "squashfs-tools";
     sha256 = "059pa2shdysr3zfmwrhq28s12zbi5nyzbpzyaf5lmspgfh1493ks";
     rev = "9c1db6d13a51a2e009f0027ef336ce03624eac0d";
   };
 
-  buildInputs = [ zlib xz ];
+  buildInputs = [ zlib xz ]
+    ++ stdenv.lib.optional lz4Support lz4;
 
   preBuild = "cd squashfs-tools";
 
   installFlags = "INSTALL_DIR=\${out}/bin";
 
-  makeFlags = "XZ_SUPPORT=1";
+  makeFlags = [ "XZ_SUPPORT=1" ]
+    ++ stdenv.lib.optional lz4Support "LZ4_SUPPORT=1";
 
   meta = {
     homepage = http://squashfs.sourceforge.net/;