From b8a8ae262b2d22ad7c43783e446da5ea26e98db9 Mon Sep 17 00:00:00 2001 From: Simonas Kazlauskas Date: Fri, 14 Aug 2020 03:46:00 +0300 Subject: [PATCH] draftsight: remove This software is not longer available for download (for free), the support for linux has been discontinued and any "freeware" use of this software past 2019 December 31st is a breach of license terms. Since the derivation is broken and cannot be fixed, remove it. --- .../graphics/draftsight/default.nix | 88 ------------------- pkgs/top-level/aliases.nix | 1 + pkgs/top-level/all-packages.nix | 2 - 3 files changed, 1 insertion(+), 90 deletions(-) delete mode 100644 pkgs/applications/graphics/draftsight/default.nix diff --git a/pkgs/applications/graphics/draftsight/default.nix b/pkgs/applications/graphics/draftsight/default.nix deleted file mode 100644 index ccd4fd660f7..00000000000 --- a/pkgs/applications/graphics/draftsight/default.nix +++ /dev/null @@ -1,88 +0,0 @@ -{ stdenv, fetchurl, dpkg, makeWrapper, gcc, libGLU, libGL, xdg_utils, - dbus, alsaLib, cups, fontconfig, glib, icu, libpng12, - xkeyboard_config, zlib, libxslt, libxml2, sqlite, orc, - libX11, libXcursor, libXrandr, libxcb, libXi, libSM, libICE, - libXrender, libXcomposite }: - -let version = "2018SP2"; in -stdenv.mkDerivation { - pname = "draftsight"; - inherit version; - - nativeBuildInputs = [ dpkg makeWrapper ]; - - unpackPhase = '' - mkdir $out - mkdir $out/draftsight - dpkg -x $src $out/draftsight - ''; - - # Both executables and bundled libraries need patching to find their - # dependencies. The makeWrapper & QT_XKB_CONFIG_ROOT is to - # alleviate "xkbcommon: ERROR: failed to add default include path - # /usr/share/X11/xkb" and "Qt: Failed to create XKB context!". - installPhase = '' - mkdir $out/bin - for exe in DraftSight dsHttpApiController dsHttpApiService FxCrashRptApp HelpGuide; do - echo "Patching $exe..." - patchelf --interpreter "$(cat $NIX_CC/nix-support/dynamic-linker)" \ - --set-rpath $libPath:\$ORIGIN/../Libraries \ - $out/draftsight/opt/dassault-systemes/DraftSight/Linux/$exe - makeWrapper $out/draftsight/opt/dassault-systemes/DraftSight/Linux/$exe \ - $out/bin/$exe \ - --prefix "QT_XKB_CONFIG_ROOT" ":" "${xkeyboard_config}/share/X11/xkb" - done - for lib in $out/draftsight/opt/dassault-systemes/DraftSight/Libraries/*.so*; do - # DraftSight ships with broken symlinks for some reason - if [ -f $(readlink -f $lib) ] - then - echo "Patching $lib..." - patchelf --set-rpath $libPath:\$ORIGIN/../Libraries $lib - else - echo "Ignoring broken link $lib" - fi - done - for lib in $out/draftsight/opt/dassault-systemes/DraftSight/APISDK/lib/cpp/*.so*; do - if [ -f $(readlink $lib) ] - then - echo "Patching $lib..." - chmod u+w $lib - patchelf --set-rpath $libPath:\$ORIGIN/../Libraries $lib - else - echo "Ignoring broken link $lib" - fi - done - # These libraries shouldn't really be here anyway: - find $out/draftsight/opt/dassault-systemes/DraftSight/APISDK/Samples/C++ \ - -type d -name _lib | xargs rm -r - ''; - - # TODO: Figure out why HelpGuide segfaults at startup. - - # This must be here for main window graphics to appear (without it - # it also gives the error: "QXcbIntegration: Cannot create platform - # OpenGL context, neither GLX nor EGL are enabled"). My guess is - # that it dlopen()'s libraries in paths removed by shrinking RPATH. - dontPatchELF = true; - - src = fetchurl { - name = "draftSight.deb"; - url = "http://dl-ak.solidworks.com/nonsecure/draftsight/${version}/draftSight.deb"; - sha256 = "05lrvml0zkzqg0sj6sj2h8h66hxdmsw5fg9fwz923r1y8j48qxdx"; - }; - - libPath = stdenv.lib.makeLibraryPath [ gcc.cc libGLU libGL xdg_utils - dbus alsaLib cups.lib fontconfig glib icu libpng12 - xkeyboard_config zlib libxslt libxml2 sqlite orc libX11 - libXcursor libXrandr libxcb libXi libSM libICE libXrender - libXcomposite ]; - - meta = with stdenv.lib; { - description = "2D design & drafting application, meant to be similar to AutoCAD"; - longDescription = "Professional-grade 2D design and drafting solution from Dassault Systèmes that lets you create, edit, view and mark up any kind of 2D CAD drawing."; - homepage = "https://www.3ds.com/products-services/draftsight-cad-software/"; - license = stdenv.lib.licenses.unfree; - maintainers = with maintainers; [ hodapp ]; - platforms = [ "x86_64-linux" ]; - }; -} diff --git a/pkgs/top-level/aliases.nix b/pkgs/top-level/aliases.nix index 3df944635c1..a8d9e2f050f 100644 --- a/pkgs/top-level/aliases.nix +++ b/pkgs/top-level/aliases.nix @@ -110,6 +110,7 @@ mapAliases ({ docbook_xml_xslt = docbook_xsl; # added 2018-04-25 double_conversion = double-conversion; # 2017-11-22 docker_compose = docker-compose; # 2018-11-10 + draftsight = throw "draftsight has been removed, no longer available as freeware"; # added 2020-08-14 dwarf_fortress = dwarf-fortress; # added 2016-01-23 emacsMelpa = emacs25Packages; # for backward compatibility emacsPackagesGen = emacsPackagesFor; # added 2018-08-18 diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 41e7af4c09d..8479a38e4f6 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -19684,8 +19684,6 @@ in dr14_tmeter = callPackage ../applications/audio/dr14_tmeter { }; - draftsight = callPackage ../applications/graphics/draftsight { }; - dragonfly-reverb = callPackage ../applications/audio/dragonfly-reverb { }; drawing = callPackage ../applications/graphics/drawing { };