DRAFT: Add Arch Linux patch.

This commit is contained in:
Pierre Neidhardt 2020-02-28 15:02:21 +01:00
parent d2fef7eaf6
commit 69828b3a45

View File

@ -1332,6 +1332,9 @@ command line interface.")
(nuget (string-append (assoc-ref inputs "nuget") "/bin/nuget")) (nuget (string-append (assoc-ref inputs "nuget") "/bin/nuget"))
(dotnet-sdk (assoc-ref inputs "dotnet-sdk")) (dotnet-sdk (assoc-ref inputs "dotnet-sdk"))
(libhostfxr (string-append dotnet-sdk "/host/fxr/3.1.1/libhostfxr.so"))) (libhostfxr (string-append dotnet-sdk "/host/fxr/3.1.1/libhostfxr.so")))
;; No hostfxr: https://git.archlinux.org/svntogit/community.git/tree/trunk/mono-msbuild-no-hostfxr.patch?h=packages/mono-msbuild
(substitute* "mono/build/sdks_and_nugets/update_sdks_and_nugets.proj"
((".*extract_and_copy_hostfxr.sh.*") ""))
;; Set up nuget packages. ;; Set up nuget packages.
(setenv "HOME" (string-append (getcwd) "/fake-home")) (setenv "HOME" (string-append (getcwd) "/fake-home"))
(for-each (for-each
@ -1347,7 +1350,7 @@ command line interface.")
(invoke unzip xplat "-d" "artifacts") (invoke unzip xplat "-d" "artifacts")
(rename-file ;; (string-append "artifacts/msbuild-" ,bootstrap-version) (rename-file ;; (string-append "artifacts/msbuild-" ,bootstrap-version)
"artifacts/msbuild" "artifacts/mono-msbuild") "artifacts/msbuild" "artifacts/mono-msbuild")
(chmod "artifacts/mono-msbuild/MSBuild.dll" 493) (chmod "artifacts/mono-msbuild/MSBuild.dll" #o755)
(symlink libhostfxr (symlink libhostfxr
(string-append (string-append
"artifacts/mono-msbuild/SdkResolvers/Microsoft.DotNet.MSBuildSdkResolver/" "artifacts/mono-msbuild/SdkResolvers/Microsoft.DotNet.MSBuildSdkResolver/"
@ -1374,7 +1377,8 @@ command line interface.")
(replace 'install (replace 'install
(lambda* (#:key outputs inputs #:allow-other-keys) (lambda* (#:key outputs inputs #:allow-other-keys)
(let* ((mono (assoc-ref inputs "mono")) (let* ((mono (assoc-ref inputs "mono"))
(mono-bin (string-append mono "/bin/mono")) (mono-bin ;; "./stage1/mono-msbuild/msbuild"
(string-append mono "/bin/mono"))
(roslyn-path "/lib/mono/msbuild/Current/bin/Roslyn") (roslyn-path "/lib/mono/msbuild/Current/bin/Roslyn")
(roslyn (string-append mono roslyn-path)) (roslyn (string-append mono roslyn-path))
(out (assoc-ref outputs "out"))) (out (assoc-ref outputs "out")))
@ -1382,7 +1386,8 @@ command line interface.")
"mono/build/install.proj" "mono/build/install.proj"
(string-append "/p:MonoInstallPrefix=" out) (string-append "/p:MonoInstallPrefix=" out)
"/p:Configuration=Release-MONO") "/p:Configuration=Release-MONO")
(symlink roslyn (string-append out roslyn-path))))) (symlink roslyn (string-append out roslyn-path))
#t)))
(add-after 'install 'make-wrapper (add-after 'install 'make-wrapper
(lambda* (#:key inputs outputs #:allow-other-keys) (lambda* (#:key inputs outputs #:allow-other-keys)
(let* ((out (assoc-ref outputs "out")) (let* ((out (assoc-ref outputs "out"))