1{lib, stdenv
2, fetchurl
3, fetchpatch
4, bzip2
5, zlib
6, newt
7, openssl
8, pkg-config
9, slang
10, autoreconfHook
11}:
12stdenv.mkDerivation rec {
13 pname = "partimage";
14 version = "0.6.9";
15
16 enableParallelBuilding = true;
17
18 src = fetchurl {
19 url = "mirror://sourceforge/partimage/partimage-${version}.tar.bz2";
20 sha256 = "0db6xiphk6xnlpbxraiy31c5xzj0ql6k4rfkmqzh665yyj0nqfkm";
21 };
22
23 configureFlags = [ "--with-ssl-headers=${openssl.dev}/include/openssl" ];
24
25 nativeBuildInputs = [ pkg-config autoreconfHook ];
26 buildInputs = [ bzip2 zlib newt newt openssl slang ];
27
28 patches = [
29 ./gentoos-zlib.patch
30 (fetchpatch {
31 name = "openssl-1.1.patch";
32 url = "https://gitweb.gentoo.org/repo/gentoo.git/plain/sys-block/partimage/files/"
33 + "partimage-0.6.9-openssl-1.1-compatibility.patch?id=3fe8e9910002b6523d995512a646b063565d0447";
34 sha256 = "1hs0krxrncxq1w36bhad02yk8yx71zcfs35cw87c82sl2sfwasjg";
35 })
36 (fetchpatch {
37 url = "https://sources.debian.org/data/main/p/partimage/0.6.9-8/debian/patches/04-fix-FTBFS-glic-2.28.patch";
38 sha256 = "0xid5636g58sxbhxnjmfjdy7y8rf3c77zmmpfbbqv4lv9jd2gmxm";
39 })
40 ];
41
42 meta = {
43 description = "Opensource disk backup software";
44 homepage = "http://www.partimage.org";
45 license = lib.licenses.gpl2;
46 maintainers = [lib.maintainers.marcweber];
47 platforms = lib.platforms.linux;
48 };
49}