about summary refs log tree commit diff
path: root/pkgs
diff options
context:
space:
mode:
authorKarol Chmist <karol@chmist.com>2017-11-13 09:15:43 +0100
committerKarol Chmist <karol@chmist.com>2017-11-13 14:10:18 +0100
commite8c8163f336edd0f19c4d9e64d7e415591ec34d2 (patch)
tree27d1a0b12a2eae770820d10457260f9f00578ee8 /pkgs
parentda94de1a20df7d02c505871c87ca9af53571dd94 (diff)
downloadnixlib-e8c8163f336edd0f19c4d9e64d7e415591ec34d2.tar
nixlib-e8c8163f336edd0f19c4d9e64d7e415591ec34d2.tar.gz
nixlib-e8c8163f336edd0f19c4d9e64d7e415591ec34d2.tar.bz2
nixlib-e8c8163f336edd0f19c4d9e64d7e415591ec34d2.tar.lz
nixlib-e8c8163f336edd0f19c4d9e64d7e415591ec34d2.tar.xz
nixlib-e8c8163f336edd0f19c4d9e64d7e415591ec34d2.tar.zst
nixlib-e8c8163f336edd0f19c4d9e64d7e415591ec34d2.zip
[CodeReview] Added suggestions by yegortimoshenko
Diffstat (limited to 'pkgs')
-rw-r--r--pkgs/development/compilers/scala/dotty.nix25
-rw-r--r--pkgs/top-level/all-packages.nix3
2 files changed, 16 insertions, 12 deletions
diff --git a/pkgs/development/compilers/scala/dotty.nix b/pkgs/development/compilers/scala/dotty.nix
index cc02c7534f4d..cb0c43550022 100644
--- a/pkgs/development/compilers/scala/dotty.nix
+++ b/pkgs/development/compilers/scala/dotty.nix
@@ -16,19 +16,21 @@ stdenv.mkDerivation rec {
     mkdir -p $out
     mv * $out
 
-    for p in $out/bin/* ; do
-      file=$(basename $p)
+    mkdir -p $out/shared
+    mv $out/bin/common $out/shared
+  '';
 
-      # no need to wrap common
-      if [[ "$file" = "common" ]] ; then
-        continue
-      fi
+  fixupPhase = ''
+    for file in $out/bin/* ; do
+      substituteInPlace $file \
+        --replace '$PROG_HOME/bin/common' $out/shared/common
 
-      wrapProgram $p --set JAVA_HOME ${jre}
-    done    
+      wrapProgram $file \
+        --set JAVA_HOME ${jre}
+    done
   '';
 
-  meta = {
+  meta = with stdenv.lib; {
     description = "Research platform for new language concepts and compiler technologies for Scala.";
     longDescription = ''
        Dotty is a platform to try out new language concepts and compiler technologies for Scala.
@@ -37,7 +39,8 @@ stdenv.mkDerivation rec {
        The theory behind these constructs is researched in DOT, a calculus for dependent object types.
     '';
     homepage = http://dotty.epfl.ch/;
-    license = stdenv.lib.licenses.bsd3;
-    platforms = stdenv.lib.platforms.all;
+    license = licenses.bsd3;
+    platforms = platforms.all;
+    maintainers = [maintainers.karolchmist];
   };
 }
diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix
index 7af3e99bd2e0..1f70d5695848 100644
--- a/pkgs/top-level/all-packages.nix
+++ b/pkgs/top-level/all-packages.nix
@@ -5479,6 +5479,8 @@ with pkgs;
 
   devpi-client = callPackage ../development/tools/devpi-client {};
 
+  dotty = callPackage ../development/compilers/scala/dotty.nix { jre = jre8;};
+
   drumstick = callPackage ../development/libraries/drumstick { };
 
   ecl = callPackage ../development/compilers/ecl { };
@@ -6264,7 +6266,6 @@ with pkgs;
   scala_2_10 = callPackage ../development/compilers/scala/2.10.nix { };
   scala_2_11 = callPackage ../development/compilers/scala/2.11.nix { };
   scala_2_12 = callPackage ../development/compilers/scala { jre = jre8; };
-  scala_dotty = callPackage ../development/compilers/scala/dotty.nix { jre = jre8;};
   scala = scala_2_12;
 
   scalafmt = callPackage ../development/tools/scalafmt { };