Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

mirakurun: init at 3.3.0 #48740

Merged
merged 2 commits into from
Aug 11, 2020
Merged

mirakurun: init at 3.3.0 #48740

merged 2 commits into from
Aug 11, 2020

Conversation

midchildan
Copy link
Member

@midchildan midchildan commented Oct 20, 2018

Motivation for this change

Mirakurun is a backend for DVR software that manages ISDB-compatible tuners.

Things done
  • Tested using sandboxing (nix.useSandbox on NixOS, or option sandbox in nix.conf on non-NixOS)
  • Built on platform(s)
    • NixOS
    • macOS
    • other Linux distributions
  • Tested via one or more NixOS test(s) if existing and applicable for the change (look inside nixos/tests)
  • Tested compilation of all pkgs that depend on this change using nix-shell -p nox --run "nox-review wip"
  • Tested execution of all binary files (usually in ./result/bin/)
  • Determined the impact on package closure size (by running nix path-info -S before and after)
  • Fits CONTRIBUTING.md.

@GrahamcOfBorg GrahamcOfBorg added 6.topic: nixos Issues or PRs affecting NixOS modules, or package usability issues specific to NixOS 8.has: module (update) This PR changes an existing module in `nixos/` 8.has: package (new) This PR adds a new package 10.rebuild-darwin: 1-10 10.rebuild-linux: 11-100 labels Oct 20, 2018
@midchildan midchildan force-pushed the add-mirakurun branch 2 times, most recently from ad88cde to 1462967 Compare October 29, 2018 09:37
@midchildan midchildan mentioned this pull request Oct 29, 2018
9 tasks
@midchildan midchildan force-pushed the add-mirakurun branch 2 times, most recently from a333228 to fe990ad Compare November 9, 2018 15:45
@midchildan midchildan force-pushed the add-mirakurun branch 2 times, most recently from 29548a7 to e1f0121 Compare November 11, 2018 05:55
@worldofpeace worldofpeace added the 2.status: merge conflict This PR has merge conflicts with the target branch label Nov 22, 2018
@GrahamcOfBorg GrahamcOfBorg added 10.rebuild-darwin: 0 This PR does not cause any packages to rebuild on Darwin 10.rebuild-linux: 1-10 and removed 2.status: merge conflict This PR has merge conflicts with the target branch 10.rebuild-darwin: 1-10 10.rebuild-linux: 11-100 labels Nov 23, 2018
@midchildan midchildan changed the title mirakurun: init at 2.7.3 mirakurun: init at 2.7.5 Dec 29, 2018
nixos/modules/services/video/mirakurun.nix Outdated Show resolved Hide resolved
pkgs/applications/video/mirakurun/generate.sh Outdated Show resolved Hide resolved
nixos/modules/services/video/mirakurun.nix Outdated Show resolved Hide resolved
nixos/modules/services/video/mirakurun.nix Outdated Show resolved Hide resolved
nixos/modules/services/video/mirakurun.nix Outdated Show resolved Hide resolved
@midchildan midchildan force-pushed the add-mirakurun branch 2 times, most recently from 8f8284a to f414278 Compare August 5, 2020 13:31
@ofborg ofborg bot removed the 2.status: merge conflict This PR has merge conflicts with the target branch label Aug 5, 2020
@midchildan
Copy link
Member Author

I rebased and ran ./generate.sh.

@midchildan
Copy link
Member Author

Looks like v4l-utils is currently broken in master.

@ofborg ofborg bot added 10.rebuild-darwin: 0 This PR does not cause any packages to rebuild on Darwin and removed 10.rebuild-darwin: 1 10.rebuild-darwin: 1-10 labels Aug 7, 2020
@midchildan
Copy link
Member Author

Rebased again to pull in v4l-utils fixes so that the build would pass again.

Copy link
Member

@infinisil infinisil left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Haven't had the motivation for full module reviews recently, I hope you don't mind this being a bit late!

nixos/modules/services/video/mirakurun.nix Outdated Show resolved Hide resolved
nixos/modules/services/video/mirakurun.nix Show resolved Hide resolved
nixos/modules/services/video/mirakurun.nix Show resolved Hide resolved
nixos/modules/services/video/mirakurun.nix Outdated Show resolved Hide resolved
nixos/modules/services/video/mirakurun.nix Outdated Show resolved Hide resolved
nixos/modules/services/video/mirakurun.nix Outdated Show resolved Hide resolved
nixos/modules/services/video/mirakurun.nix Show resolved Hide resolved
nixos/modules/services/video/mirakurun.nix Outdated Show resolved Hide resolved
nixos/modules/services/video/mirakurun.nix Outdated Show resolved Hide resolved
pkgs/development/node-packages/default.nix Outdated Show resolved Hide resolved
@midchildan
Copy link
Member Author

Haven't had the motivation for full module reviews recently, I hope you don't mind this being a bit late!

No worries, your reviews are helpful and I've learned quite a lot :-)

nixos/modules/services/video/mirakurun.nix Outdated Show resolved Hide resolved
nixos/modules/services/video/mirakurun.nix Outdated Show resolved Hide resolved
pkgs/development/node-packages/default.nix Outdated Show resolved Hide resolved
Copy link
Member

@infinisil infinisil left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looking good! Can you squash the commits into at least one for the package and one for the module?

@midchildan
Copy link
Member Author

midchildan commented Aug 11, 2020

I'm going to put the braces back on where lib.optionals are used. It seems the current implementation doesn't always return a list.

nixpkgs/lib/lists.nix

Lines 266 to 270 in d4bbe9a

optionals =
# Condition
cond:
# List to return if condition is true
elems: if cond then elems else [];

Here's the error message from the module:

while evaluating the attribute 'value' at /home/midchildan/Documents/src/repos/github.com/NixOS/nixpkgs/lib/modules.nix:281:44:
value is a string while a list was expected, at /home/midchildan/Documents/src/repos/github.com/NixOS/nixpkgs/nixos/modules/services/video/mirakurun.nix:148:16

@midchildan
Copy link
Member Author

Done

diff --git a/nixos/modules/services/video/mirakurun.nix b/nixos/modules/services/video/mirakurun.nix
index e878802db7c..ec45bd84184 100644
--- a/nixos/modules/services/video/mirakurun.nix
+++ b/nixos/modules/services/video/mirakurun.nix
@@ -145,8 +145,8 @@ in
           getconf = target: config.environment.etc."mirakurun/${target}.yml".source;
           targets = [
             "server"
-          ] ++ optionals (cfg.tunerSettings != null) "tuners"
-            ++ optionals (cfg.channelSettings != null) "channels";
+          ] ++ optionals (cfg.tunerSettings != null) [ "tuners" ]
+            ++ optionals (cfg.channelSettings != null) [ "channels" ];
         in (map getconf targets);
       };
     };

@infinisil infinisil merged commit f21c421 into NixOS:master Aug 11, 2020
@midchildan midchildan deleted the add-mirakurun branch August 11, 2020 04:58
@midchildan
Copy link
Member Author

Thanks! Would you also mind to take a look at #49413?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
6.topic: nixos Issues or PRs affecting NixOS modules, or package usability issues specific to NixOS 8.has: module (update) This PR changes an existing module in `nixos/` 8.has: package (new) This PR adds a new package 10.rebuild-darwin: 0 This PR does not cause any packages to rebuild on Darwin 10.rebuild-linux: 1-10
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants