From 87f098f0948acd60663effdb19353710b43c4f27 Mon Sep 17 00:00:00 2001 From: Austin Seipp Date: Fri, 28 Feb 2020 19:56:11 -0600 Subject: [PATCH] incrtcl: chores, maintain it, touch up results Soon, this will be needed for the Bluespec compiler. Signed-off-by: Austin Seipp --- .../development/libraries/incrtcl/default.nix | 34 ++++++++++++------- 1 file changed, 21 insertions(+), 13 deletions(-) diff --git a/pkgs/development/libraries/incrtcl/default.nix b/pkgs/development/libraries/incrtcl/default.nix index e7f575b04be7..a8a714067f4b 100644 --- a/pkgs/development/libraries/incrtcl/default.nix +++ b/pkgs/development/libraries/incrtcl/default.nix @@ -1,31 +1,39 @@ -{stdenv, fetchurl, tcl}: +{ stdenv, fetchurl, tcl }: -stdenv.mkDerivation { +stdenv.mkDerivation rec { pname = "incrtcl"; version = "4.2.0"; src = fetchurl { - url = mirror://sourceforge/incrtcl/%5BIncr%20Tcl_Tk%5D-source/3.4/itcl4.2.0.tar.gz; + url = "mirror://sourceforge/incrtcl/%5BIncr%20Tcl_Tk%5D-source/3.4/itcl${version}.tar.gz"; sha256 = "0w28v0zaraxcq1s9pa6cihqqwqvvwfgz275lks7w4gl7hxjxmasw"; }; buildInputs = [ tcl ]; configureFlags = [ "--with-tcl=${tcl}/lib" ]; + enableParallelBuilding = true; + patchPhase = '' - substituteInPlace configure --replace "\''${TCL_SRC_DIR}/generic" "${tcl}/include" - ''; - preConfigure = '' - configureFlags="--exec_prefix=$prefix $configureFlags" + substituteInPlace configure --replace "\''${TCL_SRC_DIR}/generic" "${tcl}/include" ''; - passthru = { - libPrefix = "itcl3.4"; - }; + preConfigure = '' + configureFlags="--exec_prefix=$prefix $configureFlags" + ''; + + postInstall = '' + rmdir $out/bin + mv $out/lib/itcl${version}/* $out/lib + rmdir $out/lib/itcl${version} + ''; + + outputs = [ "out" "dev" "man" ]; meta = with stdenv.lib; { - homepage = http://incrtcl.sourceforge.net/; + homepage = "http://incrtcl.sourceforge.net/"; description = "Object Oriented Enhancements for Tcl/Tk"; - platforms = platforms.unix; - license = licenses.tcltk; + license = licenses.tcltk; + platforms = platforms.unix; + maintainers = with maintainers; [ thoughtpolice ]; }; }