| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
| |
temp is essentially the old TempDir code from nman, but using libc's
mkdtemp(3) directly instead of mktemp(1) and a slightly better API.
|
|
|
|
|
| |
Most notably stderr produced by nix-instantiate and nix-store will now
be printed on an error.
|
| |
|
|
|
|
| |
Should save on copying a bit.
|
| |
|
|
|
|
|
|
|
|
| |
man pages are usually pretty small and therefore often also included in
out whereas doc seems to seldomly contain any man pages.
TODO: confirm this and get a better overview over man pages in doc
outputs
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
nix-instantiate unfortunately prints the plain .drv path for <attr>.out
wheras it prints <name>.drv!<output> for all non-default outputs. If we
realise the plain .drv path, _all_ outputs are realised which is not
desireable since we may not need extra store path being created by this,
e. g. for a derivation with outputs = [ "out" "lib" "dev" ] we only need
to realise "out" if the man pages are located in there, saving a bit of
time and disk space.
We implement this better behavior by adding the render function to
DrvWithOutput which converts a DrvWithOutput (at the cost of copying) to
an OsString. If the output is out, "!out" is appended to the path
meaning nix-store will only realise the default output.
|
| |
|
|
|
|
|
|
| |
* make exit code determination nicer syntactically by using an impl
* add .msg() function which returns an appropriate error message for
every error type.
|
|
|
|
|
|
|
|
|
|
| |
Unfortunately, nix-instantiate prints only the drv path for the `out`
output which causes nix-store to realise all drv outputs. This of course
breaks build_man_page since it expects the output to be just one path.
We fix this (for now) by using split(). Ideally we would use
<drv_path>!out for realising the default output which only builds the
output we need. However this is a bit annoying to solve since it means
we have to allocate a bit of memory.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This is a complete and user interface compatible rewrite of nman.go in
Rust which aleviates a few flaws of the previous implementation:
* Garbage collector roots for both the derivation and the build outputs
are created in a temporary directory which is cleaned afterwards. This
prevents a race condition between nman and nix-store --gc and doesn't
pollute the user's working directory.
* Instead of building just one build output, nman now checks every
output for the requested man page which fixes nman for derivations
which have their man pages split between multiple outputs, e. g. man
and devman.
Future work:
* Improve error messages reported to the user
* Man page
* Implement man page search heuristics if no section is specified:
Instead of falling back to section 1, all sections should be checked
for the desired page (in an ascending order?)
|
|
|
|
|
|
| |
This reverts commit 5bd756eaf27882820cb59e0ecf9c305f08b3b3e3.
Committed more than I meant to.
|
|
|
|
|
|
| |
sway needs opengl driver's to be enabled and loadable in order to start.
I previously didn't notice this oversight as I still had them loaded and
did not reboot after the rebuild.
|
|
|
|
| |
Before, nman had a habit of leaving result* links lying around.
|
|
|
|
|
|
|
| |
`runCommandLocal` was added to nixpkgs in
https://github.com/NixOS/nixpkgs/pull/74642
to speed up trivial `runCommand` derivations by always building them
locally. We have a few places where that’s good to use.
|
| |
|
| |
|
|
|
|
|
|
|
| |
Apart from using the go compiler, switch from `nix-shell -p`, which only worked
in certain cases, to a `nix-build` with fallback for `man` and default outputs.
Thanks to @muesli for the golang intro.
|
|
|