diff options
Diffstat (limited to 'nixpkgs/pkgs/development/compilers/dotnet')
-rw-r--r-- | nixpkgs/pkgs/development/compilers/dotnet/build-dotnet.nix | 92 | ||||
-rw-r--r-- | nixpkgs/pkgs/development/compilers/dotnet/buildDotnet.nix | 74 | ||||
-rw-r--r-- | nixpkgs/pkgs/development/compilers/dotnet/combine-packages.nix (renamed from nixpkgs/pkgs/development/compilers/dotnet/combinePackages.nix) | 0 | ||||
-rw-r--r-- | nixpkgs/pkgs/development/compilers/dotnet/default.nix | 20 |
4 files changed, 102 insertions, 84 deletions
diff --git a/nixpkgs/pkgs/development/compilers/dotnet/build-dotnet.nix b/nixpkgs/pkgs/development/compilers/dotnet/build-dotnet.nix new file mode 100644 index 00000000000..1162a75d0de --- /dev/null +++ b/nixpkgs/pkgs/development/compilers/dotnet/build-dotnet.nix @@ -0,0 +1,92 @@ +{ type +, version +, sha512 +}: + +assert builtins.elem type [ "aspnetcore" "netcore" "sdk"]; +{ stdenv +, fetchurl +, libunwind +, openssl +, icu +, libuuid +, zlib +, curl +}: + +let + pname = if type == "aspnetcore" then + "aspnetcore-runtime" + else if type == "netcore" then + "dotnet-runtime" + else + "dotnet-sdk"; + platform = if stdenv.isDarwin then "osx" else "linux"; + suffix = { + x86_64-linux = "x64"; + aarch64-linux = "arm64"; + x86_64-darwin = "x64"; + }."${stdenv.hostPlatform.system}" or (throw + "Unsupported system: ${stdenv.hostPlatform.system}"); + urls = { + aspnetcore = "https://dotnetcli.azureedge.net/dotnet/aspnetcore/Runtime/${version}/${pname}-${version}-${platform}-${suffix}.tar.gz"; + netcore = "https://dotnetcli.azureedge.net/dotnet/Runtime/${version}/${pname}-${version}-${platform}-${suffix}.tar.gz"; + sdk = "https://dotnetcli.azureedge.net/dotnet/Sdk/${version}/${pname}-${version}-${platform}-${suffix}.tar.gz"; + }; + descriptions = { + aspnetcore = "ASP .NET Core runtime ${version}"; + netcore = ".NET Core runtime ${version}"; + sdk = ".NET SDK ${version}"; + }; +in stdenv.mkDerivation rec { + inherit pname version; + + rpath = stdenv.lib.makeLibraryPath [ + curl + icu + libunwind + libuuid + openssl + stdenv.cc.cc + zlib + ]; + + src = fetchurl { + url = builtins.getAttr type urls; + sha512 = sha512."${stdenv.hostPlatform.system}" or (throw + "Missing hash for host system: ${stdenv.hostPlatform.system}"); + }; + + sourceRoot = "."; + + dontPatchELF = true; + noDumpEnvVars = true; + + installPhase = '' + runHook preInstall + mkdir -p $out/bin + cp -r ./ $out + ln -s $out/dotnet $out/bin/dotnet + runHook postInstall + ''; + + postFixup = stdenv.lib.optionalString stdenv.isLinux '' + patchelf --set-interpreter "${stdenv.cc.bintools.dynamicLinker}" $out/dotnet + patchelf --set-rpath "${rpath}" $out/dotnet + find $out -type f -name "*.so" -exec patchelf --set-rpath '$ORIGIN:${rpath}' {} \; + find $out -type f -name "apphost" -exec patchelf --set-interpreter "${stdenv.cc.bintools.dynamicLinker}" --set-rpath '$ORIGIN:${rpath}' {} \; + ''; + + doInstallCheck = true; + installCheckPhase = '' + $out/bin/dotnet --info + ''; + + meta = with stdenv.lib; { + homepage = "https://dotnet.github.io/"; + description = builtins.getAttr type descriptions; + platforms = [ "x86_64-linux" "aarch64-linux" "x86_64-darwin" ]; + maintainers = with maintainers; [ kuznero ]; + license = licenses.mit; + }; +} diff --git a/nixpkgs/pkgs/development/compilers/dotnet/buildDotnet.nix b/nixpkgs/pkgs/development/compilers/dotnet/buildDotnet.nix deleted file mode 100644 index 20abc1c78b9..00000000000 --- a/nixpkgs/pkgs/development/compilers/dotnet/buildDotnet.nix +++ /dev/null @@ -1,74 +0,0 @@ -{ type -, version -, sha512 -}: -assert builtins.elem type [ "aspnetcore" "netcore" "sdk"]; -{ stdenv -, fetchurl -, libunwind -, openssl -, icu -, libuuid -, zlib -, curl -}: -let pname = if type == "aspnetcore" then "aspnetcore-runtime" else if type == "netcore" then "dotnet-runtime" else "dotnet-sdk"; - platform = if stdenv.isDarwin then "osx" else "linux"; - suffix = { - x86_64-linux = "x64"; - aarch64-linux = "arm64"; - x86_64-darwin = "x64"; - }."${stdenv.hostPlatform.system}" or (throw "Unsupported system: ${stdenv.hostPlatform.system}"); - urls = { - aspnetcore = "https://dotnetcli.azureedge.net/dotnet/aspnetcore/Runtime/${version}/${pname}-${version}-${platform}-${suffix}.tar.gz"; - netcore = "https://dotnetcli.azureedge.net/dotnet/Runtime/${version}/${pname}-${version}-${platform}-${suffix}.tar.gz"; - sdk = "https://dotnetcli.azureedge.net/dotnet/Sdk/${version}/${pname}-${version}-${platform}-${suffix}.tar.gz"; - }; - descriptions = { - aspnetcore = "ASP .NET Core runtime ${version}"; - netcore = ".NET Core runtime ${version}"; - sdk = ".NET SDK ${version}"; - }; -in stdenv.mkDerivation rec { - inherit pname version; - - rpath = stdenv.lib.makeLibraryPath [ stdenv.cc.cc libunwind libuuid icu openssl zlib curl ]; - - src = fetchurl { - url = builtins.getAttr type urls; - sha512 = sha512."${stdenv.hostPlatform.system}" or (throw "Missing hash for host system: ${stdenv.hostPlatform.system}"); - }; - - sourceRoot = "."; - - dontPatchELF = true; - noDumpEnvVars = true; - - installPhase = '' - runHook preInstall - mkdir -p $out/bin - cp -r ./ $out - ln -s $out/dotnet $out/bin/dotnet - runHook postInstall - ''; - - postFixup = stdenv.lib.optionalString stdenv.isLinux '' - patchelf --set-interpreter "${stdenv.cc.bintools.dynamicLinker}" $out/dotnet - patchelf --set-rpath "${rpath}" $out/dotnet - find $out -type f -name "*.so" -exec patchelf --set-rpath '$ORIGIN:${rpath}' {} \; - find $out -type f -name "apphost" -exec patchelf --set-interpreter "${stdenv.cc.bintools.dynamicLinker}" --set-rpath '$ORIGIN:${rpath}' {} \; - ''; - - doInstallCheck = true; - installCheckPhase = '' - $out/bin/dotnet --info - ''; - - meta = with stdenv.lib; { - homepage = "https://dotnet.github.io/"; - description = builtins.getAttr type descriptions; - platforms = [ "x86_64-linux" "aarch64-linux" "x86_64-darwin" ]; - maintainers = with maintainers; [ kuznero ]; - license = licenses.mit; - }; -} diff --git a/nixpkgs/pkgs/development/compilers/dotnet/combinePackages.nix b/nixpkgs/pkgs/development/compilers/dotnet/combine-packages.nix index 00fb7c6d9b4..00fb7c6d9b4 100644 --- a/nixpkgs/pkgs/development/compilers/dotnet/combinePackages.nix +++ b/nixpkgs/pkgs/development/compilers/dotnet/combine-packages.nix diff --git a/nixpkgs/pkgs/development/compilers/dotnet/default.nix b/nixpkgs/pkgs/development/compilers/dotnet/default.nix index dd1510548a3..e04f7a03f94 100644 --- a/nixpkgs/pkgs/development/compilers/dotnet/default.nix +++ b/nixpkgs/pkgs/development/compilers/dotnet/default.nix @@ -4,13 +4,13 @@ dotnetCombined = with dotnetCorePackages; combinePackages [ sdk_3_1 sdk_2_2 sdk_ */ { callPackage }: let - buildDotnet = attrs: callPackage (import ./buildDotnet.nix attrs) {}; + buildDotnet = attrs: callPackage (import ./build-dotnet.nix attrs) {}; buildAspNetCore = attrs: buildDotnet (attrs // { type = "aspnetcore"; }); buildNetCore = attrs: buildDotnet (attrs // { type = "netcore"; }); buildNetCoreSdk = attrs: buildDotnet (attrs // { type = "sdk"; }); in rec { - combinePackages = attrs: callPackage (import ./combinePackages.nix attrs) {}; + combinePackages = attrs: callPackage (import ./combine-packages.nix attrs) {}; # v2.1.15 (LTS) @@ -77,20 +77,20 @@ rec { # v3.1.1 (LTS) aspnetcore_3_1 = buildAspNetCore { - version = "3.1.2"; + version = "3.1.5"; sha512 = { - x86_64-linux = "27708bk5liz8r39p4dzs41clgq298d49g8ipzdj56pz613vkfyv7bp91666ydz36aazm265j2g9ji3sk1f9kbgv6024zwrly5w9vqrm"; - aarch64-linux = "2sm5yf376w5dm0za3gbcj251kc909fmlasmlyn70zhqp2jiii075vcqh40racjlwlhsfydx32cw7kgnv238lad5mw5jxy143zql5xl3"; - x86_64-darwin = "311sihjzg0x5inyrz0px29jikxcibd6l56xfdmxkncgwaikf3663x10dfl246qhz8v0f3lvg2vndgp5icbaqrp8awsnrhsl0vi5d7fh"; + x86_64-linux = "3ziyvm6llvhnjg8ayr4cfcabwkc46fqscgj12faavib34r5zx4mnv3qccqm3gg2r8jps60h42lvrwj3fliqmr0qqnhsw04819kqwai6"; + aarch64-linux = "2nbhvh8dpg7dghcs6ysdg7mcc60hbk5d3zab0nnbqkib93fdhbzhzcra9qhh80h8x03zw0jsn3gzqx0d1z2vz5z3lsa14vmb86pzj4a"; + x86_64-darwin = "1sfnp849vmsv8775fjsf9nzx28cmkvfgk8fa81h2l849z31ssaw9fn89kk0n83l0wrhr24ivmprfr11sp42gnjbncqfsnz4883lfchw"; }; }; netcore_3_1 = buildNetCore { - version = "3.1.2"; + version = "3.1.5"; sha512 = { - x86_64-linux = "3zwg1anrcni9kagmjxn485bpjvb146hkm7irmikq3v879gjhd2fgpscg226ds83l4pxll3r7lwris6ij952xmy8lsqraapd9111ba14"; - aarch64-linux = "3hf61d5adlfffy51627ypp36qc5r55g9xwgfxqd0c7vj9bqmpiph673bvqqpr189df9shxr21p94cwrc5n36z72a37vw4ic8ks2yayx"; - x86_64-darwin = "35flr1p5zpcd77mjsl6qy9ipxc5k9j6pk7ca6mnvqqjf0r3agm3qf8cs5fbraprvkwj8fha3giwbp5xir6050fbb374375idn9x12d8"; + x86_64-linux = "03g6aghbpsxj9csaq9lkc8cad1nk8kvlivkarq6bfqvx992fxw6zryp7kcm5h6a5gkgpimb1nr17vndj1r629hdhpincqj8yw6i33mq"; + aarch64-linux = "25gwicmpzhzs96w3azypbl32bx967f14xkfdgvl7knw234rcmfv7zr0a7lb3vci68dbx4xywpnwlrvgi54mimzp8nagrgwva8zrrxzb"; + x86_64-darwin = "2g28jmv1n7pgxfq4wk9x58y5dp835c7rckz6c88ylk7g9w6z75l94pblfl1rc7mr6g3wddiy5cl87a607j9g283hv28a4vcpvll8s7g"; }; }; |