1
- { stdenv , fetchurl , ocaml , zlib , bzip2 , ncurses , file , gd , libpng , libjpeg } :
1
+ { stdenv , fetchurl , ocamlPackages , zlib , bzip2 , ncurses , file , gd , libpng , libjpeg } :
2
2
3
3
stdenv . mkDerivation ( rec {
4
- name = "mldonkey-3.1.5 " ;
4
+ name = "mldonkey-3.1.6 " ;
5
5
6
6
src = fetchurl {
7
- url = "mirror ://sourceforge/ mldonkey/${ name } . tar.bz2" ;
8
- sha256 = "1jqik6b09p27ckssppfiqpph7alxbgpnf9w1s0lalmi3qyyd9ybl " ;
7
+ url = https ://github.com/ygrek/ mldonkey/releases/download/release-3-1-6/mldonkey-3.1.6. tar.bz2;
8
+ sha256 = "0g84islkj72ymp0zzppcj9n4r21h0vlghnq87hv2wg580mybadhv " ;
9
9
} ;
10
10
11
- buildInputs = [ ocaml zlib ncurses bzip2 file gd libpng libjpeg ] ;
11
+ preConfigure = stdenv . lib . optionalString ( ocamlPackages . camlp4 != null ) ''
12
+ substituteInPlace Makefile --replace '+camlp4' \
13
+ '${ ocamlPackages . camlp4 } /lib/ocaml/${ ocamlPackages . ocaml . version } /site-lib/camlp4'
14
+ '' ;
15
+
16
+ buildInputs = [ zlib ncurses bzip2 file gd libpng libjpeg ] ++
17
+ ( with ocamlPackages ; [ ocaml camlp4 ] ) ;
12
18
configureFlags = [ "--disable-gui" ] ;
13
19
14
20
meta = {
@@ -17,7 +23,7 @@ stdenv.mkDerivation (rec {
17
23
license = stdenv . lib . licenses . gpl2 ;
18
24
platforms = stdenv . lib . platforms . unix ;
19
25
} ;
20
- } // ( if ! ocaml . nativeCompilers then
26
+ } // ( if ! ocamlPackages . ocaml . nativeCompilers then
21
27
{
22
28
# Byte code compilation (the ocaml opt compiler is not supported in some platforms)
23
29
buildPhase = "make mlnet.byte" ;
0 commit comments