gnu: openfoam-org: Use 'git-fetch'.
So far the source was taken from an auto-generated, unstable tarball at github.com. This fixes that. * gnu/packages/simulation.scm (openfoam-org)[source]: Switch to 'git-fetch'. [arguments]: Add 'rename-self' phase.master
parent
2a4047e540
commit
caa30ff2f1
|
@ -84,6 +84,7 @@
|
||||||
#:use-module (guix gexp)
|
#:use-module (guix gexp)
|
||||||
#:use-module (guix utils)
|
#:use-module (guix utils)
|
||||||
#:use-module (ice-9 ftw)
|
#:use-module (ice-9 ftw)
|
||||||
|
#:use-module (ice-9 match)
|
||||||
#:use-module (ice-9 regex)
|
#:use-module (ice-9 regex)
|
||||||
#:use-module (srfi srfi-1))
|
#:use-module (srfi srfi-1))
|
||||||
|
|
||||||
|
@ -92,14 +93,15 @@
|
||||||
(name "openfoam-org")
|
(name "openfoam-org")
|
||||||
(version "10.20230119")
|
(version "10.20230119")
|
||||||
(source (origin
|
(source (origin
|
||||||
(method url-fetch)
|
(method git-fetch)
|
||||||
(uri (string-append "https://github.com/OpenFOAM/OpenFOAM-"
|
(uri (git-reference
|
||||||
(version-major version) "/archive/"
|
(url (string-append "https://github.com/OpenFOAM/OpenFOAM-"
|
||||||
(second (string-split version #\.))
|
(version-major version)))
|
||||||
".tar.gz"))
|
(commit (second (string-split version #\.)))))
|
||||||
(sha256
|
(sha256
|
||||||
(base32
|
(base32
|
||||||
"1aw2vb5s7frg942ngd5x5x2dm67liyg6czff56qi567mshccpy46"))
|
"0icvwg7s6vnkgmdiczivia9pbrgx8nanw9a4j080fzfvdv9vxhzp"))
|
||||||
|
(file-name (git-file-name name version))
|
||||||
(modules '((guix build utils)))
|
(modules '((guix build utils)))
|
||||||
(snippet `(begin
|
(snippet `(begin
|
||||||
;; patch shell paths
|
;; patch shell paths
|
||||||
|
@ -211,7 +213,24 @@
|
||||||
#~(modify-phases %standard-phases
|
#~(modify-phases %standard-phases
|
||||||
(add-before 'build 'patch-HOME-path
|
(add-before 'build 'patch-HOME-path
|
||||||
(lambda _
|
(lambda _
|
||||||
(setenv "HOME" "/tmp") #t))
|
(setenv "HOME" "/tmp")))
|
||||||
|
(add-before 'build 'rename-self
|
||||||
|
(lambda _
|
||||||
|
;; The script 'bin/foamEtcFile' derives the version name based
|
||||||
|
;; on the current directory name (!), so make sure to follow the
|
||||||
|
;; expected naming convention.
|
||||||
|
(let ((here (canonicalize-path "."))
|
||||||
|
(target #$(string-append
|
||||||
|
"OpenFOAM-"
|
||||||
|
(string-map (match-lambda
|
||||||
|
(#\. #\-)
|
||||||
|
(chr chr))
|
||||||
|
(package-version this-package)))))
|
||||||
|
(chdir "..")
|
||||||
|
(format #t "renaming '~a' to '~a'~%"
|
||||||
|
here target)
|
||||||
|
(rename-file here target)
|
||||||
|
(chdir target))))
|
||||||
(add-before 'build 'patch-scotch
|
(add-before 'build 'patch-scotch
|
||||||
(lambda _
|
(lambda _
|
||||||
(substitute* "etc/config.sh/scotch"
|
(substitute* "etc/config.sh/scotch"
|
||||||
|
|
Reference in New Issue