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

cups-toshiba-estudio: init at 7.51 #24676

Merged
merged 2 commits into from Apr 6, 2017
Merged

cups-toshiba-estudio: init at 7.51 #24676

merged 2 commits into from Apr 6, 2017

Conversation

jpotier
Copy link
Contributor

@jpotier jpotier commented Apr 6, 2017

Motivation for this change

There was no driver for the toshiba-estudio series of printers. This is a generic driver that supports many
printers (see comment in the default.nix).

Things done
  • Tested using sandboxing
    (nix.useSandbox on NixOS,
    or option build-use-sandbox in nix.conf
    on non-NixOS)
  • Built on platform(s)
    • NixOS
    • macOS
    • Linux
  • Tested compilation of all pkgs that depend on this change using nix-shell -p nox --run "nox-review wip"
  • Tested function of the printer driver (I've used it at work for a few weeks now)
  • Fits CONTRIBUTING.md.

@mention-bot
Copy link

@jpotier, thanks for your PR! By analyzing the history of the files in this pull request, we identified @zimbatm, @zraexy and @vcunat to be potential reviewers.

Copy link
Member

@zimbatm zimbatm left a comment

Choose a reason for hiding this comment

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

I don't have a printer available to test this out. How did you test the package?

# TOSHIBA e-STUDIO6550C
# TOSHIBA e-STUDIO6560C
# TOSHIBA e-STUDIO6570C
# TOSHIBA e-STUDIO7506AC
Copy link
Member

Choose a reason for hiding this comment

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

It might make sense to put that in the meta.longDescription to make it searchable as a user.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Ok, makes sense.

"installPhase" ];

preInstall = ''
ls
Copy link
Member

Choose a reason for hiding this comment

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

debug leftover?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Ooops, didn't see this one

preInstall = ''
ls
patchShebangs lib/
head lib/cups/filter/est6550_Authentication
Copy link
Member

Choose a reason for hiding this comment

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

debug leftover?

Copy link
Contributor Author

@jpotier jpotier Apr 6, 2017

Choose a reason for hiding this comment

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

Yeah, off it goes

head lib/cups/filter/est6550_Authentication

gunzip share/cups/model/Toshiba/TOSHIBA_ColorMFP_CUPS.gz
sed -i "s+/usr+$out+" share/cups/model/Toshiba/TOSHIBA_ColorMFP_CUPS
Copy link
Member

Choose a reason for hiding this comment

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

is there only one /usr to patch?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yes, any thought on how to do it better?

"preInstall"
"installPhase" ];

preInstall = ''
Copy link
Member

Choose a reason for hiding this comment

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

can you call this the configurePhase or patchPhase? pre-phases are supposed to be called from the phase itself

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Let's go for patchPhase

description = "Printer only driver for the Toshiba e-STUDIO class of printers";
homepage = https://www.toshiba-business.com.au/support/drivers;
license = stdenv.lib.licenses.unfree;
maintainers = with stdenv.lib.maintainers; [ jpotier ];
Copy link
Member

Choose a reason for hiding this comment

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

adding with stdenv.lib; on the whole meta block removes a bit of duplication, not required though

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Looks cleaner, will do

@jpotier
Copy link
Contributor Author

jpotier commented Apr 6, 2017

About testing: I've first built it as an independant package and I manually selected the PPD when installing the printer with CUPS. Then, I forked and cloned nixpkgs locally and added the package (this commit). I added the printer driver in the printing.drivers list in my configuration.nix. I reinstalled the printer, checked it was now available in the cups menu and tested printing again.

@zimbatm zimbatm merged commit 09b1414 into NixOS:master Apr 6, 2017
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

4 participants