2021-06-28 23:13:55 +00:00
|
|
|
{ lib
|
|
|
|
, stdenv
|
|
|
|
, fetchurl
|
|
|
|
, pkg-config
|
|
|
|
, makeself
|
|
|
|
, yasm
|
|
|
|
, fuse
|
|
|
|
, wxGTK
|
|
|
|
, lvm2
|
|
|
|
, substituteAll
|
|
|
|
, e2fsprogs
|
|
|
|
, exfat
|
|
|
|
, ntfs3g
|
|
|
|
, btrfs-progs
|
|
|
|
}:
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2021-01-15 22:18:51 +00:00
|
|
|
with lib;
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
pname = "veracrypt";
|
2021-06-28 23:13:55 +00:00
|
|
|
version = "1.24-Update7";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = fetchurl {
|
|
|
|
url = "https://launchpad.net/${pname}/trunk/${toLower version}/+download/VeraCrypt_${version}_Source.tar.bz2";
|
2021-06-28 23:13:55 +00:00
|
|
|
sha256 = "0i7h44zn2mjzgh416l7kfs0dk6qc7b1bxsaxqqqcvgrpl453n7bc";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
patches = [
|
2021-06-28 23:13:55 +00:00
|
|
|
(substituteAll {
|
|
|
|
src = ./fix-paths.patch;
|
|
|
|
ext2 = "${e2fsprogs}/bin/mkfs.ext2";
|
|
|
|
ext3 = "${e2fsprogs}/bin/mkfs.ext3";
|
|
|
|
ext4 = "${e2fsprogs}/bin/mkfs.ext4";
|
|
|
|
exfat = "${exfat}/bin/mkfs.exfat";
|
|
|
|
ntfs = "${ntfs3g}/bin/mkfs.ntfs";
|
|
|
|
btrfs = "${btrfs-progs}/bin/mkfs.btrfs";
|
2020-04-24 23:36:52 +00:00
|
|
|
})
|
|
|
|
];
|
|
|
|
|
|
|
|
sourceRoot = "src";
|
|
|
|
|
2021-02-05 17:12:51 +00:00
|
|
|
nativeBuildInputs = [ makeself pkg-config yasm ];
|
2020-04-24 23:36:52 +00:00
|
|
|
buildInputs = [ fuse lvm2 wxGTK ];
|
|
|
|
|
|
|
|
enableParallelBuilding = true;
|
|
|
|
|
|
|
|
installPhase = ''
|
|
|
|
install -Dm 755 Main/${pname} "$out/bin/${pname}"
|
|
|
|
install -Dm 444 Resources/Icons/VeraCrypt-256x256.xpm "$out/share/pixmaps/${pname}.xpm"
|
|
|
|
install -Dm 444 License.txt -t "$out/share/doc/${pname}/"
|
|
|
|
install -d $out/share/applications
|
|
|
|
substitute Setup/Linux/${pname}.desktop $out/share/applications/${pname}.desktop \
|
|
|
|
--replace "Exec=/usr/bin/veracrypt" "Exec=$out/bin/veracrypt" \
|
|
|
|
--replace "Icon=veracrypt" "Icon=veracrypt.xpm"
|
|
|
|
'';
|
|
|
|
|
|
|
|
meta = {
|
|
|
|
description = "Free Open-Source filesystem on-the-fly encryption";
|
|
|
|
homepage = "https://www.veracrypt.fr/";
|
2021-04-19 03:05:28 +00:00
|
|
|
license = with licenses; [ asl20 /* and */ unfree /* TrueCrypt License version 3.0 */ ];
|
2020-04-24 23:36:52 +00:00
|
|
|
maintainers = with maintainers; [ dsferruzza ];
|
|
|
|
platforms = platforms.linux;
|
|
|
|
};
|
|
|
|
}
|