television: add wrapper helper#438728
Conversation
louis-thevenet
left a comment
There was a problem hiding this comment.
I tested it in my NixOS config, the wrapping works and I get the cables without needing to download them. But the man pages and the shell completions don't seem to get installed. I made a naive suggestion but I'm not sure this is the real issue.
|
I would assume the completions to be in /nix/store/xxxx/share// but it seems to get install elsewhere due to the wrapping? |
getchoo
left a comment
There was a problem hiding this comment.
I'm on board with something like this to avoid full rebuilds for simply adding external programs to $PATH (and it's something I've actually been putting off for a while...😆), but the current implementation has a good few problems I think we need to sort out
6712d86 to
876115c
Compare
876115c to
cd474ae
Compare
|
I am poking at the checkPhase rn |
|
Ok my findings are that if it is desired for tests to run, probably a nixos vm test needs to be created. The start is: preCheck = ''
substituteInPlace tests/common/mod.rs \
--replace-fail '"./target/debug/tv"' '"./target/${stdenv.hostPlatform.rust.cargoShortTarget}/${finalAttrs.buildType}/tv"'
'';then there are many failures with os error 13 due to a pty not being available. And most tests require a pty. So in conclusion, I think disabling tests right now is a good idea. |
cd474ae to
44a9031
Compare
44a9031 to
b580646
Compare
|
Can you please rebase? |
b580646 to
f4a49cc
Compare
|
Rebased, deleted the second commit that bumps the version since that what the rebase was against. |
getchoo
left a comment
There was a problem hiding this comment.
I'm pretty happy with this! The only suggestion I would have is to maybe keep some backwards compatibility with something like this:
assert
(extraPackages == null)
|| lib.warn "Overriding television with the 'extraPackages' attribute is deprecated. Please use `television.withPackages (p: [ p.fd ...])` instead." true;
let
television = rustPlatform.buildRustPackage { ... };
in
if extraPackages == null then television else television.withPackages (lib.const extraPackages)f4a49cc to
084df7a
Compare
|
Alright the backwards compat is in |
Things done
withPkgswrapper helper to bring television in line with other packages like python, hunspell, typst, and others.passthru.tests.nixpkgs-reviewon this PR. See nixpkgs-review usage../result/bin/.Add a 👍 reaction to pull requests you find important.