* fetching git submodule using (uri (recursive? #t))
@ 2019-05-28 13:18 Myles English
2019-06-01 14:09 ` Ludovic Courtès
2019-06-03 22:30 ` Myles English
0 siblings, 2 replies; 4+ messages in thread
From: Myles English @ 2019-05-28 13:18 UTC (permalink / raw)
To: help-guix
Hello guix,
I am trying to build this package that uses git submodules but the
(recursive? #t) doesn't seem to have any effect. I understand that it
would be preferable to replace the submodules with separate packages but
the modules themselves are quite specific to the main package,
e.g. https://github.com/solvespace/libdxfrw describes itself as
"SolveSpace's independent fork of libdxfrw".
The actual build error is:
-- Using in-tree libdxfrw
CMake Error at CMakeLists.txt:111 (add_subdirectory):
The source directory
/tmp/guix-build-solvespace-git-0.0.1.drv-0/source/extlib/libdxfrw
does not contain a CMakeLists.txt file.
(define-public solvespace-git
(let ((commit "03fa5f30f1a1db7231a25653c9dd38044fe06640"))
(package
(name "solvespace-git")
(version "0.0.1")
(source
(origin
(method git-fetch)
(uri (git-reference
(url "https://github.com/solvespace/solvespace.git")
(commit commit)
(recursive? #t)))
(sha256
(base32
"0vj40j7fkd0mmwh7p5r1h8gsisfjcikrhwmy1dzi4hpz0w7arxqb"))))
(build-system cmake-build-system)
(arguments
`(#:configure-flags '("-DCMAKE_BUILD_TYPE=Release")
#:phases
(modify-phases %standard-phases
(add-after 'unpack 'set-git-commit-hash
(lambda* (#:key inputs #:allow-other-keys)
(substitute* "CMakeLists.txt"
(("include\\(GetGitCommitHash\\)")
"#include(GetGitCommitHash)")
(("\\# set\\(GIT_COMMIT_HASH 0000000000000000000000000000000000000000\\)")
(string-append "set(GIT_COMMIT_HASH " ,commit ")")))
#t)))))
(inputs
`(
("git" ,git)
("libpng" ,libpng)
("cairo" ,cairo)
("freetype" ,freetype)
("json-c" ,json-c)
;; for GUI
("fontconfig" ,fontconfig)
("gtkmm" ,gtkmm) ;;@3.0
("pangomm" ,pangomm) ;;@1.4
;; ("gl" ,gl)
("glu" ,glu)
;; optional: libspnav
))
(home-page "http://solvespace.com")
(synopsis "Parametric 3D CAD too")
(description "Parametric 3D CAD too")
(license license:gpl3+))))
Thanks,
Myles
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: fetching git submodule using (uri (recursive? #t))
2019-05-28 13:18 fetching git submodule using (uri (recursive? #t)) Myles English
@ 2019-06-01 14:09 ` Ludovic Courtès
2019-06-03 22:30 ` Myles English
1 sibling, 0 replies; 4+ messages in thread
From: Ludovic Courtès @ 2019-06-01 14:09 UTC (permalink / raw)
To: Myles English; +Cc: help-guix
Hello,
Myles English <mylesenglish@gmail.com> skribis:
> I am trying to build this package that uses git submodules but the
> (recursive? #t) doesn't seem to have any effect.
Did you update the SHA256 hash accordingly?
That is, perform a checkout including the submodules, run “guix hash
-rx” on that checkout, and put that hash in your package definition.
HTH,
Ludo’.
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: fetching git submodule using (uri (recursive? #t))
2019-05-28 13:18 fetching git submodule using (uri (recursive? #t)) Myles English
2019-06-01 14:09 ` Ludovic Courtès
@ 2019-06-03 22:30 ` Myles English
2019-06-04 13:40 ` Myles English
1 sibling, 1 reply; 4+ messages in thread
From: Myles English @ 2019-06-03 22:30 UTC (permalink / raw)
To: help-guix
on [2019-05-28] at 14:18 I wrote:
> I am trying to build this package that uses git submodules but the
> (recursive? #t) doesn't seem to have any effect.
Thanks to bavier and reepca on IRC #guix who figured out this happens
when the package definition is changed (by e.g., adding "(recursive?
#t)") but the hash is not updated. This causes guix to think,
reasonably, that it already has the source in /gnu/store/the_hash-etc
because the_hash hasn't changed since the last time it was fetched.
To fix, just remove the source from the store before trying again:
$ guix gc -d /gnu/store/the_hash-etc
(N.B. the "-d" above might have changed to "-D")
Additionally, when developing a package, reepca suggested making a
random change to the hash just so guix knows it needs to get the source
again, and it will suggested the real hash to put in the package
definition.
Myles
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: fetching git submodule using (uri (recursive? #t))
2019-06-03 22:30 ` Myles English
@ 2019-06-04 13:40 ` Myles English
0 siblings, 0 replies; 4+ messages in thread
From: Myles English @ 2019-06-04 13:40 UTC (permalink / raw)
To: help-guix
And thanks to Ludo' too. I didn't see your mail because the thread view
doesn't seam to be able to span from one month to the next, and also I
think I got unsubscribed after getting messages saying "Your membership in
the mailing list Help-Guix has been disabled due to excessive bounces".
Myles
On Mon, 3 Jun 2019 at 23:30, Myles English <mylesenglish@gmail.com> wrote:
> on [2019-05-28] at 14:18 I wrote:
>
> > I am trying to build this package that uses git submodules but the
> > (recursive? #t) doesn't seem to have any effect.
>
> Thanks to bavier and reepca on IRC #guix who figured out this happens
> when the package definition is changed (by e.g., adding "(recursive?
> #t)") but the hash is not updated. This causes guix to think,
> reasonably, that it already has the source in /gnu/store/the_hash-etc
> because the_hash hasn't changed since the last time it was fetched.
>
> To fix, just remove the source from the store before trying again:
>
> $ guix gc -d /gnu/store/the_hash-etc
>
> (N.B. the "-d" above might have changed to "-D")
>
> Additionally, when developing a package, reepca suggested making a
> random change to the hash just so guix knows it needs to get the source
> again, and it will suggested the real hash to put in the package
> definition.
>
> Myles
>
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2019-06-04 13:40 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-05-28 13:18 fetching git submodule using (uri (recursive? #t)) Myles English
2019-06-01 14:09 ` Ludovic Courtès
2019-06-03 22:30 ` Myles English
2019-06-04 13:40 ` Myles English
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/guix.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.