summary refs log tree commit diff
diff options
context:
space:
mode:
authorxeji <36407913+xeji@users.noreply.github.com>2018-10-29 23:53:29 +0100
committerGitHub <noreply@github.com>2018-10-29 23:53:29 +0100
commit21a7ca7c084ac943070277606831672482642c2e (patch)
tree1dd8898d920b7dc7f9c055d4cffa1930caa3b95d
parent3a432b5885051989bd8836e09dbc2e8effa3cbca (diff)
parentce67a63dbec461ff91723b3037f015c28c701c07 (diff)
downloadnixlib-21a7ca7c084ac943070277606831672482642c2e.tar
nixlib-21a7ca7c084ac943070277606831672482642c2e.tar.gz
nixlib-21a7ca7c084ac943070277606831672482642c2e.tar.bz2
nixlib-21a7ca7c084ac943070277606831672482642c2e.tar.lz
nixlib-21a7ca7c084ac943070277606831672482642c2e.tar.xz
nixlib-21a7ca7c084ac943070277606831672482642c2e.tar.zst
nixlib-21a7ca7c084ac943070277606831672482642c2e.zip
Merge pull request #49074 from c0bw3b/pkg/veracrypt
veracrypt: 1.22 -> 1.23 / truecrypt: remove and alias to veracrypt
-rw-r--r--nixos/doc/manual/release-notes/rl-1903.xml9
-rw-r--r--pkgs/applications/misc/truecrypt/default.nix98
-rw-r--r--pkgs/applications/misc/truecrypt/gcc6.patch61
-rw-r--r--pkgs/applications/misc/veracrypt/default.nix51
-rw-r--r--pkgs/top-level/aliases.nix1
-rw-r--r--pkgs/top-level/all-packages.nix7
6 files changed, 34 insertions, 193 deletions
diff --git a/nixos/doc/manual/release-notes/rl-1903.xml b/nixos/doc/manual/release-notes/rl-1903.xml
index 64ccddb6c672..7d04d009a060 100644
--- a/nixos/doc/manual/release-notes/rl-1903.xml
+++ b/nixos/doc/manual/release-notes/rl-1903.xml
@@ -163,6 +163,15 @@
      Matomo version.
     </para>
    </listitem>
+   <listitem>
+    <para>
+     The deprecated <literal>truecrypt</literal> package has been removed
+     and <literal>truecrypt</literal> attribute is now an alias for
+     <literal>veracrypt</literal>. VeraCrypt is backward-compatible with
+     TrueCrypt volumes. Note that <literal>cryptsetup</literal> also
+     supports loading TrueCrypt volumes.
+    </para>
+   </listitem>
   </itemizedlist>
  </section>
 </section>
