summary refs log tree commit diff
path: root/pkgs/tools/filesystems/squashfs
diff options
context:
space:
mode:
authorJoachim Fasting <joachifm@fastmail.fm>2016-09-13 01:08:09 +0200
committerJoachim Fasting <joachifm@fastmail.fm>2016-09-15 15:37:03 +0200
commit4653160057ceb2a44977c4378b175352409a62a4 (patch)
treee8188b142af11be9b2b310c45e8b09e39a16ef4a /pkgs/tools/filesystems/squashfs
parenta9fa582c5bd6f64b2e55168057f17a1cccf33f38 (diff)
downloadnixpkgs-4653160057ceb2a44977c4378b175352409a62a4.tar
nixpkgs-4653160057ceb2a44977c4378b175352409a62a4.tar.gz
nixpkgs-4653160057ceb2a44977c4378b175352409a62a4.tar.bz2
nixpkgs-4653160057ceb2a44977c4378b175352409a62a4.tar.lz
nixpkgs-4653160057ceb2a44977c4378b175352409a62a4.tar.xz
nixpkgs-4653160057ceb2a44977c4378b175352409a62a4.tar.zst
nixpkgs-4653160057ceb2a44977c4378b175352409a62a4.zip
squashfsTools: optional lz4 support
Diffstat (limited to 'pkgs/tools/filesystems/squashfs')
-rw-r--r--pkgs/tools/filesystems/squashfs/default.nix13
1 files changed, 10 insertions, 3 deletions
diff --git a/pkgs/tools/filesystems/squashfs/default.nix b/pkgs/tools/filesystems/squashfs/default.nix
index c43eb059976..a2fc5bc3d40 100644
--- a/pkgs/tools/filesystems/squashfs/default.nix
+++ b/pkgs/tools/filesystems/squashfs/default.nix
@@ -1,4 +1,9 @@
-{ stdenv, fetchFromGitHub, zlib, xz }:
+{ stdenv, fetchFromGitHub, zlib, xz
+, lz4 ? null
+, lz4Support ? false
+}:
+
+assert lz4Support -> (lz4 != null);
 
 stdenv.mkDerivation rec {
   name = "squashfs-4.4dev";
@@ -10,13 +15,15 @@ stdenv.mkDerivation rec {
     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/;