-
-
Notifications
You must be signed in to change notification settings - Fork 14.4k
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
overwitch, nixos/overwitch: init at 1.0 #269278
base: master
Are you sure you want to change the base?
Conversation
Adds necessary udev/hwdb rules for the overwitch package.
I'm not sure how to interpret the OfBorg error. Can someone fill me in if there's something I need to fix? |
I think the reason is because what you want is actually Are you still interested in working on/maintaining this? I don't have a device to test this with but I can make a review. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Mostly LGTM. Package seems to build + run fine, too, to the extent that I can test it.
Note that since this PR was created, there is a new formatting style and autoformatter that can be used for nixpkgs. See the nixfmt-rfc-style
package. To my knowledge, it is not necessary to adhere to this style right now, but it wouldn't hurt either.
}; | ||
in { | ||
options.programs.overwitch = { | ||
enable = mkEnableOption (lib.mdDoc "Install overwitch and add the necessary udev and hwdb rules."); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lib.mdDoc
should no longer be necessary, see e.g. #300735
Also, you are using mkEnableOption
so you may want to be mindful of the way the string will be formatted. This will read as "Whether to enable Install overwitch and add the necessary udev and hwdb rules.."
}; | ||
|
||
config = mkIf cfg.enable { | ||
environment.systemPackages = [ overwitch ]; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: extra whitespace
environment.systemPackages = [ overwitch ]; | |
environment.systemPackages = [ overwitch ]; |
, stdenv | ||
, fetchFromGitHub | ||
, libtool | ||
, libusb |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
, libusb | |
, libusb1 |
I think this would fix the Hydra problem.
|
||
stdenv.mkDerivation rec { | ||
pname = "overwitch"; | ||
version = "1.0"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
version = "1.0"; | |
version = "1.1"; |
It's now version 1.1, may as well update it I think?
|
||
src = fetchFromGitHub { | ||
owner = "dagargo"; | ||
repo = pname; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
repo = pname; | |
repo = "overwitch"; |
The pattern of using rec
to pull repo
from pname
has become somewhat unfavored since this PR was made. Sorry to be a bother, but I'd recommend simply repeating the string "overwitch"
here. For context see the finalAttrs pattern and related discussions about rec.
src = fetchFromGitHub { | ||
owner = "dagargo"; | ||
repo = pname; | ||
rev = version; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
rev = version; | |
rev = finalAttrs.version; |
Likewise, probably best to just repeat the tag, or introduce the finalAttrs
pattern and use finalAttrs.version
here.
, withGui ? true | ||
}: | ||
|
||
stdenv.mkDerivation rec { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
stdenv.mkDerivation rec { | |
stdenv.mkDerivation (finalAttrs: { |
Related to other comments: I recommend removing rec
and possibly adopting the finalAttrs
pattern in accordance with recent changes in NixOS.
Incorporates feedback from NixOS#269278 Sets Overwitch version to 1.1
Description of changes
Closes #165104.
Overwitch is an Overbridge 2 device client for JACK (JACK Audio Connection Kit).
The package requires udev/hwdb rules to be set to function properly, so these have been added in the new
nixos/overwitch
module. The package can conditionally be built without the GTK GUI. The package has therefore been added as bothoverwitch
(CLI only) andoverwitch-gtk
(CLI and GUI).Things done
nix.conf
? (See Nix manual)sandbox = relaxed
sandbox = true
./result/bin/
)