2020-05-13 20:43:02 +01:00
|
|
|
{ stdenv, fetchurl, fetchpatch, lvm2, libgcrypt, libuuid, pkgconfig, popt
|
2014-10-22 07:15:30 +01:00
|
|
|
, enablePython ? true, python ? null
|
|
|
|
}:
|
|
|
|
|
|
|
|
assert enablePython -> python != null;
|
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
name = "cryptsetup-1.6.3";
|
|
|
|
|
|
|
|
src = fetchurl {
|
|
|
|
url = "http://cryptsetup.googlecode.com/files/${name}.tar.bz2";
|
|
|
|
sha256 = "1n1qk5chyjspbiianrdb55fhb4wl0vfyqz2br05vfb24v4qlgbx2";
|
|
|
|
};
|
|
|
|
|
2020-05-13 20:43:02 +01:00
|
|
|
patches = [
|
|
|
|
# Fix build with glibc >= 2.28
|
|
|
|
# https://github.com/NixOS/nixpkgs/issues/86403
|
|
|
|
(fetchpatch {
|
|
|
|
url = "https://gitweb.gentoo.org/repo/gentoo.git/plain/sys-fs/cryptsetup/files/cryptsetup-1.7.1-sysmacros.patch?id=d72316f97ebcc7fe622b21574442a9ac59b9115f";
|
|
|
|
sha256 = "0xbhazgl44bimqhcrhajk016w9wi7bkrgwyfq13xmrvyrllqvgdx";
|
|
|
|
})
|
|
|
|
];
|
|
|
|
|
2014-10-22 07:15:30 +01:00
|
|
|
configureFlags = [ "--enable-cryptsetup-reencrypt" ]
|
|
|
|
++ stdenv.lib.optional enablePython "--enable-python";
|
|
|
|
|
2017-09-05 22:26:13 +01:00
|
|
|
nativeBuildInputs = [ pkgconfig ];
|
2018-07-17 21:11:16 +01:00
|
|
|
buildInputs = [ lvm2 libgcrypt libuuid popt ]
|
2014-10-22 07:15:30 +01:00
|
|
|
++ stdenv.lib.optional enablePython python;
|
|
|
|
|
|
|
|
meta = {
|
2020-04-01 02:11:51 +01:00
|
|
|
homepage = "http://code.google.com/p/cryptsetup/";
|
2014-10-22 07:15:30 +01:00
|
|
|
description = "LUKS for dm-crypt";
|
|
|
|
license = stdenv.lib.licenses.gpl2;
|
2019-02-22 15:14:13 +00:00
|
|
|
maintainers = with stdenv.lib.maintainers; [ ];
|
2014-10-22 07:15:30 +01:00
|
|
|
platforms = with stdenv.lib.platforms; linux;
|
|
|
|
};
|
|
|
|
}
|