lol

cpp_ethereum: init at 1.2.9 jsoncpp: 1.6.5 -> 1.7.2 libjson_rpc_cpp: 0.2.1 -> 0.6.0 argtable: init at 3.0.1 libcpuid: init at 0.2.2

artuuge 83fd6399 7d67a4da

+436 -56
+152
pkgs/applications/misc/webthree-umbrella/default.nix
··· 1 + { stdenv 2 + , fetchgit 3 + , cmake 4 + , boost 5 + , gmp 6 + , jsoncpp 7 + , leveldb 8 + , cryptopp 9 + , libcpuid 10 + , miniupnpc 11 + , libjson_rpc_cpp 12 + , curl 13 + , libmicrohttpd 14 + , mesa 15 + 16 + , opencl-headers ? null 17 + 18 + , withAMD ? false 19 + , amdappsdk ? null 20 + 21 + , withBeignet ? false 22 + , beignet ? null 23 + 24 + , withCUDA ? false 25 + , nvidia_x11 ? null 26 + 27 + , withGUI ? false 28 + , qtwebengine ? null 29 + , qtbase ? null 30 + , qtdeclarative ? null 31 + 32 + , withProfiling ? false 33 + , gperftools ? null 34 + 35 + , withEVMJIT ? false 36 + , llvm ? null 37 + , zlib ? null 38 + , ncurses ? null 39 + 40 + , extraCmakeFlags ? [] 41 + }: 42 + 43 + assert withAMD -> (amdappsdk != null); 44 + assert withBeignet -> (beignet != null); 45 + assert withCUDA -> (nvidia_x11 != null); 46 + assert stdenv.lib.findSingle (x: x) true false [ withAMD withBeignet withCUDA ]; 47 + 48 + assert withGUI -> (qtwebengine != null) && (qtbase != null) && (qtdeclarative != null); 49 + assert withProfiling -> (gperftools != null); 50 + assert withEVMJIT -> (llvm != null) && (zlib != null) && (ncurses != null); 51 + 52 + let 53 + withOpenCL = (stdenv.lib.any (x: x) [ withAMD withBeignet withCUDA ]); 54 + in 55 + 56 + assert withOpenCL -> (opencl-headers != null); 57 + 58 + stdenv.mkDerivation rec { 59 + name = "cpp-ethereum-${version}"; 60 + version = "1.2.9"; 61 + 62 + src = fetchgit { 63 + url = https://github.com/ethereum/webthree-umbrella.git; 64 + rev = "850479b159a0bfa316fd261ab96b0a043acd766c"; 65 + sha256 = "0k8w8gqzy71x77p0p85r38gfdnzrlzk2yvb3ablml9ppg4qb4ch5"; 66 + }; 67 + 68 + patchPhase = stdenv.lib.optional withBeignet '' 69 + sed -i -re 's#NAMES\ (OpenCL.*)#NAMES\ libcl.so\ \1#g' webthree-helpers/cmake/FindOpenCL.cmake 70 + ''; 71 + 72 + cmakeFlags = with stdenv.lib; concatStringsSep " " (flatten [ 73 + "-DCMAKE_BUILD_TYPE=Release" 74 + "-DGUI=${toString withGUI}" 75 + "-DETHASHCL=${toString withOpenCL}" 76 + "-DPROFILING=${toString withProfiling}" 77 + "-DEVMJIT=${toString withEVMJIT}" 78 + (optional withOpenCL "-DCMAKE_INCLUDE_PATH=${opencl-headers}/include") 79 + (optional withAMD "-DCMAKE_LIBRARY_PATH=${amdappsdk}/lib") 80 + (optional withBeignet "-DCMAKE_LIBRARY_PATH=${beignet}/lib/beignet") 81 + (optional withCUDA "-DCMAKE_LIBRARY_PATH=${nvidia_x11}/lib") 82 + (optional withEVMJIT "-DCMAKE_PREFIX_PATH=${llvm}") 83 + extraCmakeFlags 84 + ]); 85 + 86 + configurePhase = '' 87 + export BOOST_INCLUDEDIR=${boost}/include 88 + export BOOST_LIBRARYDIR=${boost.out}/lib 89 + 90 + mkdir -p Build/Install 91 + pushd Build 92 + 93 + cmake .. -DCMAKE_INSTALL_PREFIX=$(pwd)/Install $cmakeFlags 94 + ''; 95 + 96 + buildInputs = with stdenv.lib; [ 97 + cmake 98 + boost 99 + gmp 100 + jsoncpp 101 + leveldb 102 + cryptopp 103 + libcpuid 104 + miniupnpc 105 + libjson_rpc_cpp 106 + curl 107 + libmicrohttpd 108 + mesa 109 + (optional withOpenCL opencl-headers) 110 + (optional withAMD amdappsdk) 111 + (optional withBeignet beignet) 112 + (optional withCUDA nvidia_x11) 113 + (optional withGUI [ 114 + qtwebengine 115 + qtbase 116 + qtdeclarative 117 + ]) 118 + (optional withProfiling gperftools) 119 + (optional withEVMJIT [ 120 + llvm 121 + zlib 122 + ncurses 123 + ]) 124 + ]; 125 + 126 + runPath = with stdenv.lib; concatStringsSep ":" (flatten [ 127 + (makeLibraryPath (flatten [ stdenv.cc.cc buildInputs ])) 128 + (optional withBeignet "${beignet}/lib/beignet") 129 + ]); 130 + 131 + installPhase = '' 132 + make install 133 + 134 + mkdir -p $out 135 + 136 + for f in Install/lib/*.so* $(find Install/bin -executable -type f); do 137 + patchelf --set-rpath $runPath:$out/lib $f 138 + done 139 + 140 + cp -r Install/* $out 141 + ''; 142 + 143 + dontStrip = true; 144 + 145 + meta = with stdenv.lib; { 146 + decription = "Umbrella project for the Ethereum C++ implementation"; 147 + homepage = https://github.com/ethereum/webthree-umbrella.git; 148 + license = licenses.gpl3; 149 + maintainers = with maintainers; [ artuuge ]; 150 + platforms = platforms.linux; 151 + }; 152 + }
+48
pkgs/development/libraries/jsoncpp/1.6.5/default.nix
··· 1 + { stdenv, fetchFromGitHub, cmake, python }: 2 + 3 + stdenv.mkDerivation rec { 4 + name = "jsoncpp-${version}"; 5 + version = "1.6.5"; 6 + 7 + src = fetchFromGitHub { 8 + owner = "open-source-parsers"; 9 + repo = "jsoncpp"; 10 + rev = version; 11 + sha256 = "08y54n4v3q18ik8iv8zyziava3x130ilzf1l3qli3vjwf6l42fm0"; 12 + }; 13 + 14 + /* During darwin bootstrap, we have a cp that doesn't understand the 15 + * --reflink=auto flag, which is used in the default unpackPhase for dirs 16 + */ 17 + unpackPhase = '' 18 + cp -a ${src} ${src.name} 19 + chmod -R +w ${src.name} 20 + export sourceRoot=${src.name} 21 + ''; 22 + 23 + # Hack to be able to run the test, broken because we use 24 + # CMAKE_SKIP_BUILD_RPATH to avoid cmake resetting rpath on install 25 + preBuild = '' 26 + export LD_LIBRARY_PATH="`pwd`/src/lib_json:$LD_LIBRARY_PATH" 27 + ''; 28 + 29 + nativeBuildInputs = [ cmake python ]; 30 + 31 + CXXFLAGS = "-Wno-shift-negative-value"; 32 + 33 + cmakeFlags = [ 34 + "-DJSONCPP_LIB_BUILD_SHARED=ON" 35 + "-DJSONCPP_LIB_BUILD_STATIC=OFF" 36 + "-DJSONCPP_WITH_CMAKE_PACKAGE=ON" 37 + ]; 38 + 39 + meta = { 40 + inherit version; 41 + homepage = https://github.com/open-source-parsers/jsoncpp; 42 + description = "A simple API to manipulate JSON data in C++"; 43 + maintainers = with stdenv.lib.maintainers; [ ttuegel page ]; 44 + platforms = stdenv.lib.platforms.all; 45 + license = stdenv.lib.licenses.mit; 46 + branch = "1.6"; 47 + }; 48 + }
+23 -37
pkgs/development/libraries/jsoncpp/default.nix
··· 1 - { stdenv, fetchFromGitHub, cmake, python }: 2 - 1 + { stdenv 2 + , fetchgit 3 + , cmake 4 + , python 5 + }: 3 6 stdenv.mkDerivation rec { 4 7 name = "jsoncpp-${version}"; 5 - version = "1.6.5"; 8 + version = "1.7.2"; 6 9 7 - src = fetchFromGitHub { 8 - owner = "open-source-parsers"; 9 - repo = "jsoncpp"; 10 - rev = version; 11 - sha256 = "08y54n4v3q18ik8iv8zyziava3x130ilzf1l3qli3vjwf6l42fm0"; 10 + src = fetchgit { 11 + url = https://github.com/open-source-parsers/jsoncpp.git; 12 + sha256 = "04w4cfmvyv52rpqhc370ln8rhlsrr515778bixhgafqbp3p4x34k"; 13 + rev = "c8054483f82afc3b4db7efe4e5dc034721649ec8"; 12 14 }; 13 15 14 - /* During darwin bootstrap, we have a cp that doesn't understand the 15 - * --reflink=auto flag, which is used in the default unpackPhase for dirs 16 - */ 17 - unpackPhase = '' 18 - cp -a ${src} ${src.name} 19 - chmod -R +w ${src.name} 20 - export sourceRoot=${src.name} 21 - ''; 22 - 23 - # Hack to be able to run the test, broken because we use 24 - # CMAKE_SKIP_BUILD_RPATH to avoid cmake resetting rpath on install 25 - preBuild = '' 26 - export LD_LIBRARY_PATH="`pwd`/src/lib_json:$LD_LIBRARY_PATH" 27 - ''; 16 + configurePhase = '' 17 + mkdir -p Build 18 + pushd Build 28 19 29 - nativeBuildInputs = [ cmake python ]; 20 + mkdir -p $out 21 + cmake .. -DCMAKE_INSTALL_PREFIX=$out \ 22 + -DBUILD_SHARED_LIBS=ON \ 23 + -DCMAKE_BUILD_TYPE=Release 24 + ''; 30 25 31 - CXXFLAGS = "-Wno-shift-negative-value"; 32 - 33 - cmakeFlags = [ 34 - "-DJSONCPP_LIB_BUILD_SHARED=ON" 35 - "-DJSONCPP_LIB_BUILD_STATIC=OFF" 36 - "-DJSONCPP_WITH_CMAKE_PACKAGE=ON" 37 - ]; 26 + buildInputs = [ cmake python ]; 38 27 39 - meta = { 40 - inherit version; 28 + meta = with stdenv.lib; { 41 29 homepage = https://github.com/open-source-parsers/jsoncpp; 42 - description = "A simple API to manipulate JSON data in C++"; 43 - maintainers = with stdenv.lib.maintainers; [ ttuegel page ]; 44 - platforms = stdenv.lib.platforms.all; 45 - license = stdenv.lib.licenses.mit; 46 - branch = "1.6"; 30 + description = "A C++ library for interacting with JSON."; 31 + license = licenses.mit; 32 + platforms = platforms.linux; 47 33 }; 48 34 }
+30
pkgs/development/libraries/libjson-rpc-cpp/0.2.1/default.nix
··· 1 + { stdenv, fetchurl, cmake, curl }: 2 + 3 + let 4 + basename = "libjson-rpc-cpp"; 5 + version = "0.2.1"; 6 + in 7 + 8 + stdenv.mkDerivation { 9 + name = "${basename}-${version}"; 10 + 11 + src = fetchurl { 12 + url = "https://github.com/cinemast/${basename}/archive/${version}.tar.gz"; 13 + sha256 = "1pc9nn4968qkda8vr4f9dijn2fcldm8i0ymwmql29h4cl5ghdnpw"; 14 + }; 15 + 16 + buildInputs = [ cmake curl ]; 17 + 18 + NIX_LDFLAGS = "-lpthread"; 19 + enableParallelBuilding = true; 20 + doCheck = true; 21 + 22 + checkPhase = "LD_LIBRARY_PATH=out/ ctest"; 23 + 24 + meta = { 25 + description = "C++ framework for json-rpc (json remote procedure call)"; 26 + homepage = https://github.com/cinemast/libjson-rpc-cpp; 27 + license = stdenv.lib.licenses.mit; 28 + platforms = stdenv.lib.platforms.linux; 29 + }; 30 + }
+58 -19
pkgs/development/libraries/libjson-rpc-cpp/default.nix
··· 1 - { stdenv, fetchurl, cmake, curl }: 1 + { stdenv 2 + , fetchgit 3 + , cmake 4 + , jsoncpp 5 + , argtable 6 + , curl 7 + , libmicrohttpd 8 + , doxygen 9 + , catch 10 + }: 11 + stdenv.mkDerivation rec { 12 + name = "libjson-rpc-cpp-${version}"; 13 + version = "0.6.0"; 14 + 15 + src = fetchgit { 16 + url = https://github.com/cinemast/libjson-rpc-cpp.git; 17 + sha256 = "00fxxisg89zgg1wq047n8r8ws48jx35x3s6bbym4kg7dkxv9vv9f"; 18 + rev = "c6e3d7195060774bf95afc6df9c9588922076d3e"; 19 + }; 20 + 21 + patchPhase = '' 22 + for f in cmake/FindArgtable.cmake \ 23 + src/stubgenerator/stubgenerator.cpp \ 24 + src/stubgenerator/stubgeneratorfactory.cpp 25 + do 26 + sed -i -re 's/argtable2/argtable3/g' $f 27 + done 28 + 29 + sed -i -re 's#MATCHES "jsoncpp"#MATCHES ".*/jsoncpp/json$"#g' cmake/FindJsoncpp.cmake 30 + ''; 31 + 32 + configurePhase = '' 33 + mkdir -p Build/Install 34 + pushd Build 2 35 3 - let 4 - basename = "libjson-rpc-cpp"; 5 - version = "0.2.1"; 6 - in 36 + cmake .. -DCMAKE_INSTALL_PREFIX=$(pwd)/Install \ 37 + -DCMAKE_BUILD_TYPE=Release 38 + ''; 39 + 40 + installPhase = '' 41 + mkdir -p $out 7 42 8 - stdenv.mkDerivation { 9 - name = "${basename}-${version}"; 43 + function fixRunPath { 44 + p=$(patchelf --print-rpath $1) 45 + q="$p:${stdenv.lib.makeLibraryPath [ stdenv.cc.cc jsoncpp argtable libmicrohttpd curl ]}:$out/lib" 46 + patchelf --set-rpath $q $1 47 + } 10 48 11 - src = fetchurl { 12 - url = "https://github.com/cinemast/${basename}/archive/${version}.tar.gz"; 13 - sha256 = "1pc9nn4968qkda8vr4f9dijn2fcldm8i0ymwmql29h4cl5ghdnpw"; 14 - }; 49 + make install 15 50 16 - buildInputs = [ cmake curl ]; 51 + sed -i -re "s#-([LI]).*/Build/Install(.*)#-\1$out\2#g" Install/lib/pkgconfig/*.pc 52 + for f in Install/lib/*.so* $(find Install/bin -executable -type f); do 53 + fixRunPath $f 54 + done 55 + 56 + cp -r Install/* $out 57 + ''; 17 58 18 - NIX_LDFLAGS = "-lpthread"; 19 - enableParallelBuilding = true; 20 - doCheck = true; 59 + dontStrip = true; 21 60 22 - checkPhase = "LD_LIBRARY_PATH=out/ ctest"; 61 + buildInputs = [ cmake jsoncpp argtable curl libmicrohttpd doxygen catch ]; 23 62 24 - meta = { 63 + meta = with stdenv.lib; { 25 64 description = "C++ framework for json-rpc (json remote procedure call)"; 26 65 homepage = https://github.com/cinemast/libjson-rpc-cpp; 27 - license = stdenv.lib.licenses.mit; 28 - platforms = stdenv.lib.platforms.linux; 66 + license = licenses.mit; 67 + platforms = platforms.linux; 29 68 }; 30 69 }
+41
pkgs/tools/misc/argtable/default.nix
··· 1 + { stdenv 2 + , fetchgit 3 + }: 4 + stdenv.mkDerivation rec { 5 + name = "argtable-${version}"; 6 + version = "3.0.1"; 7 + 8 + src = fetchgit { 9 + url = https://github.com/argtable/argtable3.git; 10 + rev = "de93cfd85f755250285b337cba053a709a270721"; 11 + sha256 = "0fbvk78s3dwryrzgafdra0lb8w7lb873c6xgldl94ps9828x85i3"; 12 + }; 13 + 14 + buildPhase = '' 15 + gcc -shared -o libargtable3.so -fPIC argtable3.c 16 + 17 + pushd tests 18 + make 19 + popd 20 + ''; 21 + 22 + installPhase = '' 23 + mkdir -p $out/include 24 + cp argtable3.h $out/include 25 + 26 + mkdir -p $out/lib 27 + cp libargtable3.so $out/lib 28 + 29 + mkdir -p $out/src 30 + cp argtable3.c $out/src 31 + cp -r examples $out/src 32 + ln -s $out/include/argtable3.h $out/src/argtable3.h 33 + ''; 34 + 35 + meta = with stdenv.lib; { 36 + homepage = http://www.argtable.org/; 37 + description = "A Cross-Platform, Single-File, ANSI C Command-Line Parsing Library"; 38 + license = licenses.bsd3; 39 + maintainers = with maintainers; [ artuuge ]; 40 + }; 41 + }
+65
pkgs/tools/misc/libcpuid/default.nix
··· 1 + { stdenv 2 + , fetchgit 3 + , libtool 4 + , automake 5 + , autoconf 6 + , python 7 + }: 8 + stdenv.mkDerivation rec { 9 + name = "libcpuid-${version}"; 10 + version = "0.2.2"; 11 + 12 + src = fetchgit { 13 + url = https://github.com/anrieff/libcpuid.git; 14 + rev = "535ec64dd9d8df4c5a8d34b985280b58a5396fcf"; 15 + sha256 = "1j9pg7fyvqhr859k5yh8ccl9jjx65c7rrsddji83qmqyg0vp1k1a"; 16 + }; 17 + 18 + patchPhase = '' 19 + libtoolize 20 + autoreconf --install 21 + ''; 22 + 23 + configurePhase = '' 24 + mkdir -p Install 25 + ./configure --prefix=$(pwd)/Install 26 + substituteInPlace Makefile --replace "/usr/local" "$out" 27 + ''; 28 + 29 + buildPhase = '' 30 + make all 31 + ''; 32 + 33 + postInstall = '' 34 + pushd Install 35 + LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$(pwd)/lib ${python.interpreter} ../tests/run_tests.py ./bin/cpuid_tool ../tests/ 36 + popd 37 + 38 + function fixRunPath { 39 + p0=$(patchelf --print-rpath $1) 40 + p1=$(echo $p0 | sed -re 's#.*Install/lib:##g') 41 + patchelf --set-rpath $p1 $1 42 + } 43 + 44 + fixRunPath Install/bin/cpuid_tool 45 + 46 + mkdir -p $out 47 + sed -i -re "s#(prefix=).*Install#\1$out#g" Install/lib/pkgconfig/libcpuid.pc 48 + 49 + cp -r Install/* $out 50 + cp -r tests $out 51 + ''; 52 + 53 + buildInputs = [ 54 + libtool 55 + automake 56 + autoconf 57 + ]; 58 + 59 + meta = with stdenv.lib; { 60 + homepage = http://libcpuid.sourceforge.net/; 61 + description = "a small C library for x86 CPU detection and feature extraction"; 62 + license = licenses.bsd3; 63 + maintainers = with maintainers; [ artuuge ]; 64 + }; 65 + }
+19
pkgs/top-level/all-packages.nix
··· 412 412 413 413 apitrace = qt55.callPackage ../applications/graphics/apitrace {}; 414 414 415 + argtable = callPackage ../tools/misc/argtable {}; 416 + 415 417 argyllcms = callPackage ../tools/graphics/argyllcms {}; 416 418 417 419 arp-scan = callPackage ../tools/misc/arp-scan { }; ··· 2155 2157 leocad = callPackage ../applications/graphics/leocad { }; 2156 2158 2157 2159 less = callPackage ../tools/misc/less { }; 2160 + 2161 + libcpuid = callPackage ../tools/misc/libcpuid { }; 2158 2162 2159 2163 lesspipe = callPackage ../tools/misc/lesspipe { }; 2160 2164 ··· 7550 7554 7551 7555 jsoncpp = callPackage ../development/libraries/jsoncpp { }; 7552 7556 7557 + jsoncpp_1_6_5 = callPackage ../development/libraries/jsoncpp/1.6.5 { }; 7558 + 7553 7559 jsonnet = callPackage ../development/compilers/jsonnet { }; 7554 7560 7555 7561 libjson = callPackage ../development/libraries/libjson { }; ··· 8079 8085 libjreen = callPackage ../development/libraries/libjreen { }; 8080 8086 8081 8087 libjson_rpc_cpp = callPackage ../development/libraries/libjson-rpc-cpp { }; 8088 + 8089 + libjson_rpc_cpp_0_2_1 = callPackage ../development/libraries/libjson-rpc-cpp/0.2.1 { }; 8082 8090 8083 8091 libkate = callPackage ../development/libraries/libkate { }; 8084 8092 ··· 12241 12249 12242 12250 conkeror-unwrapped = callPackage ../applications/networking/browsers/conkeror { }; 12243 12251 conkeror = self.wrapFirefox conkeror-unwrapped { }; 12252 + 12253 + cpp_ethereum = callPackage ../applications/misc/webthree-umbrella { 12254 + # withCUDA = true; 12255 + # inherit (linuxPackages) nvidia_x11; 12256 + 12257 + # withEVMJIT = true; 12258 + # inherit (pkgs.llvmPackages_38) llvm; 12259 + 12260 + # withGUI = true; 12261 + # inherit (pkgs.qt5) qtwebengine qtbase qtdeclarative; 12262 + }; 12244 12263 12245 12264 csdp = callPackage ../applications/science/math/csdp { 12246 12265 liblapack = liblapackWithoutAtlas;