Hi Efraim, Efraim Flashner <efr...@flashner.co.il> writes:
> When using 'git-fetch' for the source, when a patch is applied part of > the version number is truncated. > > The following derivations will be built: > /gnu/store/zsy0j8jfg4q4nz8xk5bpc3h5qrclm679-opencv-3.4.3-checkout.drv > /gnu/store/kadg4jnyar79mpz5bmmg4w3qgn0iy81r-opencv-3.4.tar.xz.drv I guess the issue is in 'tarxz-name', defined within 'patch-and-repack': (define (tarxz-name file-name) ;; Return a '.tar.xz' file name based on FILE-NAME. (let ((base (if (numeric-extension? file-name) original-file-name (file-sans-extension file-name)))) (string-append base (if (equal? (file-extension base) "tar") ".xz" ".tar.xz")))) Unless the extension (everything after the last '.') of the original file name is composed entirely of hexadecimal characters, it is removed. In this case, I guess the extension is "3-checkout", so it's removed. I'm reluctant to suggest a fix until I understand the rationale for this behavior. It was added by Ludovic in February 2014, in commit 3ca00bb51e3ff906a700b6925e0ce81558c8c469. commit 3ca00bb51e3ff906a700b6925e0ce81558c8c469 Author: Ludovic Courtès <l...@gnu.org> Date: Fri Feb 28 10:41:44 2014 +0100 packages: Support 'patches' and 'snippets' for sources that are directories. * guix/packages.scm (patch-and-repack)[numeric-extension?, tarxz-name]: New procedures. [builder]: Adjust to deal with SOURCE when it's a directory. <body>: Use 'tarxz-name'. Always add (guix build utils) to IMPORTED-MODULES. Do you remember why you decided to remove non-numeric extensions, Ludovic? Thanks, Mark