index
:
guix
koszko
koszko-scripts
Wojtek's customized Guix
about
summary
refs
log
tree
commit
diff
log msg
author
committer
range
path:
root
/
gnu
/
tests
diff options
context:
1
2
3
4
5
6
7
8
9
10
15
20
25
30
35
40
<
2021-06-04
utils: Define ‘search-input-file’ procedure.
...
The procedure ‘which’ from (guix build utils) is used for two different purposes: 1. for finding the absolute file name of a binary that needs to run during the build process 2. for finding the absolute file name of a binary, for the target system (as in --target=TARGET), e.g. for substituting sh->/gnu/store/.../bin/sh, python->/gnu/store/.../bin/python. When compiling natively (target=#f in Guix parlance), this is perfectly fine. However, when cross-compiling, there is a problem. "which" looks in $PATH for binaries. That's good for purpose (1), but incorrect for (2), as the $PATH contains binaries from native-inputs instead of inputs. This commit defines a ‘search-input-file’ procedure. It functions like 'which', but instead of searching in $PATH, it searches in the 'inputs' of the build phase, which must be passed to ‘search-input-file’ as an argument. Also, the file name must include "bin/" or "sbin/" as appropriate. * guix/build/utils.scm (search-input-f