summary refs log tree commit diff
path: root/pkgs/tools/backup/partimage
diff options
context:
space:
mode:
authorMarc Weber <marco-oweber@gmx.de>2013-05-16 11:41:58 +0200
committerMarc Weber <marco-oweber@gmx.de>2013-05-16 17:18:11 +0200
commit87a579dd537575abeb668f9eed98f0f00f7f39d2 (patch)
tree328e316963fc31ef1e4e36b7016cf6a5b0967528 /pkgs/tools/backup/partimage
parent880a386c5793269a30e052521b60bdf60b09a406 (diff)
downloadnixpkgs-87a579dd537575abeb668f9eed98f0f00f7f39d2.tar
nixpkgs-87a579dd537575abeb668f9eed98f0f00f7f39d2.tar.gz
nixpkgs-87a579dd537575abeb668f9eed98f0f00f7f39d2.tar.bz2
nixpkgs-87a579dd537575abeb668f9eed98f0f00f7f39d2.tar.lz
nixpkgs-87a579dd537575abeb668f9eed98f0f00f7f39d2.tar.xz
nixpkgs-87a579dd537575abeb668f9eed98f0f00f7f39d2.tar.zst
nixpkgs-87a579dd537575abeb668f9eed98f0f00f7f39d2.zip
partclone, partimage. both are used by clonezilla and drbl (which I haven't packaged yet)
Diffstat (limited to 'pkgs/tools/backup/partimage')
-rw-r--r--pkgs/tools/backup/partimage/default.nix29
-rw-r--r--pkgs/tools/backup/partimage/gentoos-zlib.patch33
2 files changed, 62 insertions, 0 deletions
diff --git a/pkgs/tools/backup/partimage/default.nix b/pkgs/tools/backup/partimage/default.nix
new file mode 100644
index 00000000000..d06ef2c8366
--- /dev/null
+++ b/pkgs/tools/backup/partimage/default.nix
@@ -0,0 +1,29 @@
+{stdenv, fetchurl, bzip2, zlib, newt, openssl, pkgconfig, slang
+, automake, autoconf, libtool, gettext
+}:
+stdenv.mkDerivation {
+  name = "partimage-0.6.9";
+  enableParallelBuilding = true;
+
+  src = fetchurl {
+    url = http://sourceforge.net/projects/partimage/files/stable/0.6.9/partimage-0.6.9.tar.bz2;
+    sha256 = "0db6xiphk6xnlpbxraiy31c5xzj0ql6k4rfkmqzh665yyj0nqfkm";
+  };
+  configureFlags = "--with-ssl-headers=${openssl}/include/openssl";
+
+  buildInputs = [bzip2 zlib newt newt openssl pkgconfig slang
+    # automake autoconf libtool gettext
+  ];
+
+  patches = [
+    ./gentoos-zlib.patch
+  ];
+
+  meta = {
+    description = "opensource disk backup software";
+    homepage = http://www.partimage.org;
+    license = stdenv.lib.licenses.gpl2;
+    maintainers = [stdenv.lib.maintainers.marcweber];
+    platforms = stdenv.lib.platforms.linux;
+  };
+}
diff --git a/pkgs/tools/backup/partimage/gentoos-zlib.patch b/pkgs/tools/backup/partimage/gentoos-zlib.patch
new file mode 100644
index 00000000000..05150e131e3
--- /dev/null
+++ b/pkgs/tools/backup/partimage/gentoos-zlib.patch
@@ -0,0 +1,33 @@
+http://bugs.gentoo.org/405323
+
+--- a/src/client/imagefile.cpp
++++ b/src/client/imagefile.cpp
+@@ -783,7 +783,7 @@
+   else if (m_options.dwCompression == COMPRESS_GZIP) // Gzip compression
+     {
+       showDebug(1, "open gzip\n");
+-      m_gzImageFile = (gzFile *) gzdopen(m_nFdImage, "wb"); //"wb1h");
++      m_gzImageFile = gzdopen(m_nFdImage, "wb"); //"wb1h");
+       if (m_gzImageFile == NULL)
+ 	{
+ 	  showDebug(1, "error:%d %s\n", errno, strerror(errno));
+@@ -1098,7 +1098,7 @@
+     }
+   else if (m_options.dwCompression == COMPRESS_GZIP) // Gzip compression
+     {
+-      m_gzImageFile = (gzFile *) gzdopen(m_nFdImage, "rb");
++      m_gzImageFile = gzdopen(m_nFdImage, "rb");
+       if (m_gzImageFile == NULL)
+         THROW(ERR_ERRNO, errno);
+       else
+--- a/src/client/imagefile.h
++++ b/src/client/imagefile.h
+@@ -41,7 +41,7 @@
+   COptions m_options;
+ 
+   FILE *m_fImageFile;
+-  gzFile *m_gzImageFile;
++  gzFile m_gzImageFile;
+   BZFILE *m_bzImageFile;
+ 
+   int m_nFdImage;