veracrypt: 1.24-Hotfix1 -> 1.24-Update7 and hardcode mkfs paths (#127592)

authored by

Artturi and committed by
GitHub
8e4a27fa 10ae47c3

+47 -15
+25 -15
pkgs/applications/misc/veracrypt/default.nix
··· 1 - { lib, stdenv, fetchurl, fetchpatch, pkg-config, makeself, yasm, fuse, wxGTK, lvm2 }: 1 + { lib 2 + , stdenv 3 + , fetchurl 4 + , pkg-config 5 + , makeself 6 + , yasm 7 + , fuse 8 + , wxGTK 9 + , lvm2 10 + , substituteAll 11 + , e2fsprogs 12 + , exfat 13 + , ntfs3g 14 + , btrfs-progs 15 + }: 2 16 3 17 with lib; 4 18 5 19 stdenv.mkDerivation rec { 6 20 pname = "veracrypt"; 7 - version = "1.24-Hotfix1"; 21 + version = "1.24-Update7"; 8 22 9 23 src = fetchurl { 10 24 url = "https://launchpad.net/${pname}/trunk/${toLower version}/+download/VeraCrypt_${version}_Source.tar.bz2"; 11 - sha256 = "8b40ece805b216843d7a71b1a30069c4057931341b030bf65caace59263c5c8c"; 25 + sha256 = "0i7h44zn2mjzgh416l7kfs0dk6qc7b1bxsaxqqqcvgrpl453n7bc"; 12 26 }; 13 27 14 - 15 28 patches = [ 16 - # https://github.com/veracrypt/VeraCrypt/issues/529 - fix build on non-x86 17 - (fetchpatch { 18 - url = "https://github.com/veracrypt/VeraCrypt/commit/afe6b2f45b15393026a1159e5f3d165ac7d0b94a.patch"; 19 - sha256 = "1xm9cl6zinlr0vah5xr9bvh0y9gw4331zl7d2n5xvqrcdxw3ww1y"; 20 - stripLen = 1; 21 - }) 22 - # https://github.com/veracrypt/VeraCrypt/issues/529 - fix build on non-x86 23 - (fetchpatch { 24 - url = "https://github.com/veracrypt/VeraCrypt/commit/3fa636d477119fff6e372074568edb42d038f508.patch"; 25 - sha256 = "0qsccilip0ksnlzxina38a052gb533r4s422lxhrj3wv9zgpp7l3"; 26 - stripLen = 1; 29 + (substituteAll { 30 + src = ./fix-paths.patch; 31 + ext2 = "${e2fsprogs}/bin/mkfs.ext2"; 32 + ext3 = "${e2fsprogs}/bin/mkfs.ext3"; 33 + ext4 = "${e2fsprogs}/bin/mkfs.ext4"; 34 + exfat = "${exfat}/bin/mkfs.exfat"; 35 + ntfs = "${ntfs3g}/bin/mkfs.ntfs"; 36 + btrfs = "${btrfs-progs}/bin/mkfs.btrfs"; 27 37 }) 28 38 ]; 29 39
+22
pkgs/applications/misc/veracrypt/fix-paths.patch
··· 1 + diff --color --unified --recursive --text a/Core/VolumeCreator.h b/Core/VolumeCreator.h 2 + --- a/Core/VolumeCreator.h 2021-06-20 20:54:50.725210056 +0300 3 + +++ b/Core/VolumeCreator.h 2021-06-20 20:58:46.117742419 +0300 4 + @@ -77,12 +77,12 @@ 5 + switch (fsType) 6 + { 7 + #if defined (TC_LINUX) 8 + - case VolumeCreationOptions::FilesystemType::Ext2: return "mkfs.ext2"; 9 + - case VolumeCreationOptions::FilesystemType::Ext3: return "mkfs.ext3"; 10 + - case VolumeCreationOptions::FilesystemType::Ext4: return "mkfs.ext4"; 11 + - case VolumeCreationOptions::FilesystemType::NTFS: return "mkfs.ntfs"; 12 + - case VolumeCreationOptions::FilesystemType::exFAT: return "mkfs.exfat"; 13 + - case VolumeCreationOptions::FilesystemType::Btrfs: return "mkfs.btrfs"; 14 + + case VolumeCreationOptions::FilesystemType::Ext2: return "@ext2@"; 15 + + case VolumeCreationOptions::FilesystemType::Ext3: return "@ext3@"; 16 + + case VolumeCreationOptions::FilesystemType::Ext4: return "@ext4@"; 17 + + case VolumeCreationOptions::FilesystemType::NTFS: return "@ntfs@"; 18 + + case VolumeCreationOptions::FilesystemType::exFAT: return "@exfat@"; 19 + + case VolumeCreationOptions::FilesystemType::Btrfs: return "@btrfs@"; 20 + #elif defined (TC_MACOSX) 21 + case VolumeCreationOptions::FilesystemType::MacOsExt: return "newfs_hfs"; 22 + case VolumeCreationOptions::FilesystemType::exFAT: return "newfs_exfat";