diff --git a/pkgs/applications/misc/truecrypt/default.nix b/pkgs/applications/misc/truecrypt/default.nix
deleted file mode 100644
index 5bb614ac68b1..000000000000
--- a/pkgs/applications/misc/truecrypt/default.nix
+++ /dev/null
@@ -1,98 +0,0 @@
-/*
-Requirements for Building TrueCrypt for Linux and macOS:
------------------------------------------------------------
-
-- GNU Make
-- GNU C++ Compiler 4.0 or compatible
-- Apple XCode (macOS only)
-- pkg-config
-- wxWidgets 2.8 library source code (available at http://www.wxwidgets.org)
-- FUSE library (available at http://fuse.sourceforge.net and
-  http://code.google.com/p/macfuse)
-
-
-Instructions for Building TrueCrypt for Linux and macOS:
------------------------------------------------------------
-
-1) Change the current directory to the root of the TrueCrypt source code.
-
-2) Run the following command to configure the wxWidgets library for TrueCrypt
-   and to build it:
-
-   $ make WX_ROOT=/usr/src/wxWidgets wxbuild
-
-   The variable WX_ROOT must point to the location of the source code of the
-   wxWidgets library. Output files will be placed in the './wxrelease/'
-   directory.
-
-3) To build TrueCrypt, run the following command:
-
-   $ make
-
-4) If successful, the TrueCrypt executable should be located in the directory
-   'Main'.
-
-By default, a universal executable supporting both graphical and text user
-interface is built. To build a console-only executable, which requires no GUI
-library, use the 'NOGUI' parameter:
-
-   $ make NOGUI=1 WX_ROOT=/usr/src/wxWidgets wxbuild
-   $ make NOGUI=1
-*/
-
-{ fetchurl, stdenv, pkgconfig, nasm, fuse, wxGTK, lvm2,
-  wxGUI ? true
-}:
-
-stdenv.mkDerivation {
-  name = "truecrypt-7.1a";
-
-  patchPhase = "patch -p0 < ${./gcc6.patch}";
-
-  preBuild = ''
-    cp $pkcs11h pkcs11.h
-    cp $pkcs11th pkcs11t.h
-    cp $pkcs11fh pkcs11f.h
-  '';
-
-  makeFlags = [
-    ''PKCS11_INC="`pwd`"''
-    (if wxGUI then "" else "NOGUI=1")
-  ];
-
-  installPhase = ''
-    install -D -t $out/bin Main/truecrypt
-    install -D License.txt $out/share/$name/LICENSE
-  '';
-
-  src = fetchurl {
-    url = https://fossies.org/linux/misc/old/TrueCrypt-7.1a-Source.tar.gz;
-    sha256 = "e6214e911d0bbededba274a2f8f8d7b3f6f6951e20f1c3a598fc7a23af81c8dc";
-  };
-
-  pkcs11h = fetchurl {
-    url = ftp://ftp.rsasecurity.com/pub/pkcs/pkcs-11/v2-20/pkcs11.h;
-    sha256 = "1563d877b6f8868b8eb8687358162bfb7f868104ed694beb35ae1c5cf1a58b9b";
-  };
-
-  pkcs11th = fetchurl {
-    url = ftp://ftp.rsasecurity.com/pub/pkcs/pkcs-11/v2-20/pkcs11t.h;
-    sha256 = "8ce68616304684f92a7e267bcc8f486441e92a5cbdfcfd97e69ac9a0b436fb7b";
-  };
-
-  pkcs11fh = fetchurl {
-    url = ftp://ftp.rsasecurity.com/pub/pkcs/pkcs-11/v2-20/pkcs11f.h;
-    sha256 = "5ae6a4f32ca737e02def3bf314c9842fb89be82bf00b6f4022a97d8d565522b8";
-  };
-
-  nativeBuildInputs = [ pkgconfig ];
-  buildInputs = [ fuse lvm2 wxGTK nasm ];
-
-  meta = {
-    description = "Free Open-Source filesystem on-the-fly encryption";
-    homepage = http://www.truecrypt.org/;
-    license = "TrueCrypt License Version 2.6";
-    maintainers = with stdenv.lib.maintainers; [ ryantm ];
-    platforms = with stdenv.lib.platforms; linux;
-  };
-}
diff --git a/pkgs/applications/misc/truecrypt/gcc6.patch b/pkgs/applications/misc/truecrypt/gcc6.patch
deleted file mode 100644
index 6e8c7da69e87..000000000000
--- a/pkgs/applications/misc/truecrypt/gcc6.patch
+++ /dev/null
@@ -1,61 +0,0 @@
---- Main/Resources.cpp	2016-05-16 16:47:35.846462041 +0200
-+++ Main/Resources.cpp	2016-05-16 17:12:21.838202520 +0200
-@@ -45,13 +45,13 @@
- 		strBuf.CopyFrom (res);
- 		return string (reinterpret_cast <char *> (strBuf.Ptr()));
- #else
--		static const char LanguageXml[] =
-+		static byte LanguageXml[] =
- 		{
- #			include "Common/Language.xml.h"
- 			, 0
- 		};
- 
--		return string (LanguageXml);
-+		return string ((const char*) LanguageXml);
- #endif
- 	}
- 
-@@ -64,13 +64,13 @@
- 		strBuf.CopyFrom (res);
- 		return string (reinterpret_cast <char *> (strBuf.Ptr()));
- #else
--		static const char License[] =
-+		static byte License[] =
- 		{
- #			include "License.txt.h"
- 			, 0
- 		};
- 
--		return string (License);
-+		return string ((const char*) License);
- #endif
- 	}
- 
---- Main/Forms/PreferencesDialog.cpp	2016-05-16 17:14:47.704707908 +0200
-+++ Main/Forms/PreferencesDialog.cpp	2016-05-16 17:15:56.927964437 +0200
-@@ -414,11 +414,11 @@
- 		libExtension = wxDynamicLibrary::CanonicalizeName (L"x");
- 
- #ifdef TC_MACOSX
--		extensions.push_back (make_pair (L"dylib", LangString["DLL_FILES"]));
-+		extensions.push_back (make_pair (L"dylib", static_cast<const wchar_t*>(LangString["DLL_FILES"].wc_str())));
- #endif
- 		if (!libExtension.empty())
- 		{
--			extensions.push_back (make_pair (libExtension.Mid (libExtension.find (L'.') + 1), LangString["DLL_FILES"]));
-+			extensions.push_back (make_pair (static_cast<const wchar_t*>(libExtension.Mid (libExtension.find (L'.') + 1).wc_str()), static_cast<const wchar_t*>(LangString["DLL_FILES"].wc_str())));
- 			extensions.push_back (make_pair (L"*", L""));
- 		}
- 
---- Main/GraphicUserInterface.cpp	2016-05-16 17:16:38.724591342 +0200
-+++ Main/GraphicUserInterface.cpp	2016-05-16 17:17:09.854562653 +0200
-@@ -1445,7 +1445,7 @@
- 	FilePath GraphicUserInterface::SelectVolumeFile (wxWindow *parent, bool saveMode, const DirectoryPath &directory) const
- 	{
- 		list < pair <wstring, wstring> > extensions;
--		extensions.push_back (make_pair (L"tc", LangString["TC_VOLUMES"]));
-+		extensions.push_back (make_pair (L"tc", static_cast<const wchar_t*>(LangString["TC_VOLUMES"].wc_str())));
- 
- 		FilePathList selFiles = Gui->SelectFiles (parent, LangString[saveMode ? "OPEN_NEW_VOLUME" : "OPEN_VOL_TITLE"], saveMode, false, extensions, directory);
-
diff --git a/pkgs/applications/misc/veracrypt/default.nix b/pkgs/applications/misc/veracrypt/default.nix
index bc5b19e77370..8b64bcca667d 100644
--- a/pkgs/applications/misc/veracrypt/default.nix
+++ b/pkgs/applications/misc/veracrypt/default.nix
@@ -1,43 +1,38 @@
-{ fetchurl, stdenv, pkgconfig, yasm, fuse, wxGTK30, lvm2, makeself,
-  wxGUI ? true
-}:
+{ stdenv, fetchurl, pkgconfig, makeself, yasm, fuse, wxGTK, lvm2 }:
 
 with stdenv.lib;
 
 stdenv.mkDerivation rec {
-  name = "veracrypt-${version}";
-  version = "1.22";
+  pname = "veracrypt";
+  name = "${pname}-${version}";
+  version = "1.23";
 
   src = fetchurl {
-    url = "https://launchpad.net/veracrypt/trunk/${version}/+download/VeraCrypt_${version}_Source.tar.bz2";
-    sha256 = "0w5qyxnx03vn93ach1kb995w2mdg43s82gf1isbk206sxp00qk4y";
+    url = "https://launchpad.net/${pname}/trunk/${version}/+download/VeraCrypt_${version}_Source.tar.bz2";
+    sha256 = "009lqi43n2w272sxv7y7dz9sqx15qkx6lszkswr8mwmkpgkm0px1";
   };
 
-  unpackPhase =
-    ''
-      tar xjf $src
-      cd src
-    '';
-
-  nativeBuildInputs = [ makeself yasm pkgconfig ];
-  buildInputs = [ fuse lvm2 ]
-    ++ optional wxGUI wxGTK30;
-  makeFlags = optionalString (!wxGUI) "NOGUI=1";
-
-  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
-      sed "s,Exec=.*,Exec=$out/bin/veracrypt," Setup/Linux/veracrypt.desktop > $out/share/applications/veracrypt.desktop
-    '';
+  sourceRoot = "src";
+
+  nativeBuildInputs = [ makeself pkgconfig yasm ];
+  buildInputs = [ fuse lvm2 wxGTK ];
+
+  enableParallelBuilding = true;
+
+  installPhase = ''
+    install -Dm 755 Main/${pname} "$out/bin/${pname}"
+    install -Dm 444 Resources/Icons/VeraCrypt-256x256.xpm "$out/share/pixmaps/${pname}.xpm"
+    install -Dm 444 License.txt -t "$out/share/doc/${pname}/"
+    install -d $out/share/applications
+    substitute Setup/Linux/${pname}.desktop $out/share/applications/${pname}.desktop \
+      --replace "Exec=/usr/bin/veracrypt" "Exec=$out/bin/veracrypt" \
+      --replace "Icon=veracrypt" "Icon=veracrypt.xpm"
+  '';
 
   meta = {
     description = "Free Open-Source filesystem on-the-fly encryption";
     homepage = https://www.veracrypt.fr/;
-    license = "VeraCrypt License";
+    license = [ licenses.asl20 /* or */ "TrueCrypt License version 3.0" ];
     maintainers = with maintainers; [ dsferruzza ];
     platforms = platforms.linux;
   };
diff --git a/pkgs/top-level/aliases.nix b/pkgs/top-level/aliases.nix
index 444028d2db0d..8cd54c3a5bdf 100644
--- a/pkgs/top-level/aliases.nix
+++ b/pkgs/top-level/aliases.nix
@@ -301,6 +301,7 @@ mapAliases ({
   trang = jing-trang; # added 2018-04-25
   transmission_gtk = transmission-gtk; # added 2018-01-06
   transmission_remote_gtk = transmission-remote-gtk; # added 2018-01-06
+  truecrypt = veracrypt; # added 2018-10-24
   tshark = wireshark-cli; # added 2018-04-25
   ucsFonts = ucs-fonts; # added 2016-07-15
   ultrastardx-beta = ultrastardx; # added 2017-08-12
diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix
index 3ace934df957..d1ab34eba6f2 100644
--- a/pkgs/top-level/all-packages.nix
+++ b/pkgs/top-level/all-packages.nix
@@ -6028,11 +6028,6 @@ with pkgs;
     libpng = libpng12;
   };
 
-  truecrypt = callPackage ../applications/misc/truecrypt {
-    stdenv = overrideInStdenv stdenv [ useOldCXXAbi ];
-    wxGUI = config.truecrypt.wxGUI or true;
-  };
-
   ttmkfdir = callPackage ../tools/misc/ttmkfdir { };
 
   ttwatch = callPackage ../tools/misc/ttwatch { };
@@ -6137,7 +6132,7 @@ with pkgs;
   };
 
   veracrypt = callPackage ../applications/misc/veracrypt {
-    wxGUI = true;
+    wxGTK = wxGTK30;
   };
 
   vlan = callPackage ../tools/networking/vlan { };