summary refs log tree commit diff
diff options
context:
space:
mode:
authorJörg Thalheim <Mic92@users.noreply.github.com>2018-01-08 23:36:30 +0100
committerGitHub <noreply@github.com>2018-01-08 23:36:30 +0100
commitd273f02cd194ad3f12cedf9aa89f51d4c4a36f46 (patch)
treeddb7699fe08753345f9482d2dfb20670f8a51606
parent9297a84a856b18d0823b76fa38e42853e8ff3e96 (diff)
parent9ae35802d86f9ededd84a03263172b1cca1f3237 (diff)
downloadnixpkgs-d273f02cd194ad3f12cedf9aa89f51d4c4a36f46.tar
nixpkgs-d273f02cd194ad3f12cedf9aa89f51d4c4a36f46.tar.gz
nixpkgs-d273f02cd194ad3f12cedf9aa89f51d4c4a36f46.tar.bz2
nixpkgs-d273f02cd194ad3f12cedf9aa89f51d4c4a36f46.tar.lz
nixpkgs-d273f02cd194ad3f12cedf9aa89f51d4c4a36f46.tar.xz
nixpkgs-d273f02cd194ad3f12cedf9aa89f51d4c4a36f46.tar.zst
nixpkgs-d273f02cd194ad3f12cedf9aa89f51d4c4a36f46.zip
Merge pull request #33543 from ThomasMader/dtools2.078.0
dtools: 2.075.1 -> 2.078.0
-rw-r--r--pkgs/development/tools/dtools/default.nix50
1 files changed, 31 insertions, 19 deletions
diff --git a/pkgs/development/tools/dtools/default.nix b/pkgs/development/tools/dtools/default.nix
index 0d639875da5..b6774fe2416 100644
--- a/pkgs/development/tools/dtools/default.nix
+++ b/pkgs/development/tools/dtools/default.nix
@@ -2,14 +2,31 @@
 
 stdenv.mkDerivation rec {
   name = "dtools-${version}";
-  version = "2.075.1";
+  version = "2.078.0";
 
-  src = fetchFromGitHub {
-    owner = "dlang";
-    repo = "tools";
-    rev = "v${version}";
-    sha256 = "0lxn400s9las9hq6h9vj4mis2jr662k2yw0zcrvqcm1yg9pd245d";
-  };
+  srcs = [
+    (fetchFromGitHub {
+      owner = "dlang";
+      repo = "dmd";
+      rev = "v${version}";
+      sha256 = "1ia4swyq0xqppnpmcalh2yxywdk2gv3kvni2abx1mq6wwqgmwlcr";
+      name = "dmd";
+    })
+    (fetchFromGitHub {
+      owner = "dlang";
+      repo = "tools";
+      rev = "v${version}";
+      sha256 = "1cydhn8g0h9i9mygzi80fb5fz3z1f6m8b9gypdvmyhkkzg63kf12";
+      name = "dtools";
+    })
+  ];
+
+  sourceRoot = ".";
+
+  postUnpack = ''
+      mv dmd dtools
+      cd dtools
+  '';
 
   postPatch = ''
       substituteInPlace posix.mak \
@@ -26,27 +43,22 @@ stdenv.mkDerivation rec {
   nativeBuildInputs = [ dmd ];
   buildInputs = [ curl ];
 
+  makeCmd = ''
+    make -f posix.mak DMD=${dmd.out}/bin/dmd DMD_DIR=dmd
+  '';
+
   buildPhase = ''
-    make -f posix.mak DMD=${dmd.out}/bin/dmd INSTALL_DIR=$out
+    $makeCmd
   '';
 
   doCheck = true;
 
   checkPhase = ''
-      export BITS=${builtins.toString stdenv.hostPlatform.parsed.cpu.bits}
-      export OSNAME=${if stdenv.hostPlatform.isDarwin then "osx" else stdenv.hostPlatform.parsed.kernel.name}
-      ./generated/$OSNAME/$BITS/rdmd -main -unittest rdmd.d
-      ${dmd.out}/bin/dmd rdmd_test.d
-      ./rdmd_test
+      $makeCmd test_rdmd
     '';
 
   installPhase = ''
-    mkdir -p $out/bin
-    ${
-      let bits = builtins.toString stdenv.hostPlatform.parsed.cpu.bits;
-      osname = if stdenv.hostPlatform.isDarwin then "osx" else stdenv.hostPlatform.parsed.kernel.name; in
-      "find $PWD/generated/${osname}/${bits} -perm /a+x -type f -exec cp {} $out/bin \\;"
-    }
+      $makeCmd INSTALL_DIR=$out install
 	'';
 
   meta = with stdenv.lib; {