diff options
| author | Danny Milosavljevic <dannym@friendly-machines.com> | 2025-10-20 08:13:17 +0000 |
|---|---|---|
| committer | Danny Milosavljevic <dannym@friendly-machines.com> | 2025-11-02 16:13:34 +0100 |
| commit | c3cacc07154b1094d91fcb46c9a6586d5e20db04 (patch) | |
| tree | 97dc1bd3b9ac993037f3f3bf1b08033dd2b3575e /gnu | |
| parent | 8fbfa3c4c32bede6401af2def8f81daff8bbb754 (diff) | |
gnu: Add swift-cmark.
* gnu/packages/swift.scm: New file.
* gnu/local.mk (GNU_SYSTEM_MODULES): Add reference to it.
Change-Id: I107a466da824670ce71f38b9e03be06b1e35612a
Diffstat (limited to 'gnu')
| -rw-r--r-- | gnu/local.mk | 1 | ||||
| -rw-r--r-- | gnu/packages/swift.scm | 72 |
2 files changed, 73 insertions, 0 deletions
diff --git a/gnu/local.mk b/gnu/local.mk index a3bc00b6db9..6988c93b3e6 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -648,6 +648,7 @@ GNU_SYSTEM_MODULES = \ %D%/packages/storage.scm \ %D%/packages/suckless.scm \ %D%/packages/sugar.scm \ + %D%/packages/swift.scm \ %D%/packages/swig.scm \ %D%/packages/sycl.scm \ %D%/packages/sync.scm \ diff --git a/gnu/packages/swift.scm b/gnu/packages/swift.scm new file mode 100644 index 00000000000..b1ff620188f --- /dev/null +++ b/gnu/packages/swift.scm @@ -0,0 +1,72 @@ +;;; GNU Guix --- Functional package management for GNU +;;; Copyright © 2025 Danny Milosavljevic <dannym@friendly-machines.com> +;;; +;;; This file is part of GNU Guix. +;;; +;;; GNU Guix is free software; you can redistribute it and/or modify it +;;; under the terms of the GNU General Public License as published by +;;; the Free Software Foundation; either version 3 of the License, or (at +;;; your option) any later version. +;;; +;;; GNU Guix is distributed in the hope that it will be useful, but +;;; WITHOUT ANY WARRANTY; without even the implied warranty of +;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +;;; GNU General Public License for more details. +;;; +;;; You should have received a copy of the GNU General Public License +;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>. + +(define-module (gnu packages swift) + #:use-module (guix packages) + #:use-module ((guix licenses) #:prefix license:) + #:use-module (guix git-download) + #:use-module (guix gexp) + #:use-module (guix build-system cmake) + #:use-module (gnu packages) + #:use-module (gnu packages cmake) + #:use-module (gnu packages ninja) + #:use-module (gnu packages python)) + +(define %swift-bootstrap-version "5.7.3") + +(define-public swift-cmark + (package + (name "swift-cmark") + (version %swift-bootstrap-version) + (source (origin + (method git-fetch) + (uri (git-reference + (url "https://github.com/apple/swift-cmark.git") + (commit (string-append "swift-" %swift-bootstrap-version + "-RELEASE")))) + (file-name (git-file-name "swift-cmark" %swift-bootstrap-version)) + (sha256 + (base32 + "0340j9x2n40yx61ma2pgqfbn3a9ijrh20iwzd1zxqq87rr76hh3z")))) + (build-system cmake-build-system) + (arguments + (list + #:tests? #f + #:build-type "Release" + #:configure-flags + #~(list (string-append "-DCMAKE_INSTALL_PREFIX=" #$output)) + #:phases + #~(modify-phases %standard-phases + (add-after 'install 'install-cmake-exports + (lambda _ + (install-file "src/cmarkTargets.cmake" + (string-append #$output "/src")) + (substitute* (string-append #$output "/src/cmarkTargets.cmake") + (("/tmp/guix-build-swift-cmark-[^/]+/source/src") + #$output) + (("/tmp/guix-build-swift-cmark-[^/]+/build/src") + (string-append #$output "/lib"))) + #t))))) + (native-inputs + (list cmake ninja python-3)) + (home-page "https://swift.org/") + (synopsis "CommonMark parsing and rendering library for Swift") + (description + "This is Apple's fork of cmark (CommonMark implementation) with +Swift-specific modifications, required to build Swift 4.2.4.") + (license license:bsd-2))) |
