summary refs log tree commit diff
path: root/pkgs/os-specific/linux/cramfsprogs/default.nix
diff options
context:
space:
mode:
Diffstat (limited to 'pkgs/os-specific/linux/cramfsprogs/default.nix')
-rw-r--r--pkgs/os-specific/linux/cramfsprogs/default.nix32
1 files changed, 32 insertions, 0 deletions
diff --git a/pkgs/os-specific/linux/cramfsprogs/default.nix b/pkgs/os-specific/linux/cramfsprogs/default.nix
new file mode 100644
index 00000000000..8633823ab5c
--- /dev/null
+++ b/pkgs/os-specific/linux/cramfsprogs/default.nix
@@ -0,0 +1,32 @@
+{ stdenv
+, fetchurl
+, zlib
+}:
+
+stdenv.mkDerivation rec {
+  pname = "cramfsprogs";
+  version = "1.1";
+
+  src = fetchurl {
+    url = "mirror://debian/pool/main/c/cramfs/cramfs_${version}.orig.tar.gz";
+    sha256 = "0s13sabykbkbp0pcw8clxddwzxckyq7ywm2ial343ip7qjiaqg0k";
+  };
+
+  # CramFs is unmaintained upstream: https://tracker.debian.org/pkg/cramfs.
+  # So patch the "missing include" bug ourselves.
+  patches = [ ./include-sysmacros.patch ];
+
+  installPhase = ''
+    install --target $out/bin -D cramfsck mkcramfs
+  '';
+
+  buildInputs = [ zlib ];
+
+  meta = with stdenv.lib; {
+    description = "Tools to create, check, and extract content of CramFs images";
+    homepage = "https://packages.debian.org/jessie/cramfsprogs";
+    license = licenses.gpl2;
+    maintainers = with maintainers; [ pamplemousse ];
+    platforms = platforms.linux;
+  };
+}