2021-06-20 20:20:08 +01:00
|
|
|
{ lib
|
|
|
|
, stdenv
|
|
|
|
, fetchurl
|
|
|
|
, pkg-config
|
|
|
|
, makeself
|
|
|
|
, yasm
|
|
|
|
, fuse
|
|
|
|
, wxGTK
|
|
|
|
, lvm2
|
|
|
|
, substituteAll
|
|
|
|
, e2fsprogs
|
|
|
|
, exfat
|
|
|
|
, ntfs3g
|
|
|
|
, btrfs-progs
|
|
|
|
}:
|
2017-04-02 15:38:08 +01:00
|
|
|
|
2021-01-15 05:42:41 +00:00
|
|
|
with lib;
|
2017-04-02 15:41:11 +01:00
|
|
|
|
2017-04-02 15:38:08 +01:00
|
|
|
stdenv.mkDerivation rec {
|
2018-10-24 19:57:03 +01:00
|
|
|
pname = "veracrypt";
|
2022-04-18 19:59:54 +01:00
|
|
|
version = "1.25.9";
|
2017-04-02 15:38:08 +01:00
|
|
|
|
|
|
|
src = fetchurl {
|
2019-11-01 08:46:59 +00:00
|
|
|
url = "https://launchpad.net/${pname}/trunk/${toLower version}/+download/VeraCrypt_${version}_Source.tar.bz2";
|
2022-04-18 19:59:54 +01:00
|
|
|
sha256 = "sha256-drbhgYS8IaQdKUn/Y9ch1JBUpxbO/zpL13tcNRC3lK8=";
|
2017-04-02 15:38:08 +01:00
|
|
|
};
|
|
|
|
|
2019-11-01 08:46:59 +00:00
|
|
|
patches = [
|
2021-06-20 20:20:08 +01: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";
|
2019-11-01 08:46:59 +00:00
|
|
|
})
|
|
|
|
];
|
|
|
|
|
2018-10-24 19:57:03 +01:00
|
|
|
sourceRoot = "src";
|
|
|
|
|
2021-01-17 02:09:27 +00:00
|
|
|
nativeBuildInputs = [ makeself pkg-config yasm ];
|
2019-11-01 08:46:59 +00:00
|
|
|
buildInputs = [ fuse lvm2 wxGTK ];
|
2018-10-24 19:57:03 +01:00
|
|
|
|
|
|
|
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"
|
|
|
|
'';
|
2017-04-02 15:38:08 +01:00
|
|
|
|
|
|
|
meta = {
|
|
|
|
description = "Free Open-Source filesystem on-the-fly encryption";
|
2020-04-01 02:11:51 +01:00
|
|
|
homepage = "https://www.veracrypt.fr/";
|
2021-04-18 10:44:43 +01:00
|
|
|
license = with licenses; [ asl20 /* and */ unfree /* TrueCrypt License version 3.0 */ ];
|
2017-04-02 15:41:11 +01:00
|
|
|
maintainers = with maintainers; [ dsferruzza ];
|
|
|
|
platforms = platforms.linux;
|
2017-04-02 15:38:08 +01:00
|
|
|
};
|
|
|
|
}
|