@@ -0,0 +1,32 @@
1+{ stdenv
2+, fetchurl
3+, zlib
4+}:
5+
6+stdenv.mkDerivation rec {
7+ pname = "cramfsprogs";
8+ version = "1.1";
9+
10+ src = fetchurl {
11+ url = "mirror://debian/pool/main/c/cramfs/cramfs_${version}.orig.tar.gz";
12+ sha256 = "0s13sabykbkbp0pcw8clxddwzxckyq7ywm2ial343ip7qjiaqg0k";
13+ };
14+
15+ # CramFs is unmaintained upstream: https://tracker.debian.org/pkg/cramfs.
16+ # So patch the "missing include" bug ourselves.
17+ patches = [ ./include-sysmacros.patch ];
18+
19+ installPhase = ''
20+ install --target $out/bin -D cramfsck mkcramfs
21+ '';
22+
23+ buildInputs = [ zlib ];
24+
25+ meta = with stdenv.lib; {
26+ description = "Tools to create, check, and extract content of CramFs images";
27+ homepage = "https://packages.debian.org/jessie/cramfsprogs";
28+ license = licenses.gpl2;
29+ maintainers = with maintainers; [ pamplemousse ];
30+ platforms = platforms.linux;
31+ };
32+}