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

mfc9332cdw: init at 1.1.3-0/1.1.4-0 #88914

Closed

Conversation

felixsinger
Copy link
Member

Motivation for this change
Things done
  • Tested using sandboxing (nix.useSandbox on NixOS, or option sandbox in nix.conf on non-NixOS linux)
  • 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 nixpkgs-review --run "nixpkgs-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)
  • Ensured that relevant documentation is up to date
  • Fits CONTRIBUTING.md.

Copy link
Contributor

@NickHu NickHu left a 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!)

Copy link
Contributor

@NickHu NickHu left a 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

@NickHu
Copy link
Contributor

NickHu commented May 26, 2020

@felixsinger Thanks a lot for your contribution! I've left a couple of comments

@felixsinger felixsinger force-pushed the add-pkgs/cups/drivers/mfc9332cdw branch from 202936b to cc7700d Compare May 26, 2020 19:30
@felixsinger
Copy link
Member Author

@NickHu Done

Copy link
Contributor

@NickHu NickHu left a 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...

@felixsinger
Copy link
Member Author

@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.

@felixsinger felixsinger requested a review from NickHu May 30, 2020 15:36
@@ -25948,6 +25948,9 @@ in

hll2390dw-cups = callPackage ../misc/cups/drivers/hll2390dw-cups { };

mfc9332cdwcupswrapper = (callPackage ../misc/cups/drivers/brother/mfc9332cdw { }).mfc9332cdwcupswrapper;
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
mfc9332cdwcupswrapper = (callPackage ../misc/cups/drivers/brother/mfc9332cdw { }).mfc9332cdwcupswrapper;
mfc9332cdw-cupswrapper = (callPackage ../misc/cups/drivers/brother/mfc9332cdw { }).cupswrapper;

to match the attribute name below

Comment on lines +68 to +69
dlfid = "dlf101642";
relpath_wrapper = "${relpath_printer}/cupswrapper";
Copy link
Contributor

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.

Comment on lines +115 to +122
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
Copy link
Contributor

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.

Comment on lines +24 to +25
dlfid = "dlf101620";
relpath_lpd = "${relpath_printer}/lpd";
Copy link
Contributor

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";
Copy link
Contributor

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 {
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
mfc9332cdwcupswrapper = stdenv.mkDerivation rec {
cupswrapper = stdenv.mkDerivation rec {

@NickHu NickHu changed the title pkgs/cups/drivers/mfc9332cdw: Add new package mfc9332cdw: init at 1.1.3-0/1.1.4-0 Jun 1, 2020
@mweinelt
Copy link
Member

mweinelt commented Jul 6, 2020

Hey @felixsinger, it's been a while. Are you planning to address the recommendations made by @flokli?

@stale
Copy link

stale bot commented Jun 6, 2021

I marked this as stale due to inactivity. → More info

@stale stale bot added the 2.status: stale https://github.com/NixOS/nixpkgs/blob/master/.github/STALE-BOT.md label Jun 6, 2021
@SuperSandro2000
Copy link
Member

Closing due to inactivity from author.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

6 participants