58 lines
1.3 KiB
Nix
58 lines
1.3 KiB
Nix
{ stdenv, fetchFromGitHub
|
|
, cmake, dmd, cacert, openssl, libconfig, libedit, zlib, libxml2, curl, llvm }:
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
|
version = "1.2.0";
|
|
name = "ldc-${version}";
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "ldc-developers";
|
|
repo = "ldc";
|
|
rev = "e229b1d3810b4880440810c6ca0c23a762ec49cb";
|
|
sha256 = "0r73vdafmmd6nlxhh1wp3sz9ymni5c721svmbz23l3i0wjlc72ga";
|
|
fetchSubmodules = true;
|
|
};
|
|
|
|
# src = fetchgit {
|
|
# url = "https://github.com/ldc-developers/ldc.git";
|
|
# rev = "refs/tags/v${version}";
|
|
# sha256 = "12xbzc9b0hhgda8n0125yn4g545qpazhfpv8hjr26pc8qjg9rlq4";
|
|
# fetchSubmodules = true;
|
|
# };
|
|
|
|
# src = fetchurl {
|
|
# url = "https://github.com/ldc-developers/ldc/archive/v${version}.tar.gz";
|
|
# sha256 = "0plgvy9nybc4p41xx9rzrdlhxphbx2sx0sgj4xgg6ak1vac519sa";
|
|
# };
|
|
|
|
# postPatch = ''
|
|
# sed -i 's:bits/mathdef.h:math.h:' dmd2/root/port.c
|
|
# sed -i 's/::isnan/std::isnan/' dmd2/root/port.c
|
|
# sed -i 's/::isinf/std::isinf/' dmd2/root/port.c
|
|
# '';
|
|
|
|
buildInputs = [
|
|
cmake
|
|
dmd
|
|
cacert
|
|
openssl
|
|
libconfig
|
|
libedit
|
|
zlib
|
|
libxml2
|
|
curl
|
|
llvm
|
|
];
|
|
|
|
enableParallelBuilding = true;
|
|
|
|
# cmakeFlags = [
|
|
# "-DCMAKE_BUILD_TYPE=Release"
|
|
# "-DCMAKE_CXX_FLAGS_RELEASE=-std=c++11"
|
|
# "-DLLVM_ROOT_DIR=${llvm}"
|
|
# "-DCMAKE_C_COMPILER=${gcc5}/bin/cc"
|
|
# "-DCMAKE_CXX_COMPILER=${gcc5}/bin/g++"
|
|
# ];
|
|
}
|