git.iko.soy/typeable/nixpkgs
on master help sign in
ldc: Init at 1.3.0
commit8a2a3dad80070d4a8fc05445a30b1176c2126133 authorThomas Mader <thomas.mader@gmail.com> dateSun 27 Aug 2017, 19:07 (9 years ago) parent5a35b07
5 files changed+104−1
lib/maintainers.nix+1 pkgs/development/compilers/dmd/default.nix+1 pkgs/development/compilers/ldc/default.nix+98 pkgs/development/tools/dtools/default.nix+2−1 pkgs/top-level/all-packages.nix+2
lib/maintainers.nix+1
@@ -575,6 +575,7 @@
575575 thammers = "Tobias Hammerschmidt <jawr@gmx.de>";
576576 the-kenny = "Moritz Ulrich <moritz@tarn-vedra.de>";
577577 theuni = "Christian Theune <ct@flyingcircus.io>";
578+ ThomasMader = "Thomas Mader <thomas.mader@gmail.com>";
578579 thoughtpolice = "Austin Seipp <aseipp@pobox.com>";
579580 timbertson = "Tim Cuthbertson <tim@gfxmonk.net>";
580581 titanous = "Jonathan Rudenberg <jonathan@titanous.com>";
pkgs/development/compilers/dmd/default.nix+1
@@ -158,6 +158,7 @@ stdenv.mkDerivation rec {
158158 # Everything is now Boost licensed, even the backend.
159159 # https://github.com/dlang/dmd/pull/6680
160160 license = licenses.boost;
161+ maintainers = with maintainers; [ ThomasMader ];
161162 platforms = platforms.unix;
162163 };
163164}
pkgs/development/compilers/ldc/default.nixnew file+98
@@ -0,0 +1,98 @@
1+{ stdenv, fetchFromGitHub, cmake, llvm, dmd, curl, tzdata, python,
2+ lit, gdb, unzip, darwin }:
3+
4+stdenv.mkDerivation rec {
5+ name = "ldc-${version}";
6+ version = "1.3.0";
7+
8+ srcs = [
9+ (fetchFromGitHub {
10+ owner = "ldc-developers";
11+ repo = "ldc";
12+ rev = "v${version}";
13+ sha256 = "1ac3j4cwwgjpayhijxx4d6478bc3iqksjxkd7xp7byx7k8w1ppdl";
14+ })
15+ (fetchFromGitHub {
16+ owner = "ldc-developers";
17+ repo = "druntime";
18+ rev = "ldc-v${version}";
19+ sha256 = "1m13370wnj3sizqk3sdpzi9am5d24srf27d613qblhqa9n8vwz30";
20+ })
21+ (fetchFromGitHub {
22+ owner = "ldc-developers";
23+ repo = "phobos";
24+ rev = "ldc-v${version}";
25+ sha256 = "0fhcdfi7a00plwj27ysfyv783nhk0kspq7hawf6vbsl3s1nyvn8g";
26+ })
27+ (fetchFromGitHub {
28+ owner = "ldc-developers";
29+ repo = "dmd-testsuite";
30+ rev = "ldc-v${version}";
31+ sha256 = "0dmdkp220gqhxjrmrjfkf0vsvylwfaj70hswavq4q3v4dg17pzmj";
32+ })
33+ ];
34+
35+ sourceRoot = ".";
36+
37+ postUnpack = ''
38+ mv ldc-v${version}-src/* .
39+
40+ mv druntime-ldc-v${version}-src/* runtime/druntime
41+
42+ mv phobos-ldc-v${version}-src/* runtime/phobos
43+
44+ mv dmd-testsuite-ldc-v${version}-src/* tests/d2/dmd-testsuite
45+
46+ # Remove cppa test for now because it doesn't work.
47+ rm tests/d2/dmd-testsuite/runnable/cppa.d
48+ rm tests/d2/dmd-testsuite/runnable/extra-files/cppb.cpp
49+ '';
50+
51+ postPatch = ''
52+ substituteInPlace runtime/phobos/std/net/curl.d \
53+ --replace libcurl.so ${curl.out}/lib/libcurl.so
54+
55+ # Ugly hack to fix the hardcoded path to zoneinfo in the source file.
56+ # https://issues.dlang.org/show_bug.cgi?id=15391
57+ substituteInPlace runtime/phobos/std/datetime.d \
58+ --replace /usr/share/zoneinfo/ ${tzdata}/share/zoneinfo/
59+ ''
60+
61+ + stdenv.lib.optionalString stdenv.hostPlatform.isDarwin ''
62+ substituteInPlace driver/tool.cpp \
63+ --replace "gcc" "clang"
64+ '';
65+
66+ nativeBuildInputs = [ cmake llvm dmd python lit gdb unzip ]
67+
68+ ++ stdenv.lib.optional stdenv.hostPlatform.isDarwin (with darwin.apple_sdk.frameworks; [
69+ Foundation
70+ ]);
71+
72+ buildInputs = [ curl tzdata stdenv.cc ];
73+
74+ preConfigure = ''
75+ cmakeFlagsArray=("-DINCLUDE_INSTALL_DIR=$out/include/dlang/ldc")
76+ '';
77+
78+ postConfigure = ''
79+ export DMD=$PWD/bin/ldc2
80+ '';
81+
82+ makeFlags = [ "DMD=$DMD" ];
83+
84+ doCheck = true;
85+
86+ checkPhase = ''
87+ ctest -j $NIX_BUILD_CORES -V DMD=$DMD
88+ '';
89+
90+ meta = with stdenv.lib; {
91+ description = "The LLVM-based D compiler";
92+ homepage = https://github.com/ldc-developers/ldc;
93+ # from https://github.com/ldc-developers/ldc/blob/master/LICENSE
94+ license = with licenses; [ bsd3 boost mit ncsa gpl2Plus ];
95+ maintainers = with maintainers; [ ThomasMader ];
96+ platforms = platforms.unix;
97+ };
98+}
pkgs/development/tools/dtools/default.nix+2−1
@@ -45,10 +45,11 @@ stdenv.mkDerivation rec {
4545 }
4646 '';
4747
48− meta = {
48+ meta = with stdenv.lib; {
4949 description = "Ancillary tools for the D programming language compiler";
5050 homepage = https://github.com/dlang/tools;
5151 license = lib.licenses.boost;
52+ maintainers = with maintainers; [ ThomasMader ];
5253 platforms = stdenv.lib.platforms.unix;
5354 };
5455}
pkgs/top-level/all-packages.nix+2
@@ -2784,6 +2784,8 @@ with pkgs;
27842784
27852785 kytea = callPackage ../tools/text/kytea { };
27862786
2787+ ldc = callPackage ../development/compilers/ldc { };
2788+
27872789 lbreakout2 = callPackage ../games/lbreakout2 { };
27882790
27892791 leocad = callPackage ../applications/graphics/leocad { };