2021-01-11 07:54:33 +00:00
|
|
|
{ lib, stdenv, fetchurl
|
2021-01-19 06:50:56 +00:00
|
|
|
, autoconf, automake, pkg-config, shared-mime-info, intltool
|
2016-09-11 22:24:51 +01:00
|
|
|
, glib, mono, gtk-sharp-2_0, gnome2, gnome-sharp, unzip
|
2015-05-22 14:25:02 +01:00
|
|
|
, dotnetPackages
|
2014-11-06 00:32:05 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
2015-06-15 04:21:11 +01:00
|
|
|
version = "5.9.4.5";
|
|
|
|
revision = "8010a90f6e246b32364e3fb46ef2c9d1be9c9a2b";
|
2019-08-15 13:41:18 +01:00
|
|
|
pname = "monodevelop";
|
2015-03-30 23:48:25 +01:00
|
|
|
|
2015-05-05 10:26:17 +01:00
|
|
|
src = fetchurl {
|
2019-08-15 13:41:18 +01:00
|
|
|
url = "https://download.mono-project.com/sources/monodevelop/${pname}-${version}.tar.bz2";
|
2015-06-15 04:21:11 +01:00
|
|
|
sha256 = "0bim4bfv3zwijafl9g0cx3159zq43dlcv74mnyrda41j4p52w5ji";
|
2015-05-05 10:26:17 +01:00
|
|
|
};
|
|
|
|
|
2015-05-22 14:25:02 +01:00
|
|
|
nunit2510 = fetchurl {
|
2018-11-24 22:47:52 +00:00
|
|
|
url = "https://launchpad.net/nunitv2/2.5/2.5.10/+download/NUnit-2.5.10.11092.zip";
|
2015-05-05 10:26:17 +01:00
|
|
|
sha256 = "0k5h5bz1p2v3d0w0hpkpbpvdkcszgp8sr9ik498r1bs72w5qlwnc";
|
|
|
|
};
|
|
|
|
|
2015-03-30 23:48:25 +01:00
|
|
|
postPatch = ''
|
|
|
|
# From https://bugzilla.xamarin.com/show_bug.cgi?id=23696#c19
|
|
|
|
|
|
|
|
# cecil needs NUnit 2.5.10 - this is also missing from the tar
|
2015-05-22 14:25:02 +01:00
|
|
|
unzip -j ${nunit2510} -d external/cecil/Test/libs/nunit-2.5.10 NUnit-2.5.10.11092/bin/net-2.0/framework/\*
|
2015-03-30 23:48:25 +01:00
|
|
|
|
|
|
|
# the tar doesn't include the nuget binary, so grab it from github and copy it
|
|
|
|
# into the right place
|
2015-05-22 14:25:02 +01:00
|
|
|
cp -vfR "$(dirname $(pkg-config NuGet.Core --variable=Libraries))"/* external/nuget-binary/
|
2015-05-05 10:26:17 +01:00
|
|
|
'';
|
2014-11-06 00:32:05 +00:00
|
|
|
|
2015-05-22 14:25:02 +01:00
|
|
|
# Revert this commit which broke the ability to use pkg-config to locate dlls
|
|
|
|
patchFlags = [ "-p2" ];
|
|
|
|
patches = [ ./git-revert-12d610fb3f6dce121df538e36f21d8c2eeb0a6e3.patch ];
|
|
|
|
|
2021-02-20 21:01:53 +00:00
|
|
|
nativeBuildInputs = [ pkg-config unzip ];
|
2014-11-06 00:32:05 +00:00
|
|
|
buildInputs = [
|
2018-02-25 02:23:58 +00:00
|
|
|
autoconf automake shared-mime-info intltool
|
2021-02-20 21:01:53 +00:00
|
|
|
mono gtk-sharp-2_0 gnome-sharp
|
2015-05-22 14:25:02 +01:00
|
|
|
dotnetPackages.NUnit
|
|
|
|
dotnetPackages.NUnitRunners
|
|
|
|
dotnetPackages.Nuget
|
2014-11-06 00:32:05 +00:00
|
|
|
];
|
|
|
|
|
|
|
|
preConfigure = "patchShebangs ./configure";
|
2015-05-05 10:26:17 +01:00
|
|
|
|
2014-11-06 00:32:05 +00:00
|
|
|
preBuild = ''
|
2015-03-30 23:48:25 +01:00
|
|
|
cat > ./buildinfo <<EOF
|
2014-11-06 00:32:05 +00:00
|
|
|
Release ID: ${version}
|
|
|
|
Git revision: ${revision}
|
|
|
|
Build date: 1970-01-01 00:00:01
|
|
|
|
EOF
|
|
|
|
'';
|
|
|
|
|
|
|
|
postInstall = ''
|
|
|
|
for prog in monodevelop mdtool; do
|
|
|
|
patch -p 0 $out/bin/$prog <<EOF
|
|
|
|
2a3,5
|
2016-09-11 22:24:51 +01:00
|
|
|
> export MONO_GAC_PREFIX=${gnome-sharp}:${gtk-sharp-2_0}:\$MONO_GAC_PREFIX
|
2014-11-06 00:32:05 +00:00
|
|
|
> export PATH=${mono}/bin:\$PATH
|
2021-01-15 13:21:58 +00:00
|
|
|
> export LD_LIBRARY_PATH=${lib.makeLibraryPath [ glib gnome2.libgnomeui gnome2.gnome_vfs gnome-sharp gtk-sharp-2_0 gtk-sharp-2_0.gtk ]}:\$LD_LIBRARY_PATH
|
2021-01-01 13:46:40 +00:00
|
|
|
>
|
2014-11-06 00:32:05 +00:00
|
|
|
EOF
|
|
|
|
done
|
2015-05-22 14:25:02 +01:00
|
|
|
|
|
|
|
# Without this, you get a missing DLL error any time you install an addin..
|
|
|
|
ln -sv `pkg-config nunit.core --variable=Libraries` $out/lib/monodevelop/AddIns/NUnit
|
|
|
|
ln -sv `pkg-config nunit.core.interfaces --variable=Libraries` $out/lib/monodevelop/AddIns/NUnit
|
|
|
|
ln -sv `pkg-config nunit.framework --variable=Libraries` $out/lib/monodevelop/AddIns/NUnit
|
|
|
|
ln -sv `pkg-config nunit.util --variable=Libraries` $out/lib/monodevelop/AddIns/NUnit
|
2014-11-06 00:32:05 +00:00
|
|
|
'';
|
|
|
|
|
|
|
|
dontStrip = true;
|
|
|
|
|
2021-01-11 07:54:33 +00:00
|
|
|
meta = with lib; {
|
2014-11-06 00:32:05 +00:00
|
|
|
platforms = platforms.linux;
|
2015-03-30 23:48:25 +01:00
|
|
|
maintainers = with maintainers; [ obadz ];
|
2018-09-21 10:42:59 +01:00
|
|
|
broken = true; # 2018-09-21, build has failed since 2018-03-08
|
2014-11-06 00:32:05 +00:00
|
|
|
};
|
|
|
|
}
|