mirror of
https://github.com/NixOS/nixpkgs.git
synced 2026-10-03 21:40:12 +00:00
87 lines
2.0 KiB
Nix
87 lines
2.0 KiB
Nix
{
|
|
lib,
|
|
stdenv,
|
|
fetchFromGitHub,
|
|
pkg-config,
|
|
makeself,
|
|
yasm,
|
|
fuse3,
|
|
wxwidgets_3_2,
|
|
lvm2,
|
|
replaceVars,
|
|
e2fsprogs,
|
|
exfat,
|
|
ntfs3g,
|
|
btrfs-progs,
|
|
pcsclite,
|
|
wrapGAppsHook3,
|
|
}:
|
|
|
|
stdenv.mkDerivation (finalAttrs: {
|
|
pname = "veracrypt";
|
|
version = "1.26.29";
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "veracrypt";
|
|
repo = "VeraCrypt";
|
|
tag = "VeraCrypt_${finalAttrs.version}";
|
|
hash = "sha256-Q+WUz8F63cP9/KlZUn9xLu2V9wO4FeY7AtErE1T9Km4=";
|
|
};
|
|
|
|
patches = [
|
|
(replaceVars ./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";
|
|
})
|
|
|
|
# https://github.com/veracrypt/VeraCrypt/commit/2cca2e1dafa405addc3af8724baf8563f352ac1c
|
|
./nix-system-paths.patch
|
|
];
|
|
|
|
sourceRoot = "${finalAttrs.src.name}/src";
|
|
|
|
buildFlags = [ "WITHFUSE3=1" ];
|
|
|
|
nativeBuildInputs = [
|
|
makeself
|
|
pkg-config
|
|
yasm
|
|
wrapGAppsHook3
|
|
];
|
|
buildInputs = [
|
|
fuse3
|
|
lvm2
|
|
wxwidgets_3_2
|
|
pcsclite
|
|
];
|
|
|
|
enableParallelBuilding = true;
|
|
|
|
installPhase = ''
|
|
install -Dm 755 Main/veracrypt "$out/bin/veracrypt"
|
|
install -Dm 444 Resources/Icons/VeraCrypt-256x256.xpm "$out/share/pixmaps/veracrypt.xpm"
|
|
install -Dm 444 License.txt -t "$out/share/doc/veracrypt/"
|
|
install -d $out/share/applications
|
|
substitute Setup/Linux/veracrypt.desktop $out/share/applications/veracrypt.desktop \
|
|
--replace-fail "Exec=/usr/bin/veracrypt" "Exec=$out/bin/veracrypt" \
|
|
--replace-fail "Icon=veracrypt" "Icon=veracrypt.xpm"
|
|
'';
|
|
|
|
meta = {
|
|
description = "Free Open-Source filesystem on-the-fly encryption";
|
|
homepage = "https://www.veracrypt.fr/";
|
|
license =
|
|
with lib.licenses;
|
|
AND [
|
|
asl20 # and
|
|
unfree # TrueCrypt License version 3.0
|
|
];
|
|
maintainers = [ lib.maintainers.ryand56 ];
|
|
platforms = lib.platforms.linux;
|
|
};
|
|
})
|