python3Packages.pywikibot: init at 9.5.0 (#333068)
[NixPkgs.git] / pkgs / by-name / ve / veracrypt / package.nix
blobfc41522a4b2049d74f24f789c899047992dc19b9
2   lib,
3   stdenv,
4   fetchurl,
5   pkg-config,
6   makeself,
7   yasm,
8   fuse,
9   wxGTK32,
10   lvm2,
11   substituteAll,
12   e2fsprogs,
13   exfat,
14   ntfs3g,
15   btrfs-progs,
16   pcsclite,
17   wrapGAppsHook3,
20 stdenv.mkDerivation (finalAttrs: {
21   pname = "veracrypt";
22   version = "1.26.15";
24   src = fetchurl {
25     url = "https://launchpad.net/veracrypt/trunk/${finalAttrs.version}/+download/VeraCrypt_${finalAttrs.version}_Source.tar.bz2";
26     hash = "sha256-upcCUDDiG5sjMbfrCJcBFjwyr0t+BFNfM1uvjXSnSRY=";
27   };
29   patches = [
30     (substituteAll {
31       src = ./fix-paths.patch;
32       ext2 = "${e2fsprogs}/bin/mkfs.ext2";
33       ext3 = "${e2fsprogs}/bin/mkfs.ext3";
34       ext4 = "${e2fsprogs}/bin/mkfs.ext4";
35       exfat = "${exfat}/bin/mkfs.exfat";
36       ntfs = "${ntfs3g}/bin/mkfs.ntfs";
37       btrfs = "${btrfs-progs}/bin/mkfs.btrfs";
38     })
39   ];
41   sourceRoot = "src";
43   nativeBuildInputs = [
44     makeself
45     pkg-config
46     yasm
47     wrapGAppsHook3
48   ];
49   buildInputs = [
50     fuse
51     lvm2
52     wxGTK32
53     pcsclite
54   ];
56   enableParallelBuilding = true;
58   installPhase = ''
59     install -Dm 755 Main/veracrypt "$out/bin/veracrypt"
60     install -Dm 444 Resources/Icons/VeraCrypt-256x256.xpm "$out/share/pixmaps/veracrypt.xpm"
61     install -Dm 444 License.txt -t "$out/share/doc/veracrypt/"
62     install -d $out/share/applications
63     substitute Setup/Linux/veracrypt.desktop $out/share/applications/veracrypt.desktop \
64       --replace-fail "Exec=/usr/bin/veracrypt" "Exec=$out/bin/veracrypt" \
65       --replace-fail "Icon=veracrypt" "Icon=veracrypt.xpm"
66   '';
68   meta = {
69     description = "Free Open-Source filesystem on-the-fly encryption";
70     homepage = "https://www.veracrypt.fr/";
71     license = with lib.licenses; [
72       asl20 # and
73       unfree # TrueCrypt License version 3.0
74     ];
75     maintainers = with lib.maintainers; [
76       dsferruzza
77       ryand56
78     ];
79     platforms = lib.platforms.linux;
80   };