-
-
Notifications
You must be signed in to change notification settings - Fork 15.1k
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
pkgs/misc/cups/drivers: add brother mfcl3770cdw #55531
pkgs/misc/cups/drivers: add brother mfcl3770cdw #55531
Conversation
15bac4a
to
7cabd6b
Compare
Hi! Quick question / heads-up, depending: does your printer driver hard-code some settings, e.g. page size to A4? See #53027 and a discourse post. My Brother printer's driver, and a couple other user's is seemingly disregarding the settings set in the print. As far as I was concerned, this was hard to spot until I realized what was going on. Thanks. (Additionally, looks like there's a merge conflict.) |
65e9569
to
b077355
Compare
b077355
to
c6017b4
Compare
@samueldr It seems to be the case here too. I have tried to print on portrait A5 (A4 split in half) and the result was as if the paper was A4. Are you suggesting to block this PR on that issue? |
@steveej since a bunch of the drivers in Nixpkgs already share the flaw I wouldn't block. Though it would be nice to get a taskforce (1) looking at and fixing the issue (2) making a brother driver helper/builder that handles the common formats; after all it seems that they are generally similar when close in age. |
c6017b4
to
05850af
Compare
@samueldr Alright, I will take a stab at it eventually. Can't be that bad to debug a CUPS issue 🙃 WRT this PR, CI should turn green now. |
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.
I don't know if the "callPackage an expression returning an attrset" is frowned upon in that kind of situation, but I don't personally see anything wrong with it.
Other than the nits and changes asked, seems good.
46a7074
to
9e70c26
Compare
I believe this driver needs to follow the same form as Having said that, I see that the mentioned drivers set interpreter path in this way:
So I believe that solving issue raised in #55531 (comment) is not required to merge this PR. I propose we do the simple refactoring and merge this. |
This adds the printer driver for the Brother MFCL3770CDW. It combines the cups-wrapper and the driver in one file which allows sharing common variables and making it less error-prone than the other Brother drivers in repository. I volunteer for maintaining this one as long as I've got the model around.
9e70c26
to
64b2dc8
Compare
While I'm aware that this PR takes a different approach I don't agree that it needs to follow the existing one. A further refactor could take this one as an example, or unify all of them to an even different one. |
@steveej In your approach you bind |
@veprbl Making driver overrideable is a good suggestion, thanks! I think it's not a difficult change to add here. The approach is motivated by trying to minimize redundancy between the driver and the wrapper. |
@samueldr please take a look at the changes I made recently, and see if your comments are addressed appropriately. |
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.
As far as what I assked, it looks fine.
I assume this was tested at every step by yourself, as obviously not many users will have that particular printer :).
I've been using the printer on my system and it works OK, besides the side-effects you've mentioned in #55531 (comment) already. It's not bad enough to really debug the issue though. |
@samueldr I don't have merge access, would you mind merging this as you've approved it? Or are you waiting for another maintainer to double-check? |
unpackPhase = "dpkg-deb -x $src $out"; | ||
|
||
installPhase = '' | ||
basedir=${driver}/${reldir} |
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.
Here is a way to improve overridability:
inherit driver;
installPhase = ''
basedir="$driver/${reldir}"
This adds the printer driver for the Brother MFCL3770CDW.
It combines the cups-wrapper and the driver in one file which allows
sharing common variables and making it less error-prone than the other
Brother drivers in repository.
I volunteer for maintaining this one as long as I've got the model
around.
Motivation for this change
New driver for new hardware.
Things done
sandbox
innix.conf
on non-NixOS)nix-shell -p nox --run "nox-review wip"
./result/bin/
)nix path-info -S
before and after)