forked from rarias/jungle
		
	
		
			
				
	
	
		
			79 lines
		
	
	
		
			1.4 KiB
		
	
	
	
		
			Nix
		
	
	
	
	
	
			
		
		
	
	
			79 lines
		
	
	
		
			1.4 KiB
		
	
	
	
		
			Nix
		
	
	
	
	
	
| { stdenv
 | |
| , lib
 | |
| , fetchFromGitHub
 | |
| , autoreconfHook
 | |
| , boost
 | |
| , libxml2
 | |
| , xml2
 | |
| , autoconf
 | |
| , automake
 | |
| , pkg-config
 | |
| , zlib
 | |
| 
 | |
| , enableDebug ? false
 | |
| }:
 | |
| 
 | |
| let
 | |
|   version = "4.12.0";
 | |
| in
 | |
| stdenv.mkDerivation {
 | |
|   pname = "paraver-kernel";
 | |
|   inherit version;
 | |
| 
 | |
|   src = fetchFromGitHub {
 | |
|     owner = "bsc-performance-tools";
 | |
|     repo = "paraver-kernel";
 | |
|     rev = "v${version}";
 | |
|     sha256 = "sha256-Xs7g8ITZhPt00v7o2WlTddbou8C8Rc9kBMFpl2WsCS4=";
 | |
|   };
 | |
| 
 | |
|   patches = [
 | |
|     # https://github.com/bsc-performance-tools/paraver-kernel/pull/11
 | |
|     # TODO: add this back if it's still relevant
 | |
|     # ./dont-expand-colors.patch
 | |
|     ./fix-libxml2-deprecation.patch
 | |
|   ];
 | |
| 
 | |
|   hardeningDisable = [ "all" ];
 | |
|   enableParallelBuilding = true;
 | |
| 
 | |
|   dontStrip = true;
 | |
| 
 | |
|   env =
 | |
|     let
 | |
|       flags = "-DPARALLEL_ENABLED " + (if enableDebug then "-ggdb -Og" else "-O3");
 | |
|     in
 | |
|     {
 | |
|       CFLAGS = flags;
 | |
|       CXXFLAGS = flags;
 | |
|     };
 | |
| 
 | |
|   configureFlags = [
 | |
|     "--with-boost=${boost}"
 | |
|     "--enable-openmp"
 | |
|   ];
 | |
| 
 | |
|   nativeBuildInputs = [
 | |
|     autoreconfHook
 | |
|     autoconf
 | |
|     automake
 | |
|     pkg-config
 | |
|   ];
 | |
| 
 | |
|   buildInputs = [
 | |
|     boost
 | |
|     libxml2.dev
 | |
|     xml2
 | |
|     zlib
 | |
|   ];
 | |
| 
 | |
|   meta = {
 | |
|     homepage = "https://tools.bsc.es/paraver";
 | |
|     downloadPage = "https://github.com/bsc-performance-tools/paraver-kernel";
 | |
|     description = "Kernel library used by wxparaver";
 | |
|     maintainers = with lib.maintainers.bsc; [ rarias ];
 | |
|     platforms = lib.platforms.linux;
 | |
|     license = lib.licenses.lgpl21Plus;
 | |
|   };
 | |
| }
 |