I recently wrote some Nix code where I wrongly set a value to an option
which wasn't an actual option, but an attr-set of options. The mistake I
made can be demonstrated with an expression like this:
{
foo = { lib, pkgs, config, ... }: with lib; {
options.foo.bar.baz = mkOption {
type = types.str;
};
config.foo.bar = 23;
};
}
While it wasn't too hard to find the cause of the mistake for me, it was
necessary to have some practice in reading stack traces from the module
system since the eval-error I got was not very helpful:
error: --- TypeError --------------------------------------------------------- nix-build
at: (323:25) in file: /nix/store/3nm31brdz95pj8gch5gms6xwqh0xx55c-source/lib/modules.nix
322| foldl' (acc: module:
323| acc // (mapAttrs (n: v:
| ^
324| (acc.${n} or []) ++ f module v
value is an integer while a set was expected
(use '--show-trace' to show detailed location information)
I figured that such an error can be fairly confusing for someone who's
new to NixOS, so I decided to catch this case in th `byName` function in
`lib/modules.nix` by checking if the value to map through is an actual
attr-set. If not, a different error will be thrown.
This adds a `bool` option that, when set to `true`, enables video
timeline support for the Ardour DAW. This is commonly useful for
soundtrack composition, sound design for film, etc.
When enabled, `videoSupport` ensures that both `harvid` and `xjadeo` are
available to the `ardour6` exe via the PATH. `harvid` decodes the video
stream in real-time to produce still images (I think for thumbnail
support for the timeline?). `xjadeo` acts as a video monitoring window
that whose playback position is synchronised to the Ardour playhead.
`videoSupport` remains disabled by default, preserving the original
behaviour.
Video support can be added to ardour in your system or home
configuration package list with:
```
(ardour.override { videoSupport = true; })
```
xjadeo is the X Jack Video Monitor.
Please refer to the meta attribute for more information on xjadeo.
This commit is part of a PR aimed at enabling video support in ardour.
harvid decodes still images from movie files and serves them via HTTP.
Please refer to the meta attribute for more information.
This commit is part of a PR aimed at enabling video support in ardour.