btrbk: add mainProgram
[NixPkgs.git] / pkgs / by-name / ac / ace / package.nix
blob01041c8586239fda6543cfbfd1a242da37dcc68c
1 { lib, stdenv, fetchurl, pkg-config, libtool, perl }:
3 stdenv.mkDerivation rec {
4   pname = "ace";
5   version = "7.0.11";
7   src = fetchurl {
8     url = "https://download.dre.vanderbilt.edu/previous_versions/ACE-${version}.tar.bz2";
9     sha256 = "sha256-r+LRiu/u1qMcbrjkSr8ErnemX6zvhgvc5cLWu8AQhww=";
10   };
12   enableParallelBuilding = true;
14   nativeBuildInputs = [ pkg-config libtool ];
15   buildInputs = [ perl ];
17   env.NIX_CFLAGS_COMPILE = toString [
18     "-Wno-error=format-security"
19   ];
21   postPatch = ''
22     patchShebangs ./MPC/prj_install.pl
23   '';
25   preConfigure = ''
26     export INSTALL_PREFIX=$out
27     export ACE_ROOT=$(pwd)
28     export LD_LIBRARY_PATH="$ACE_ROOT/ace:$ACE_ROOT/lib"
29     echo '#include "ace/config-linux.h"' > ace/config.h
30     echo 'include $(ACE_ROOT)/include/makeinclude/platform_linux.GNU'\
31     > include/makeinclude/platform_macros.GNU
32   '';
34   meta = with lib; {
35     homepage = "https://www.dre.vanderbilt.edu/~schmidt/ACE.html";
36     description = "ADAPTIVE Communication Environment";
37     mainProgram = "ace_gperf";
38     license = licenses.doc;
39     maintainers = with maintainers; [ nico202 ];
40     platforms = platforms.linux;
41   };