Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
at devShellTools-shell 48 lines 1.3 kB view raw
1{ 2 lib, 3 stdenv, 4 fetchFromGitHub, 5 autoreconfHook, 6}: 7 8stdenv.mkDerivation rec { 9 10 pname = "ColPack"; 11 version = "1.0.10"; 12 13 src = fetchFromGitHub { 14 owner = "CSCsw"; 15 repo = "ColPack"; 16 rev = "v" + version; 17 sha256 = "1p05vry940mrjp6236c0z83yizmw9pk6ly2lb7d8rpb7j9h03glr"; 18 }; 19 20 nativeBuildInputs = [ autoreconfHook ]; 21 22 configureFlags = [ 23 "--enable-openmp=${if stdenv.hostPlatform.isLinux then "yes" else "no"}" 24 "--enable-examples=no" 25 ]; 26 27 postInstall = '' 28 # Remove libtool archive 29 rm $out/lib/*.la 30 31 # Remove compiled examples (Basic examples get compiled anyway) 32 rm -r $out/examples 33 34 # Copy the example sources (Basic tree contains scripts and object files) 35 mkdir -p $out/share/ColPack/examples/Basic 36 cp SampleDrivers/Basic/*.cpp $out/share/ColPack/examples/Basic 37 cp -r SampleDrivers/Matrix* $out/share/ColPack/examples 38 ''; 39 40 meta = with lib; { 41 description = "Package comprising of implementations of algorithms for 42 vertex coloring and derivative computation"; 43 homepage = "https://cscapes.cs.purdue.edu/coloringpage/software.htm#functionalities"; 44 license = licenses.lgpl3Plus; 45 platforms = platforms.unix; 46 maintainers = with maintainers; [ edwtjo ]; 47 }; 48}