treewide: fix rec-set-dynamic-attrs
Lix will soon warn, and in the future, error on `rec-set-dynamic-attrs`. This commit fix where attrs are dynamically set in a recursive function currently present in nixpkgs.
This commit is contained in:
@@ -32,6 +32,9 @@ let
|
||||
)
|
||||
);
|
||||
inherit (vmr) targetRid releaseManifest;
|
||||
sdkVersion = releaseManifest.sdkVersion;
|
||||
runtimeVersion = releaseManifest.runtimeVersion;
|
||||
aspnetcoreVersion = releaseManifest.aspNetCoreVersion or releaseManifest.runtimeVersion;
|
||||
|
||||
# TODO: do this properly
|
||||
hostRid = targetRid;
|
||||
@@ -114,9 +117,9 @@ let
|
||||
];
|
||||
};
|
||||
|
||||
sdk = mkCommon "sdk" rec {
|
||||
sdk = mkCommon "sdk" {
|
||||
pname = "${baseName}-sdk";
|
||||
version = releaseManifest.sdkVersion;
|
||||
version = sdkVersion;
|
||||
|
||||
src = vmr;
|
||||
dontUnpack = true;
|
||||
@@ -136,7 +139,7 @@ let
|
||||
runHook preInstall
|
||||
|
||||
mkdir -p "$out"/share
|
||||
cp -r "$src"/lib/dotnet-sdk-${version}-${targetRid} "$out"/share/dotnet
|
||||
cp -r "$src"/lib/dotnet-sdk-${sdkVersion}-${targetRid} "$out"/share/dotnet
|
||||
chmod +w "$out"/share/dotnet
|
||||
mkdir "$out"/bin
|
||||
ln -s "$out"/share/dotnet/dotnet "$out"/bin/dotnet
|
||||
@@ -159,7 +162,10 @@ let
|
||||
'';
|
||||
|
||||
${
|
||||
if stdenvNoCC.hostPlatform.isDarwin && lib.versionAtLeast version "10" then "postInstall" else null
|
||||
if stdenvNoCC.hostPlatform.isDarwin && lib.versionAtLeast sdkVersion "10" then
|
||||
"postInstall"
|
||||
else
|
||||
null
|
||||
} =
|
||||
''
|
||||
mkdir -p "$out"/nix-support
|
||||
@@ -182,9 +188,9 @@ let
|
||||
};
|
||||
};
|
||||
|
||||
runtime = mkCommon "runtime" rec {
|
||||
runtime = mkCommon "runtime" {
|
||||
pname = "${baseName}-runtime";
|
||||
version = releaseManifest.runtimeVersion;
|
||||
version = runtimeVersion;
|
||||
|
||||
src = vmr;
|
||||
dontUnpack = true;
|
||||
@@ -193,7 +199,7 @@ let
|
||||
runHook preInstall
|
||||
|
||||
mkdir -p "$out"/share
|
||||
cp -r "$src/lib/dotnet-runtime-${version}-${targetRid}" "$out"/share/dotnet
|
||||
cp -r "$src/lib/dotnet-runtime-${runtimeVersion}-${targetRid}" "$out"/share/dotnet
|
||||
chmod +w "$out"/share/dotnet
|
||||
mkdir "$out"/bin
|
||||
ln -s "$out"/share/dotnet/dotnet "$out"/bin/dotnet
|
||||
@@ -210,9 +216,9 @@ let
|
||||
};
|
||||
};
|
||||
|
||||
aspnetcore = mkCommon "aspnetcore" rec {
|
||||
aspnetcore = mkCommon "aspnetcore" {
|
||||
pname = "${baseName}-aspnetcore-runtime";
|
||||
version = releaseManifest.aspNetCoreVersion or releaseManifest.runtimeVersion;
|
||||
version = aspnetcoreVersion;
|
||||
|
||||
src = vmr;
|
||||
dontUnpack = true;
|
||||
@@ -226,7 +232,7 @@ let
|
||||
mkdir "$out"/bin
|
||||
ln -s "$out"/share/dotnet/dotnet "$out"/bin/dotnet
|
||||
|
||||
cp -Tr "$src/lib/aspnetcore-runtime-${version}-${targetRid}"/shared/Microsoft.AspNetCore.App "$out"/share/dotnet/shared/Microsoft.AspNetCore.App
|
||||
cp -Tr "$src/lib/aspnetcore-runtime-${aspnetcoreVersion}-${targetRid}"/shared/Microsoft.AspNetCore.App "$out"/share/dotnet/shared/Microsoft.AspNetCore.App
|
||||
chmod +w "$out"/share/dotnet/shared
|
||||
|
||||
runHook postInstall
|
||||
|
||||
@@ -59,10 +59,11 @@ let
|
||||
|
||||
_icu = if isDarwin then darwin.ICU else icu;
|
||||
|
||||
in
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "${baseName}-vmr";
|
||||
version = release;
|
||||
in
|
||||
stdenv.mkDerivation {
|
||||
pname = "${baseName}-vmr";
|
||||
inherit version;
|
||||
|
||||
# TODO: fix this in the binary sdk packages
|
||||
preHook = lib.optionalString stdenv.hostPlatform.isDarwin ''
|
||||
|
||||
Reference in New Issue
Block a user