Age | Commit message (Collapse) | Author | Files | Lines |
|
This commit corrects a minor typo in the stdenv portion of the
documentation for the nix language.
|
|
|
|
doc: add installCheckTarget and installCheckFlags to manual
|
|
|
|
Fixes #42393
|
|
|
|
With visual inspection that nothing got worse.
|
|
|
|
|
|
Note that a bunch of non-python packages use this attribute already.
Some of those are clearly unaware of the fact that this attribute does
not exists in stdenv because they define it but don't to add it to
their `bulidInputs` :)
Also note that I use `buildInputs` here and only handle regular
builds because python and haskell builders do it this way and I'm not
sure how to properly handle the cross-compilation case.
|
|
I originally wrote this for packaging proprietary games in Vuizvui[1]
but I thought it would be generally useful as we have a fair amount of
proprietary software lurking around in nixpkgs, which are a bit tedious
to maintain, especially when the library dependencies change after an
update.
So this setup hook searches for all ELF executables and libraries in the
resulting output paths after install phase and uses patchelf to set the
RPATH and interpreter according to what dependencies are available
inside the builder.
For example consider something like this:
stdenv.mkDerivation {
...
nativeBuildInputs = [ autoPatchelfHook ];
buildInputs = [ mesa zlib ];
...
}
Whenever for example an executable requires mesa or zlib, the RPATH will
automatically be set to the lib dir of the corresponding dependency.
If the library dependency is required at runtime, an attribute called
runtimeDependencies can be used to list dependencies that are added to
all executables that are discovered unconditionally.
Beside this, it also makes initial packaging of proprietary software
easier, because one no longer has to manually figure out the
dependencies in the first place.
[1]: https://github.com/openlab-aux/vuizvui
Signed-off-by: aszlig <aszlig@nix.build>
Closes: #34506
|
|
compiling
I hope this will be a temporary measure. If there is consensus around
issue #33599, then we can follow an explicit `dontCheck`, but default to
not checking during cross builds when none is given.
|
|
|
|
|
|
This accounts for all the new dependencies and propagation logic changes
I'm about to add.
Fixes #1915---with this change I think the distinction is finally clear
enough.
|
|
|
|
Shrunk the CC Wrapper documentation so as not to be repetative.
|
|
|
|
|
|
|
|
|
|
The main motivation for this is to have something to google for LD=$CC.
Eventually, this should probably be moved to another section, but we
can deal with that later.
|
|
Packages get --host and --target by default, but can explicitly request
any subset to be passed as needed. See docs for more info.
rustc: Avoid hash breakage by using the old (ignored)
dontSetConfigureCross when not cross building
|
|
nixpkgs manual: advise against overriding whole phases
|
|
|
|
I've seen that mistake at least a few times already, e.g.
https://github.com/NixOS/nixpkgs/pull/26209#issuecomment-305925562
It might perhaps seem counter-intuitive if one doesn't know nixpkgs well.
|
|
|
|
Do so in the stdenv section where the other two are discussed. This can be
done without brining up cross-compilation by talking about build-time vs
run-time.
|
|
Fixes #18887.
|
|
`stripHash` documentation states that it prints out the stripped name to
the stdout, but the function stored the value in `strippedName`
instead.
Basically all usages did something like
`$(stripHash $foo | echo $strippedName)` which is just braindamaged.
Fixed the implementation and all invocations.
|
|
Add function documentation to `makeWrapper`.
Also add user documentation to the nixpkgs manual.
|
|
|
|
|
|
doc: specify that *Flags are string lists
|
|
|
|
|
|
|
|
|
|
|
|
Introduced by mistake
This reverts commit e71a5cb87841f0af4a2279517b77a9a07ba394c0.
|
|
stripHash uses a global variable to communicate it's computation
results, but it's not necessary. You can just pipe to stdout in a
subshell. A function mostly behaves like just another command.
baseHash() also introduces a suffix-stripping capability since it's
something the users of the function tend to use.
|
|
The documentation now matches the behavior of the function.
|
|
|
|
Some variables are filtered out as of #14907.
|
|
|
|
|
|
|
|
|
|
|
|
|