@@ -0,0 +1,42 @@
1+{ stdenv, fetchFromGitHub, fetchpatch, automake, autoreconfHook, libtool, fuse,
2+ pkgconfig, pcre, lz4, xz, zlib, lzo, zstd }:
3+
4+with stdenv.lib;
5+
6+stdenv.mkDerivation rec {
7+
8+ pname = "squashfuse";
9+ version = "0.1.101";
10+ rev = "371e4bee9caa254d842913df9bdbcc795c5b342c";
11+ short_rev = "${builtins.substring 0 7 rev}";
12+ name = "${pname}-${version}-${short_rev}";
13+
14+ meta = {
15+ description = "FUSE filesystem to mount squashfs archives";
16+ homepage = https://github.com/vasi/squashfuse;
17+ maintainers = [ maintainers.genesis ];
18+ platforms = platforms.linux;
19+ license = "BSD-2-Clause";
20+ };
21+
22+ # platforms.darwin should be supported : see PLATFORMS file in src.
23+ # we could use a nix fuseProvider, and let the derivation choose the OS
24+ # specific implementation.
25+
26+ src = fetchFromGitHub {
27+ owner = "vasi";
28+ repo = "${pname}";
29+ rev = "${rev}";
30+ sha256 = "0i9p8r1c128hzy0cwmga1x7q8zk7kw68mh8li5ipfz8zba60d7vz";
31+ };
32+
33+ patches = [
34+ (fetchpatch {
35+ url = "https://github.com/vasi/squashfuse/commit/0c44cb2abe402d6e352dd47ac8b7e7495c7c2a6f.patch";
36+ sha256 = "0z53p7pi3ap05n0bxhmka4sz12cw2cjjvc7xn9jppbyynfzx32m0";
37+ })
38+ ];
39+
40+ nativeBuildInputs = [ autoreconfHook libtool pkgconfig ];
41+ buildInputs = [ lz4 xz zlib lzo zstd fuse ];
42+}