mirror of
https://github.com/ilyakooo0/nixpkgs.git
synced 2024-12-26 12:53:59 +03:00
partclone, partimage. both are used by clonezilla and drbl (which I haven't packaged yet)
This commit is contained in:
parent
880a386c57
commit
87a579dd53
26
pkgs/tools/backup/partclone/default.nix
Normal file
26
pkgs/tools/backup/partclone/default.nix
Normal file
@ -0,0 +1,26 @@
|
||||
{stdenv, fetchurl
|
||||
, pkgconfig, libuuid
|
||||
, e2fsprogs
|
||||
}:
|
||||
stdenv.mkDerivation {
|
||||
name = "partclone-stable";
|
||||
enableParallelBuilding = true;
|
||||
|
||||
src = fetchurl {
|
||||
url = https://codeload.github.com/Thomas-Tsai/partclone/legacy.tar.gz/stable;
|
||||
sha256 = "0vvk6c26gf2wv5y0mxnz90bivgp84pi82qk5q5xkcz6nz3swals7";
|
||||
name = "Thomas-Tsai-partclone-stable-0-gab3bd53.tar.gz";
|
||||
};
|
||||
|
||||
buildInputs = [e2fsprogs pkgconfig libuuid];
|
||||
|
||||
installPhase = ''make INSTPREFIX=$out install'';
|
||||
|
||||
meta = {
|
||||
description = "Partclone provides utilities to save and restore used blocks on a partition and is designed for higher compatibility of the file system by using existing libraries, e.g. e2fslibs is used to read and write the ext2 partition";
|
||||
homepage = http://partclone.org;
|
||||
license = stdenv.lib.licenses.gpl2;
|
||||
maintainers = [stdenv.lib.maintainers.marcweber];
|
||||
platforms = stdenv.lib.platforms.linux;
|
||||
};
|
||||
}
|
29
pkgs/tools/backup/partimage/default.nix
Normal file
29
pkgs/tools/backup/partimage/default.nix
Normal file
@ -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;
|
||||
};
|
||||
}
|
33
pkgs/tools/backup/partimage/gentoos-zlib.patch
Normal file
33
pkgs/tools/backup/partimage/gentoos-zlib.patch
Normal file
@ -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;
|
@ -956,6 +956,10 @@ let
|
||||
|
||||
gzip = callPackage ../tools/compression/gzip { };
|
||||
|
||||
partclone = callPackage ../tools/backup/partclone { };
|
||||
|
||||
partimage = callPackage ../tools/backup/partimage { };
|
||||
|
||||
pigz = callPackage ../tools/compression/pigz { };
|
||||
|
||||
haproxy = callPackage ../tools/networking/haproxy { };
|
||||
|
Loading…
Reference in New Issue
Block a user