Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
at netboot-syslinux-multiplatform 51 lines 1.2 kB view raw
1{ stdenv 2, lib 3, fetchFromGitHub 4, groff 5, cmake 6, python2 7, perl 8, libffi 9, libbfd 10, libxml2 11, valgrind 12, ncurses 13, zlib 14}: 15 16stdenv.mkDerivation { 17 pname = "llvm"; 18 version = "3.6-mono-2017-02-15"; 19 20 src = fetchFromGitHub { 21 owner = "mono"; 22 repo = "llvm"; 23 rev = "dbb6fdffdeb780d11851a6be77c209bd7ada4bd3"; 24 sha256 = "07wd1cs3fdvzb1lv41b655z5zk34f47j8fgd9ljjimi5j9pj71f7"; 25 }; 26 27 nativeBuildInputs = [ cmake ]; 28 buildInputs = [ perl groff libxml2 python2 libffi ] ++ lib.optional stdenv.isLinux valgrind; 29 30 propagatedBuildInputs = [ ncurses zlib ]; 31 32 # hacky fix: created binaries need to be run before installation 33 preBuild = '' 34 mkdir -p $out/ 35 ln -sv $PWD/lib $out 36 ''; 37 postBuild = "rm -fR $out"; 38 39 cmakeFlags = with stdenv; [ 40 "-DLLVM_ENABLE_FFI=ON" 41 "-DLLVM_BINUTILS_INCDIR=${libbfd.dev}/include" 42 ] ++ lib.optional (!isDarwin) "-DBUILD_SHARED_LIBS=ON"; 43 44 meta = { 45 description = "Collection of modular and reusable compiler and toolchain technologies - Mono build"; 46 homepage = "http://llvm.org/"; 47 license = lib.licenses.bsd3; 48 maintainers = with lib.maintainers; [ thoughtpolice ]; 49 platforms = lib.platforms.all; 50 }; 51}