From cbe765043f2c4a6042b0bb6b42022a16c06a8bf2 Mon Sep 17 00:00:00 2001 From: Nick Hu Date: Mon, 13 Feb 2017 23:39:29 +0000 Subject: [PATCH] fdr: init at 4.2.0 --- lib/maintainers.nix | 1 + .../science/programming/fdr/default.nix | 69 +++++++++++++++++++ pkgs/top-level/all-packages.nix | 2 + 3 files changed, 72 insertions(+) create mode 100644 pkgs/applications/science/programming/fdr/default.nix diff --git a/lib/maintainers.nix b/lib/maintainers.nix index 3753a6955c80..3296b1c3d28d 100644 --- a/lib/maintainers.nix +++ b/lib/maintainers.nix @@ -340,6 +340,7 @@ nequissimus = "Tim Steinbach "; nfjinjing = "Jinjing Wang "; nhooyr = "Anmol Sethi "; + nickhu = "Nick Hu "; nicknovitski = "Nick Novitski "; nico202 = "Nicolò Balzarotti "; NikolaMandic = "Ratko Mladic "; diff --git a/pkgs/applications/science/programming/fdr/default.nix b/pkgs/applications/science/programming/fdr/default.nix new file mode 100644 index 000000000000..a82027a628f3 --- /dev/null +++ b/pkgs/applications/science/programming/fdr/default.nix @@ -0,0 +1,69 @@ +{stdenv, fetchurl, qtbase, qtx11extras, ncurses, xorg, zlib, python27Packages}: +stdenv.mkDerivation { + name = "fdr-4.2.0"; + src = fetchurl { + url = https://www.cs.ox.ac.uk/projects/fdr/downloads/fdr-3754-linux-x86_64.tar.gz; + sha256 = "d24492485db9b8b95c62c53a6396094f836ee079cfc743688a397503c3ec9bf8"; + }; + + libPath = stdenv.lib.makeLibraryPath [ + stdenv.cc.cc + python27Packages.python + qtbase + qtx11extras + ncurses + xorg.libX11 + xorg.libXft + zlib + ]; + + phases = [ "unpackPhase" "installPhase" ]; + installPhase = '' + mkdir -p "$out" + + # shipped Qt is buggy + rm lib/libQt* + rm -r lib/qt_plugins + + cp -r * "$out" + # Hack around lack of libtinfo in NixOS + ln -s ${ncurses.out}/lib/libncursesw.so.6 $out/lib/libtinfo.so.5 + ln -s ${qtbase.out}/lib/qt5/plugins $out/lib/qt_plugins + ln -s ${zlib.out}/lib/libz.so.1 $out/lib/libz.so.1 + + for b in fdr4 _fdr4 refines _refines cspmprofiler cspmexplorerprof + do + patchelf --set-interpreter $(cat $NIX_CC/nix-support/dynamic-linker) \ + --set-rpath "$libPath:$out/lib" \ + "$out/bin/$b" + done + + for l in corei7/librefines.so \ + libcspm_process_compiler.so \ + libcsp_operators.so \ + _fdr.so \ + libfdr.so \ + libfdr_java.so \ + libprocess_compiler.so \ + librefines_gui.so \ + librefines_licensing.so \ + libboost_date_time.so.1.60.0 \ + libboost_filesystem.so.1.60.0 \ + libboost_iostreams.so.1.60.0 \ + libboost_program_options.so.1.60.0 \ + libboost_serialization.so.1.60.0 \ + libboost_system.so.1.60.0 + do + patchelf --set-rpath "$libPath:$out/lib" \ + "$out/lib/$l" + done + ''; + + meta = with stdenv.lib; { + homepage = https://www.cs.ox.ac.uk/projects/fdr/; + description = "The CSP refinement checker"; + license = licenses.unfreeRedistributable; + platforms = platforms.linux; + maintainers = with maintainers; [ nickhu ]; + }; +} diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 96b56479d57d..5ce7ebf857d6 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -13207,6 +13207,8 @@ with pkgs; fbreader = callPackage ../applications/misc/fbreader { }; + fdr = qt57.callPackage ../applications/science/programming/fdr { }; + fehlstart = callPackage ../applications/misc/fehlstart { }; fetchmail = callPackage ../applications/misc/fetchmail { };