Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
at devShellTools-shell 83 lines 2.0 kB view raw
1{ 2 lib, 3 stdenv, 4 fetchurl, 5 pkg-config, 6 makeself, 7 yasm, 8 fuse, 9 wxGTK32, 10 lvm2, 11 replaceVars, 12 e2fsprogs, 13 exfat, 14 ntfs3g, 15 btrfs-progs, 16 pcsclite, 17 wrapGAppsHook3, 18}: 19 20stdenv.mkDerivation (finalAttrs: { 21 pname = "veracrypt"; 22 version = "1.26.24"; 23 24 src = fetchurl { 25 url = "https://launchpad.net/veracrypt/trunk/${finalAttrs.version}/+download/VeraCrypt_${finalAttrs.version}_Source.tar.bz2"; 26 hash = "sha256-f1wgr0KTd6tW97UsqGiTa5kj14T0YG2piGw2KXiQPng="; 27 }; 28 29 patches = [ 30 (replaceVars ./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"; 37 }) 38 39 # https://github.com/veracrypt/VeraCrypt/commit/2cca2e1dafa405addc3af8724baf8563f352ac1c 40 ./nix-system-paths.patch 41 ]; 42 43 sourceRoot = "src"; 44 45 nativeBuildInputs = [ 46 makeself 47 pkg-config 48 yasm 49 wrapGAppsHook3 50 ]; 51 buildInputs = [ 52 fuse 53 lvm2 54 wxGTK32 55 pcsclite 56 ]; 57 58 enableParallelBuilding = true; 59 60 installPhase = '' 61 install -Dm 755 Main/veracrypt "$out/bin/veracrypt" 62 install -Dm 444 Resources/Icons/VeraCrypt-256x256.xpm "$out/share/pixmaps/veracrypt.xpm" 63 install -Dm 444 License.txt -t "$out/share/doc/veracrypt/" 64 install -d $out/share/applications 65 substitute Setup/Linux/veracrypt.desktop $out/share/applications/veracrypt.desktop \ 66 --replace-fail "Exec=/usr/bin/veracrypt" "Exec=$out/bin/veracrypt" \ 67 --replace-fail "Icon=veracrypt" "Icon=veracrypt.xpm" 68 ''; 69 70 meta = { 71 description = "Free Open-Source filesystem on-the-fly encryption"; 72 homepage = "https://www.veracrypt.fr/"; 73 license = with lib.licenses; [ 74 asl20 # and 75 unfree # TrueCrypt License version 3.0 76 ]; 77 maintainers = with lib.maintainers; [ 78 dsferruzza 79 ryand56 80 ]; 81 platforms = lib.platforms.linux; 82 }; 83})