[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
08/31: import: hackage: Use upstream-name property.
From: |
guix-commits |
Subject: |
08/31: import: hackage: Use upstream-name property. |
Date: |
Sun, 26 Feb 2023 04:44:36 -0500 (EST) |
lbraun pushed a commit to branch master
in repository guix.
commit d06ae5301351bf4af71dcebd6dd85b4546e1b677
Author: Lars-Dominik Braun <lars@6xq.net>
AuthorDate: Wed Jan 4 09:37:26 2023 +0100
import: hackage: Use upstream-name property.
* guix/import/hackage.scm (guix-package->hackage-name): Removed.
(latest-release): Use package-upstream-name* instead.
* guix/import/stackage.scm (latest-lts-release): Ditto.
(stackage-lts-package?): Ditto.
---
guix/import/hackage.scm | 14 +-------------
guix/import/stackage.scm | 4 ++--
2 files changed, 3 insertions(+), 15 deletions(-)
diff --git a/guix/import/hackage.scm b/guix/import/hackage.scm
index 9e305cf080..2f901af47b 100644
--- a/guix/import/hackage.scm
+++ b/guix/import/hackage.scm
@@ -52,7 +52,6 @@
hackage-recursive-import
%hackage-updater
- guix-package->hackage-name
hackage-name->package-name
hackage-fetch
hackage-source-url
@@ -126,17 +125,6 @@ version is returned."
(string-downcase name)
(string-append package-name-prefix (string-downcase name))))
-(define guix-package->hackage-name
- (let ((uri-rx (make-regexp
"(https?://hackage.haskell.org|mirror://hackage)/package/([^/]+)/.*"))
- (name-rx (make-regexp "(.*)-[0-9\\.]+")))
- (lambda (package)
- "Given a Guix package name, return the corresponding Hackage name."
- (let* ((source-url (and=> (package-source package) origin-uri))
- (name (match:substring (regexp-exec uri-rx source-url) 2)))
- (match (regexp-exec name-rx name)
- (#f name)
- (m (match:substring m 1)))))))
-
(define (read-cabal-and-hash port)
"Read a Cabal file from PORT and return it and its hash in nix-base32
format as two values."
@@ -371,7 +359,7 @@ respectively."
(formatted-message
(G_ "~a updater doesn't support updating to a specific version, sorry.")
"hackage")))
- (let* ((hackage-name (guix-package->hackage-name package))
+ (let* ((hackage-name (package-upstream-name* package))
(cabal-meta (hackage-fetch hackage-name)))
(match cabal-meta
(#f
diff --git a/guix/import/stackage.scm b/guix/import/stackage.scm
index 9462e70791..735eeb75f7 100644
--- a/guix/import/stackage.scm
+++ b/guix/import/stackage.scm
@@ -149,7 +149,7 @@ PACKAGE or #f if the package is not included in the
Stackage LTS release."
(formatted-message
(G_ "~a updater doesn't support updating to a specific version,
sorry.")
"stackage")))
- (let* ((hackage-name (guix-package->hackage-name pkg))
+ (let* ((hackage-name (package-upstream-name* pkg))
(version (lts-package-version (packages) hackage-name))
(name-version (hackage-name-version hackage-name version)))
(match (and=> name-version hackage-fetch)
@@ -173,7 +173,7 @@ PACKAGE or #f if the package is not included in the
Stackage LTS release."
(false-if-networking-error
(let ((packages (stackage-lts-packages
(stackage-lts-info-fetch %default-lts-version)))
- (hackage-name (guix-package->hackage-name package)))
+ (hackage-name (package-upstream-name* package)))
(find (lambda (package)
(string=? (stackage-package-name package) hackage-name))
packages)))))
- 03/31: build: haskell-build-system: Support multiple libraries., (continued)
- 03/31: build: haskell-build-system: Support multiple libraries., guix-commits, 2023/02/26
- 06/31: import: hackage: Add upstream-name property., guix-commits, 2023/02/26
- 07/31: gnu: Add upstream-name property to Haskell packages., guix-commits, 2023/02/26
- 04/31: gnu: Switch default to GHC 9.2., guix-commits, 2023/02/26
- 01/31: import: hackage: Allow version at the beginning of cabal file., guix-commits, 2023/02/26
- 05/31: import: stackage: Update to release 20.5., guix-commits, 2023/02/26
- 09/31: gnu: Use HACKAGE-URI for packages from Hackage., guix-commits, 2023/02/26
- 10/31: import: haskell: Add new internal library for GHC 9.2., guix-commits, 2023/02/26
- 13/31: Upgrade Haskell packages., guix-commits, 2023/02/26
- 18/31: gnu: elm: Support GHC 9.2., guix-commits, 2023/02/26
- 08/31: import: hackage: Use upstream-name property.,
guix-commits <=
- 11/31: build: haskell-build-system: Process all transitive dependencies., guix-commits, 2023/02/26
- 12/31: build: haskell-build-system: Remove unused linker flags., guix-commits, 2023/02/26
- 14/31: gnu: ghc-9.2: Increase make verbosity., guix-commits, 2023/02/26
- 15/31: gnu: Remove unused Haskell packages., guix-commits, 2023/02/26
- 16/31: gnu: ghc-parsec: Update to 3.1.15.0., guix-commits, 2023/02/26
- 17/31: gnu: idris: Fix overly zealous regular expression., guix-commits, 2023/02/26
- 19/31: build-system: haskell: Drop default "static" output., guix-commits, 2023/02/26
- 20/31: gnu: ghc-9.2: Support static linking with glibc < 2.34., guix-commits, 2023/02/26
- 21/31: gnu: ghc-lua: Disable symbol export., guix-commits, 2023/02/26
- 22/31: build: haskell-build-system: Build static executables by default., guix-commits, 2023/02/26