nerdfonts: fix wrong attribute name in error message (#364463)
[NixPkgs.git] / pkgs / by-name / ze / zeroc-ice / package.nix
blob2bcd6e85f3995ebc81c0cfc6064e5ee0dbaceda0
2   stdenv,
3   lib,
4   fetchFromGitHub,
5   bzip2,
6   expat,
7   libedit,
8   lmdb,
9   openssl,
10   libxcrypt,
11   python3, # for tests only
12   cpp11 ? false,
15 let
16   zeroc_mcpp = stdenv.mkDerivation rec {
17     pname = "zeroc-mcpp";
18     version = "2.7.2.14";
20     src = fetchFromGitHub {
21       owner = "zeroc-ice";
22       repo = "mcpp";
23       rev = "v${version}";
24       sha256 = "1psryc2ql1cp91xd3f8jz84mdaqvwzkdq2pr96nwn03ds4cd88wh";
25     };
27     configureFlags = [ "--enable-mcpplib" ];
28     installFlags = [ "PREFIX=$(out)" ];
29   };
32 stdenv.mkDerivation rec {
33   pname = "zeroc-ice";
34   version = "3.7.10";
36   src = fetchFromGitHub {
37     owner = "zeroc-ice";
38     repo = "ice";
39     rev = "v${version}";
40     hash = "sha256-l3cKsR8HSdtFGw1S12xueQOu/U9ABlOxQQtbHBj2izs=";
41   };
43   buildInputs = [
44     zeroc_mcpp
45     bzip2
46     expat
47     libedit
48     lmdb
49     openssl
50     libxcrypt
51   ];
53   preBuild = ''
54     makeFlagsArray+=(
55       "prefix=$out"
56       "OPTIMIZE=yes"
57       "USR_DIR_INSTALL=yes"
58       "LANGUAGES=cpp"
59       "CONFIGS=${if cpp11 then "cpp11-shared" else "shared"}"
60       "SKIP=slice2py" # provided by a separate package
61     )
62   '';
64   enableParallelBuilding = true;
66   outputs = [
67     "out"
68     "bin"
69     "dev"
70   ];
72   doCheck = true;
73   nativeCheckInputs = with python3.pkgs; [ passlib ];
74   checkPhase =
75     let
76       # these tests require network access so we need to skip them.
77       brokenTests = map lib.escapeRegex [
78         "Ice/udp"
79         "Glacier2"
80         "IceGrid/simple"
81         "IceStorm"
82         "IceDiscovery/simple"
84         # FIXME: certificate expired, remove for next release?
85         "IceSSL/configuration"
86       ];
87       # matches CONFIGS flag in makeFlagsArray
88       configFlag = lib.optionalString cpp11 "--config=cpp11-shared";
89     in
90     ''
91       runHook preCheck
92       ${python3.interpreter} ./cpp/allTests.py ${configFlag} --rfilter='${lib.concatStringsSep "|" brokenTests}'
93       runHook postCheck
94     '';
96   postInstall = ''
97     mkdir -p $bin $dev/share
98     mv $out/bin $bin
99     mv $out/share/ice $dev/share
100   '';
102   meta = with lib; {
103     homepage = "https://www.zeroc.com/ice.html";
104     description = "Internet communications engine";
105     license = licenses.gpl2Only;
106     platforms = platforms.unix;
107     maintainers = with maintainers; [ abbradar ];
108     broken = stdenv.hostPlatform.isDarwin;
109   };