about summary refs log tree commit diff
path: root/nixpkgs/pkgs/tools/backup/partimage/default.nix
blob: afb8489e1f429101815f94eefa50035853497d21 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
{lib, stdenv
, fetchurl
, fetchpatch
, bzip2
, zlib
, newt
, openssl
, pkg-config
, slang
, autoreconfHook
}:
stdenv.mkDerivation rec {
  pname = "partimage";
  version = "0.6.9";

  enableParallelBuilding = true;

  src = fetchurl {
    url = "mirror://sourceforge/partimage/partimage-${version}.tar.bz2";
    sha256 = "0db6xiphk6xnlpbxraiy31c5xzj0ql6k4rfkmqzh665yyj0nqfkm";
  };

  configureFlags = [ "--with-ssl-headers=${openssl.dev}/include/openssl" ];

  nativeBuildInputs = [ pkg-config autoreconfHook ];
  buildInputs = [ bzip2 zlib newt newt openssl slang ];

  patches = [
    ./gentoos-zlib.patch
    (fetchpatch {
      name = "openssl-1.1.patch";
      url = "https://gitweb.gentoo.org/repo/gentoo.git/plain/sys-block/partimage/files/"
        + "partimage-0.6.9-openssl-1.1-compatibility.patch?id=3fe8e9910002b6523d995512a646b063565d0447";
      sha256 = "1hs0krxrncxq1w36bhad02yk8yx71zcfs35cw87c82sl2sfwasjg";
    })
    (fetchpatch {
      url = "https://sources.debian.org/data/main/p/partimage/0.6.9-8/debian/patches/04-fix-FTBFS-glic-2.28.patch";
      sha256 = "0xid5636g58sxbhxnjmfjdy7y8rf3c77zmmpfbbqv4lv9jd2gmxm";
    })
  ];

  meta = {
    description = "Opensource disk backup software";
    homepage = "http://www.partimage.org";
    license = lib.licenses.gpl2;
    maintainers = [lib.maintainers.marcweber];
    platforms = lib.platforms.linux;
  };
}