diff options
| author | Danny Milosavljevic <dannym@friendly-machines.com> | 2026-04-08 17:07:40 +0200 |
|---|---|---|
| committer | Danny Milosavljevic <dannym@friendly-machines.com> | 2026-07-17 01:41:57 +0200 |
| commit | a883d8d02b76983f15d1a3733b13b46c174bdd03 (patch) | |
| tree | 89ceed10177063d53e90835419366aa9efa5dcb6 /gnu/packages/dotnet.scm | |
| parent | d71affea0c59266b8fc75377c3e6d32878a29b56 (diff) | |
gnu: Add roslyn@3.2.0.
* gnu/packages/patches/roslyn-3.2.0-bootstrap-with-csc-3.0.patch: New file.
* gnu/local.mk (dist_patch_DATA): Add reference to it.
* gnu/packages/dotnet.scm (roslyn-3.2): New variable.
Change-Id: Icfb46abfe41fdfaa7a5c532911ef2abcac4d416c
Diffstat (limited to 'gnu/packages/dotnet.scm')
| -rw-r--r-- | gnu/packages/dotnet.scm | 53 |
1 files changed, 53 insertions, 0 deletions
diff --git a/gnu/packages/dotnet.scm b/gnu/packages/dotnet.scm index b914d29fe60..6f423de54cb 100644 --- a/gnu/packages/dotnet.scm +++ b/gnu/packages/dotnet.scm | |||
| @@ -2957,6 +2957,59 @@ a C# 7.2 compiler."))) | |||
| 2957 | "This package provides the Roslyn C# compiler (@command{csc}), built | 2957 | "This package provides the Roslyn C# compiler (@command{csc}), built |
| 2958 | from source using @code{roslyn-2.8} as the bootstrap compiler. It produces | 2958 | from source using @code{roslyn-2.8} as the bootstrap compiler. It produces |
| 2959 | a C# 8.0 compiler."))) | 2959 | a C# 8.0 compiler."))) |
| 2960 | |||
| 2961 | |||
| 2962 | ;;; | ||
| 2963 | ;;; roslyn-3.2: inherits roslyn-3.0, built with csc 3.0 | ||
| 2964 | ;;; Adds 'notnull' constraint support needed by roslyn 3.8+. | ||
| 2965 | ;;; | ||
| 2966 | |||
| 2967 | (define-public roslyn-3.2 | ||
| 2968 | (package | ||
| 2969 | (inherit roslyn-3.0) | ||
| 2970 | (version "3.2.0") | ||
| 2971 | (source | ||
| 2972 | (origin | ||
| 2973 | (method git-fetch) | ||
| 2974 | (uri (git-reference | ||
| 2975 | (url "https://github.com/dotnet/roslyn") | ||
| 2976 | (commit (string-append "version-" version)))) | ||
| 2977 | (file-name (git-file-name "roslyn" version)) | ||
| 2978 | (sha256 | ||
| 2979 | (base32 | ||
| 2980 | "0brx9i0jrx2j3zircalgyabc24qqy8ghd8hcjazga8w58a0gmvpc")) | ||
| 2981 | (patches | ||
| 2982 | (search-patches "roslyn-3.2.0-bootstrap-with-csc-3.0.patch")))) | ||
| 2983 | (native-inputs (list roslyn-3.0)) | ||
| 2984 | (arguments | ||
| 2985 | (substitute-keyword-arguments (package-arguments roslyn-3.0) | ||
| 2986 | ((#:phases phases '()) | ||
| 2987 | #~(modify-phases #$phases | ||
| 2988 | ;; 3.2 uses static local functions (C# 8 preview in csc 3.0). | ||
| 2989 | (replace 'create-csc-rsp | ||
| 2990 | (lambda _ | ||
| 2991 | (call-with-output-file "csc.rsp" | ||
| 2992 | (lambda (port) | ||
| 2993 | (display "-langversion:preview\n-d:NET472\n" port))))) | ||
| 2994 | ;; Point at roslyn-3.0's csc. | ||
| 2995 | (replace 'create-csc-wrapper | ||
| 2996 | (lambda* (#:key inputs #:allow-other-keys) | ||
| 2997 | (mkdir-p "bootstrap-bin") | ||
| 2998 | (call-with-output-file "bootstrap-bin/csc" | ||
| 2999 | (lambda (port) | ||
| 3000 | (format port "#!~a~%exec mono ~a \"$@\"~%" | ||
| 3001 | (which "bash") | ||
| 3002 | (string-append (assoc-ref inputs "roslyn") "/lib/roslyn/csc.exe")))) | ||
| 3003 | (chmod "bootstrap-bin/csc" #o755) | ||
| 3004 | (setenv "PATH" | ||
| 3005 | (string-append (getcwd) "/bootstrap-bin:" | ||
| 3006 | (getenv "PATH"))))))))) | ||
| 3007 | (synopsis "C# 8.0 compiler with notnull constraint support") | ||
| 3008 | (description | ||
| 3009 | "This package provides the Roslyn C# compiler (@command{csc}), built | ||
| 3010 | from source using @code{roslyn-3.0} as the bootstrap compiler. It adds | ||
| 3011 | support for the @code{notnull} generic constraint, which is needed to build | ||
| 3012 | newer Roslyn versions."))) | ||
| 2960 | ;; too new version: 15.9.21.664 | 3013 | ;; too new version: 15.9.21.664 |
| 2961 | ;; too old (no support for mono) version: 14.0 | 3014 | ;; too old (no support for mono) version: 14.0 |
| 2962 | (define-public msbuild | 3015 | (define-public msbuild |
