2017-04-02 16:38:08 +02:00
|
|
|
{ fetchurl, stdenv, pkgconfig, nasm, fuse, wxGTK30, devicemapper, makeself,
|
|
|
|
wxGUI ? true
|
|
|
|
}:
|
|
|
|
|
2017-04-02 16:41:11 +02:00
|
|
|
with stdenv.lib;
|
|
|
|
|
2017-04-02 16:38:08 +02:00
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
name = "veracrypt-${version}";
|
|
|
|
version = "1.19";
|
|
|
|
|
|
|
|
src = fetchurl {
|
|
|
|
url = "https://launchpad.net/veracrypt/trunk/${version}/+download/VeraCrypt_${version}_Source.tar.gz";
|
|
|
|
sha256 = "111xs1zmic82lpn5spn0ca33q0g4za04a2k4cvjwdb7k3vcicq6v";
|
|
|
|
};
|
|
|
|
|
2017-04-02 16:41:11 +02:00
|
|
|
# The source archive appears to be compressed twice ...
|
2017-04-02 16:38:08 +02:00
|
|
|
unpackPhase =
|
|
|
|
''
|
2017-04-02 16:41:11 +02:00
|
|
|
gzip -dc $src | tar xz
|
2017-04-02 16:38:08 +02:00
|
|
|
cd Vera*/src
|
|
|
|
'';
|
|
|
|
|
2017-04-02 16:41:11 +02:00
|
|
|
nativeBuildInputs = [ makeself nasm pkgconfig ];
|
|
|
|
buildInputs = [ fuse devicemapper ]
|
|
|
|
++ optional wxGUI wxGTK30;
|
|
|
|
makeFlags = optionalString (!wxGUI) "NOGUI=1";
|
2017-04-02 16:38:08 +02:00
|
|
|
|
|
|
|
installPhase =
|
|
|
|
''
|
|
|
|
mkdir -p $out/bin
|
|
|
|
cp Main/veracrypt $out/bin
|
|
|
|
mkdir -p $out/share/$name
|
|
|
|
cp License.txt $out/share/$name/LICENSE
|
|
|
|
mkdir -p $out/share/applications
|
2017-04-02 16:41:11 +02:00
|
|
|
sed "s,Exec=.*,Exec=$out/bin/veracrypt," Setup/Linux/veracrypt.desktop > $out/share/applications/veracrypt.desktop
|
2017-04-02 16:38:08 +02:00
|
|
|
'';
|
|
|
|
|
|
|
|
meta = {
|
|
|
|
description = "Free Open-Source filesystem on-the-fly encryption";
|
|
|
|
homepage = https://veracrypt.codeplex.com/;
|
|
|
|
license = "VeraCrypt License";
|
2017-04-02 16:41:11 +02:00
|
|
|
maintainers = with maintainers; [ dsferruzza ];
|
|
|
|
platforms = platforms.linux;
|
2017-04-02 16:38:08 +02:00
|
|
|
};
|
|
|
|
}
|