about summary refs log tree commit diff
path: root/nixpkgs/pkgs/development/libraries/zeroc-ice/default.nix
blob: 063d64c6905868a7286daf083fdce285016eba5b (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
{ stdenv, fetchFromGitHub, mcpp, bzip2, expat, openssl, db5
, darwin, libiconv, Security
}:

stdenv.mkDerivation rec {
  name = "zeroc-ice-${version}";
  version = "3.6.3";

  src = fetchFromGitHub {
    owner = "zeroc-ice";
    repo = "ice";
    rev = "v${version}";
    sha256 = "05xympbns32aalgcfcpxwfd7bvg343f16xpg6jv5s335ski3cjy2";
  };

  patches = [ ./makefile.patch ];

  buildInputs = [ mcpp bzip2 expat openssl db5 ]
    ++ stdenv.lib.optionals stdenv.isDarwin [ darwin.cctools libiconv Security ];

  postUnpack = ''
    sourceRoot=$sourceRoot/cpp
  '';

  prePatch = ''
    substituteInPlace config/Make.rules.Darwin \
        --replace xcrun ""
  '';

  makeFlags = [ "prefix=$(out)" "OPTIMIZE=yes" ];

  enableParallelBuilding = true;

  meta = with stdenv.lib; {
    homepage = http://www.zeroc.com/ice.html;
    description = "The internet communications engine";
    license = licenses.gpl2;
    platforms = platforms.unix;
  };
}