nixpkgs mirror (for testing)
github.com/NixOS/nixpkgs
nix
1{
2 lib,
3 stdenv,
4 fetchurl,
5 fastjet,
6}:
7
8stdenv.mkDerivation rec {
9 pname = "fastjet-contrib";
10 version = "1.101";
11
12 src = fetchurl {
13 url = "https://fastjet.hepforge.org/contrib/downloads/fjcontrib-${version}.tar.gz";
14 sha256 = "sha256-2+itIZn3LWTdKfYhj29T793I+z5d2cXRDy/R4j1uRPY=";
15 };
16
17 buildInputs = [ fastjet ];
18
19 postPatch = ''
20 for f in Makefile.in */Makefile scripts/internal/Template/Makefile; do
21 substituteInPlace "$f" --replace "CXX=g++" ""
22 substituteInPlace "$f" --replace-quiet "ar " "${stdenv.cc.targetPrefix}ar "
23 substituteInPlace "$f" --replace-quiet "ranlib " "${stdenv.cc.targetPrefix}ranlib "
24 done
25 patchShebangs --build ./utils/check.sh ./utils/install-sh
26 substituteInPlace configure \
27 --replace-warn "-Wl,-soname,fastjetcontribfragile.so.0" "-Wl,-soname,libfastjetcontribfragile.so"
28 '';
29
30 # Written in shell manually, does not support autoconf-style
31 # --build=/--host= options:
32 # Error: --build=x86_64-unknown-linux-gnu: unrecognised argument
33 configurePlatforms = [ ];
34
35 configureFlags = [
36 "--fastjet-config=${lib.getExe' (lib.getDev fastjet) "fastjet-config"}"
37 ];
38
39 enableParallelBuilding = true;
40
41 doCheck = true;
42
43 postBuild = ''
44 make fragile-shared
45 '';
46
47 postInstall = ''
48 make fragile-shared-install
49 '';
50
51 meta = {
52 description = "Third party extensions for FastJet";
53 homepage = "http://fastjet.fr/";
54 changelog = "https://phab.hepforge.org/source/fastjetsvn/browse/contrib/tags/${version}/NEWS?as=source&blame=off";
55 license = lib.licenses.gpl2Plus;
56 maintainers = with lib.maintainers; [ veprbl ];
57 platforms = lib.platforms.unix;
58 };
59}