Fixing truecrypt
[nixpkgs-libre.git] / pkgs / applications / misc / truecrypt / default.nix
blob6f5b1d85994e4b7982d4e79fc89d523e0c9deef9
1 /*
2 Requirements for Building TrueCrypt for Linux and Mac OS X:
3 -----------------------------------------------------------
5 - GNU Make
6 - GNU C++ Compiler 4.0 or compatible
7 - Apple XCode (Mac OS X only)
8 - pkg-config
9 - wxWidgets 2.8 library source code (available at http://www.wxwidgets.org)
10 - FUSE library (available at http://fuse.sourceforge.net and
11   http://code.google.com/p/macfuse)
14 Instructions for Building TrueCrypt for Linux and Mac OS X:
15 -----------------------------------------------------------
17 1) Change the current directory to the root of the TrueCrypt source code.
19 2) Run the following command to configure the wxWidgets library for TrueCrypt
20    and to build it:
22    $ make WX_ROOT=/usr/src/wxWidgets wxbuild
24    The variable WX_ROOT must point to the location of the source code of the
25    wxWidgets library. Output files will be placed in the './wxrelease/'
26    directory.
28 3) To build TrueCrypt, run the following command:
30    $ make
32 4) If successful, the TrueCrypt executable should be located in the directory
33    'Main'.
35 By default, a universal executable supporting both graphical and text user
36 interface is built. To build a console-only executable, which requires no GUI
37 library, use the 'NOGUI' parameter:
39    $ make NOGUI=1 WX_ROOT=/usr/src/wxWidgets wxbuild
40    $ make NOGUI=1
43 { fetchurl, stdenv, pkgconfig, fuse, wxGTK, devicemapper,
44   wxGUI ? true
47 stdenv.mkDerivation {
48   name = "truecrypt-6.2a";
49   builder = ./builder.sh;
51   src = fetchurl {
52     url = http://www.sfr-fresh.com/unix/misc/TrueCrypt-6.2a-Source.tar.gz;
53     sha256 = "1a75wkn33bdcjhb483f383hid5w9p0ap1xk0lj226350pm71sa56";
54   };
56   pkcs11h = fetchurl {
57     url = ftp://ftp.rsasecurity.com/pub/pkcs/pkcs-11/v2-20/pkcs11.h;
58     sha256 = "1563d877b6f8868b8eb8687358162bfb7f868104ed694beb35ae1c5cf1a58b9b";
59   };
61   pkcs11th = fetchurl {
62     url = ftp://ftp.rsasecurity.com/pub/pkcs/pkcs-11/v2-20/pkcs11t.h;
63     sha256 = "8ce68616304684f92a7e267bcc8f486441e92a5cbdfcfd97e69ac9a0b436fb7b";
64   };
66   pkcs11fh = fetchurl {
67     url = ftp://ftp.rsasecurity.com/pub/pkcs/pkcs-11/v2-20/pkcs11f.h;
68     sha256 = "5ae6a4f32ca737e02def3bf314c9842fb89be82bf00b6f4022a97d8d565522b8";
69   };
71   buildInputs = [ pkgconfig fuse devicemapper wxGTK ]; 
72   makeFlags = if (wxGUI) then "" else "NOGUI=1";
74   meta = {
75     description = "Free Open-Source filesystem on-the-fly encryption";
76     homepage = http://www.truecrypt.org/;
77     license = "TrueCrypt License Version 2.6";
78     maintainers = with stdenv.lib.maintainers; [viric];
79     platforms = with stdenv.lib.platforms; linux;
80   };