summary refs log tree commit diff
diff options
context:
space:
mode:
authorRoman Kuznetsov <roman@kuznero.com>2017-10-24 08:57:53 +0200
committerRoman Kuznetsov <roman@kuznero.com>2017-10-25 00:04:16 +0200
commit6b1b8487df4cf740441dfb652bc13e0e9f4757e3 (patch)
tree0443efd14331b678eb34d156b60146c5aa151e84
parentd754f7c9ce998a808b77c4a280dec7f8495114b4 (diff)
downloadnixpkgs-6b1b8487df4cf740441dfb652bc13e0e9f4757e3.tar
nixpkgs-6b1b8487df4cf740441dfb652bc13e0e9f4757e3.tar.gz
nixpkgs-6b1b8487df4cf740441dfb652bc13e0e9f4757e3.tar.bz2
nixpkgs-6b1b8487df4cf740441dfb652bc13e0e9f4757e3.tar.lz
nixpkgs-6b1b8487df4cf740441dfb652bc13e0e9f4757e3.tar.xz
nixpkgs-6b1b8487df4cf740441dfb652bc13e0e9f4757e3.tar.zst
nixpkgs-6b1b8487df4cf740441dfb652bc13e0e9f4757e3.zip
dotnet-sdk : init at 2.0.3
-rw-r--r--lib/maintainers.nix1
-rw-r--r--pkgs/development/compilers/dotnet/sdk/default.nix53
-rw-r--r--pkgs/top-level/all-packages.nix2
3 files changed, 56 insertions, 0 deletions
diff --git a/lib/maintainers.nix b/lib/maintainers.nix
index 4bb12dcfcc8..37c2d30f5d2 100644
--- a/lib/maintainers.nix
+++ b/lib/maintainers.nix
@@ -329,6 +329,7 @@
   kragniz = "Louis Taylor <louis@kragniz.eu>";
   kristoff3r = "Kristoffer Søholm <k.soeholm@gmail.com>";
   ktosiek = "Tomasz Kontusz <tomasz.kontusz@gmail.com>";
+  kuznero = "Roman Kuznetsov <roman@kuznero.com>";
   lassulus = "Lassulus <lassulus@gmail.com>";
   layus = "Guillaume Maudoux <layus.on@gmail.com>";
   ldesgoui = "Lucas Desgouilles <ldesgoui@gmail.com>";
diff --git a/pkgs/development/compilers/dotnet/sdk/default.nix b/pkgs/development/compilers/dotnet/sdk/default.nix
new file mode 100644
index 00000000000..e7cb7495c90
--- /dev/null
+++ b/pkgs/development/compilers/dotnet/sdk/default.nix
@@ -0,0 +1,53 @@
+{ stdenv
+, fetchurl
+, libunwind
+, openssl
+, icu
+, libuuid
+, zlib
+, curl
+, patchelf
+}:
+
+let
+  rpath = stdenv.lib.makeLibraryPath [ stdenv.cc.cc libunwind libuuid icu openssl zlib curl ];
+in
+  stdenv.mkDerivation rec {
+    version = "2.0.3";
+    name = "dotnet-sdk-${version}";
+
+    src = fetchurl {
+      url = "https://dotnetcli.azureedge.net/dotnet/Sdk/2.0.3-servicing-007037/dotnet-sdk-2.0.3-servicing-007037-linux-x64.tar.gz";
+      sha256 = "0kqk1f0vfdfyb9mp7d4y83airkxyixmxb7lrx0h0hym2a9661ch8";
+    };
+
+    unpackPhase = "tar xvzf $src";
+
+    buildPhase = ''
+      runHook preBuild
+      patchelf --set-interpreter "$(cat $NIX_CC/nix-support/dynamic-linker)" ./dotnet
+      patchelf --set-rpath "${rpath}" ./dotnet
+      find -type f -name "*.so" -exec patchelf --set-rpath "${rpath}" {} \;
+      echo -n "dotnet-sdk version: "
+      ./dotnet --version
+      runHook postBuild
+    '';
+
+    dontPatchELF = true;
+
+    installPhase = ''
+      runHook preInstall
+      mkdir -p $out/bin
+      cp -r ./ $out
+      ln -s $out/dotnet $out/bin/dotnet
+      runHook postInstall
+    '';
+
+    meta = with stdenv.lib; {
+      homepage = https://dotnet.github.io/;
+      description = ".NET Core SDK 2.0.2 with .NET Core 2.0.0";
+      platforms = [ "x86_64-linux" ];
+      maintainers = with maintainers; [ kuznero ];
+      license = licenses.mit;
+    };
+  }
diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix
index 8a0280bcdf4..936a5441033 100644
--- a/pkgs/top-level/all-packages.nix
+++ b/pkgs/top-level/all-packages.nix
@@ -118,6 +118,8 @@ with pkgs;
 
   dotnetbuildhelpers = callPackage ../build-support/dotnetbuildhelpers { };
 
+  dotnet-sdk = callPackage ../development/compilers/dotnet/sdk/default.nix { };
+
   dispad = callPackage ../tools/X11/dispad { };
 
   vsenv = callPackage ../build-support/vsenv {