at 18.09-beta 1.1 kB view raw
1{ stdenv, fetchurl, fetchpatch, lvm2, json_c 2, openssl, libuuid, pkgconfig, popt 3, enablePython ? false, python2 ? null }: 4 5assert enablePython -> python2 != null; 6 7stdenv.mkDerivation rec { 8 name = "cryptsetup-2.0.4"; 9 10 outputs = [ "out" "dev" "man" ]; 11 12 src = fetchurl { 13 url = "mirror://kernel/linux/utils/cryptsetup/v2.0/${name}.tar.xz"; 14 sha256 = "0d2p9g2wqcv6l3671gvw96p16jadbgyh21ddy2bhqgi96dq3qflx"; 15 }; 16 17 postPatch = '' 18 patchShebangs tests 19 ''; 20 21 NIX_LDFLAGS = "-lgcc_s"; 22 23 configureFlags = [ 24 "--disable-kernel_crypto" 25 "--enable-cryptsetup-reencrypt" 26 "--with-crypto_backend=openssl" 27 ] ++ stdenv.lib.optional enablePython "--enable-python"; 28 29 nativeBuildInputs = [ pkgconfig ]; 30 buildInputs = [ lvm2 json_c openssl libuuid popt ] 31 ++ stdenv.lib.optional enablePython python2; 32 33 meta = { 34 homepage = https://gitlab.com/cryptsetup/cryptsetup/; 35 description = "LUKS for dm-crypt"; 36 license = stdenv.lib.licenses.gpl2; 37 maintainers = with stdenv.lib.maintainers; [ chaoflow ]; 38 platforms = with stdenv.lib.platforms; linux; 39 }; 40}