Skip to content

mirakurun: init at 3.3.0#48740

Merged
infinisil merged 2 commits intoNixOS:masterfrom
midchildan:add-mirakurun
Aug 11, 2020
Merged

mirakurun: init at 3.3.0#48740
infinisil merged 2 commits intoNixOS:masterfrom
midchildan:add-mirakurun

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 This PR causes between 1 and 10 packages to rebuild on Darwin. 10.rebuild-linux: 11-100 This PR causes between 11 and 100 packages to rebuild on Linux. 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
@GrahamcOfBorg GrahamcOfBorg added 10.rebuild-linux: 1-10 This PR causes between 1 and 10 packages to rebuild on Linux. and removed 10.rebuild-linux: 11-100 This PR causes between 11 and 100 packages to rebuild on Linux. labels Nov 9, 2018
@midchildan midchildan force-pushed the add-mirakurun branch 2 times, most recently from 29548a7 to e1f0121 Compare November 11, 2018 05:55
@GrahamcOfBorg GrahamcOfBorg added 10.rebuild-linux: 11-100 This PR causes between 11 and 100 packages to rebuild on Linux. and removed 10.rebuild-linux: 1-10 This PR causes between 1 and 10 packages to rebuild on Linux. labels Nov 11, 2018
@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 This PR causes between 1 and 10 packages to rebuild on Linux. and removed 2.status: merge conflict This PR has merge conflicts with the target branch 10.rebuild-darwin: 1-10 This PR causes between 1 and 10 packages to rebuild on Darwin. 10.rebuild-linux: 11-100 This PR causes between 11 and 100 packages to rebuild on Linux. labels Nov 23, 2018
@midchildan midchildan changed the title mirakurun: init at 2.7.3 mirakurun: init at 2.7.5 Dec 29, 2018
@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.

@ofborg ofborg bot added 10.rebuild-darwin: 1 This PR causes 1 package to rebuild on Darwin. 10.rebuild-linux: 1-10 This PR causes between 1 and 10 packages to rebuild on Linux. and removed 10.rebuild-linux: 11-100 This PR causes between 11 and 100 packages to rebuild on Linux. labels Aug 5, 2020
@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 This PR causes 1 package to rebuild on Darwin. 10.rebuild-darwin: 1-10 This PR causes between 1 and 10 packages to rebuild on Darwin. 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!

@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 :-)

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 This PR causes between 1 and 10 packages to rebuild on Linux.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants