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
mfc9332cdw: init at 1.1.3-0/1.1.4-0 #88914
mfc9332cdw: init at 1.1.3-0/1.1.4-0 #88914
Conversation
3129ac8
to
55e3afa
Compare
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.
Please reword the commit message to "maintainers: add felixsinger"
("myself" is a big ambiguous when looking at the git commit log for nixpkgs!)
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.
Please squash into previous commit
@felixsinger Thanks a lot for your contribution! I've left a couple of comments |
202936b
to
cc7700d
Compare
@NickHu Done |
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 guess the final thing to do is change the commit and PR title to something like
mfc9332cdw: init at 1.1.3-0
There is also no corresponding entry in pkgs/top-level/all-packages.nix
, so how exactly are you building and using this? There are a bunch of Brother drivers scattered in pkgs/misc/cups/drivers
, but you're right that they should probably sit in their own subdirectory. There is certainly a lot of cruft in this section of nixpkgs and it could do with a cleanup...
cc7700d
to
71d26e4
Compare
@NickHu Done. I adjusted the commit message and added the packages to all-packages.nix. Until now I wasn't aware of all-packages.nix. To build the packages I used callPackage with nix-build and I added a line to my configuration.nix to test it. |
@@ -25948,6 +25948,9 @@ in | |||
|
|||
hll2390dw-cups = callPackage ../misc/cups/drivers/hll2390dw-cups { }; | |||
|
|||
mfc9332cdwcupswrapper = (callPackage ../misc/cups/drivers/brother/mfc9332cdw { }).mfc9332cdwcupswrapper; |
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.
mfc9332cdwcupswrapper = (callPackage ../misc/cups/drivers/brother/mfc9332cdw { }).mfc9332cdwcupswrapper; | |
mfc9332cdw-cupswrapper = (callPackage ../misc/cups/drivers/brother/mfc9332cdw { }).cupswrapper; |
to match the attribute name below
dlfid = "dlf101642"; | ||
relpath_wrapper = "${relpath_printer}/cupswrapper"; |
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.
These can probably also be moved to a let expr, like with the drv above.
cp brcupsconfig/brcupsconfpt1 $out/${relpath_wrapper} | ||
cp cupswrapper/cupswrapper${model} $out/${relpath_wrapper} | ||
cp PPD/brother_${model}_printer_en.ppd $out/${relpath_wrapper} | ||
|
||
# configure permissions | ||
chmod 755 $out/${relpath_wrapper}/brcupsconfpt1 | ||
chmod 755 $out/${relpath_wrapper}/cupswrapper${model} | ||
chmod 644 $out/${relpath_wrapper}/brother_${model}_printer_en.ppd |
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.
you can use install -m …
to copy these over while specifying the chmod.
There's also -D
, which you might be able to use to create the directories in first place.
dlfid = "dlf101620"; | ||
relpath_lpd = "${relpath_printer}/lpd"; |
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.
move these into the above let expr, so it's more readable what other variables are available inside the mkDerivation
.
|
||
nativeBuildInputs = [ dpkg makeWrapper ]; | ||
|
||
unpackPhase = "dpkg-deb -x $src $out"; |
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.
use unpackCmd
instead of overriding the whole phase.
}; | ||
}; | ||
|
||
mfc9332cdwcupswrapper = 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.
mfc9332cdwcupswrapper = stdenv.mkDerivation rec { | |
cupswrapper = stdenv.mkDerivation rec { |
Hey @felixsinger, it's been a while. Are you planning to address the recommendations made by @flokli? |
I marked this as stale due to inactivity. → More info |
Closing due to inactivity from author. |
Motivation for this change
Things done
sandbox
innix.conf
on non-NixOS linux)nix-shell -p nixpkgs-review --run "nixpkgs-review wip"
./result/bin/
)nix path-info -S
before and after)