[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[bug#61420] [PATCH 08/31] import: hackage: Use upstream-name property.
From: |
zimoun |
Subject: |
[bug#61420] [PATCH 08/31] import: hackage: Use upstream-name property. |
Date: |
Wed, 15 Feb 2023 11:48:00 +0100 |
Hi,
On Sat, 11 Feb 2023 at 11:08, Lars-Dominik Braun <lars@6xq.net> wrote:
> * 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.
> -(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)))))))
Why not just do a drop-in replacement of the implement of
’guix-package->hackage-name’ by the implementation of
’package-upstream-name*’?
Other said, avoid to introduce a new procedure and remove another; and
instead just replace the implementation of the old by the new.
> - (let* ((hackage-name (guix-package->hackage-name package))
> + (let* ((hackage-name (package-upstream-name* package))
It would avoid all these kind of replacement, no?
Cheers,
simon
- [bug#61420] [PATCH 00/31] Haskell upgrade to Stackage 20.5, Lars-Dominik Braun, 2023/02/11
- [bug#61420] [PATCH 01/31] import: hackage: Allow version at the beginning of cabal file., Lars-Dominik Braun, 2023/02/11
- [bug#61420] [PATCH 03/31] build: haskell-build-system: Support multiple libraries., Lars-Dominik Braun, 2023/02/11
- [bug#61420] [PATCH 05/31] import: stackage: Update to release 20.5., Lars-Dominik Braun, 2023/02/11
- [bug#61420] [PATCH 04/31] gnu: Switch default to GHC 9.2., Lars-Dominik Braun, 2023/02/11
- [bug#61420] [PATCH 10/31] import: haskell: Add new internal library for GHC 9.2., Lars-Dominik Braun, 2023/02/11
- [bug#61420] [PATCH 15/31] gnu: Remove unused Haskell packages., Lars-Dominik Braun, 2023/02/11
- [bug#61420] [PATCH 22/31] build: haskell-build-system: Build static executables by default., Lars-Dominik Braun, 2023/02/11
- [bug#61420] [PATCH 08/31] import: hackage: Use upstream-name property., Lars-Dominik Braun, 2023/02/11
- [bug#61420] [PATCH 08/31] import: hackage: Use upstream-name property.,
zimoun <=
- [bug#61420] [PATCH 02/31] build: haskell-build-system: Remove trailing #t., Lars-Dominik Braun, 2023/02/11
- [bug#61420] [PATCH 12/31] build: haskell-build-system: Remove unused linker flags., Lars-Dominik Braun, 2023/02/11
- [bug#61420] [PATCH 21/31] gnu: ghc-lua: Disable symbol export., Lars-Dominik Braun, 2023/02/11
- [bug#61420] [PATCH 11/31] build: haskell-build-system: Process all transitive dependencies., Lars-Dominik Braun, 2023/02/11
- [bug#61420] [PATCH 16/31] gnu: ghc-parsec: Update to 3.1.15.0., Lars-Dominik Braun, 2023/02/11
- [bug#61420] [PATCH 06/31] import: hackage: Add upstream-name property., Lars-Dominik Braun, 2023/02/11
- [bug#61420] [PATCH 20/31] gnu: ghc-9.2: Support static linking with glibc < 2.34., Lars-Dominik Braun, 2023/02/11
- [bug#61420] [PATCH 18/31] gnu: elm: Support GHC 9.2., Lars-Dominik Braun, 2023/02/11
- [bug#61420] [PATCH 26/31] gnu: git-annex: Drop Haskell documentation., Lars-Dominik Braun, 2023/02/11
- [bug#61420] [PATCH 14/31] gnu: ghc-9.2: Increase make verbosity., Lars-Dominik Braun, 2023/02/11