Skip to content

hp-unified-linux-driver: init at 1.00.39.12_00.15#468537

Merged
SuperSandro2000 merged 2 commits intoNixOS:masterfrom
danberdev:create-hp-uld-package
Dec 20, 2025
Merged

hp-unified-linux-driver: init at 1.00.39.12_00.15#468537
SuperSandro2000 merged 2 commits intoNixOS:masterfrom
danberdev:create-hp-uld-package

Conversation

@danberdev
Copy link
Contributor

@danberdev danberdev commented Dec 6, 2025

Hello!

I've been migrating to NixOS and encountered a problem setting up my HP printer (Laser MFP 135r to be precise). I've always had problems with it, needing to install some strange hp-uld driver instead of using the hplip suite on other distributions.

I've started to dig into it, because the package collection didn't have this driver, and it turned out, that my HP was a Samsung in disguise all this time :D. That's why it needs a special driver among some other HP models.

I tried to write a derivation to package the driver for my machine, and it worked (but it wasn't easy, some ugly library patching, ugh). As I've managed to write the derivation and package the driver, I thought that it would be nice to offer it to the community (and maintain it, of course).

Things done

  • Built on platform:
    • x86_64-linux
    • aarch64-linux
    • x86_64-darwin
    • aarch64-darwin
  • Tested, as applicable:
  • Ran nixpkgs-review on this PR. See nixpkgs-review usage.
  • Tested basic functionality of all binary files, usually in ./result/bin/.
  • Nixpkgs Release Notes
    • Package update: when the change is major or breaking.
  • NixOS Release Notes
    • Module addition: when adding a new NixOS module.
    • Module update: when the change is significant.
  • Fits CONTRIBUTING.md, pkgs/README.md, maintainers/README.md and other READMEs.

Add a 👍 reaction to pull requests you find important.

@danberdev danberdev changed the title Create hp uld package Create new HP driver derivation (hp-uld) Dec 6, 2025
@danberdev danberdev force-pushed the create-hp-uld-package branch from 560f11e to 391f76d Compare December 6, 2025 21:30
@nixpkgs-ci nixpkgs-ci bot added the 12.first-time contribution This PR is the author's first one; please be gentle! label Dec 6, 2025
@danberdev danberdev force-pushed the create-hp-uld-package branch 2 times, most recently from 1e4df94 to 87a7875 Compare December 6, 2025 21:43
@nixpkgs-ci nixpkgs-ci bot added 10.rebuild-linux: 1-10 This PR causes between 1 and 10 packages to rebuild on Linux. 10.rebuild-darwin: 0 This PR does not cause any packages to rebuild on Darwin. 10.rebuild-linux: 1 This PR causes 1 package to rebuild on Linux. 9.needs: reviewer This PR currently has no reviewers requested and needs attention. 8.has: maintainer-list (update) This PR changes `maintainers/maintainer-list.nix` labels Dec 6, 2025
@danberdev danberdev force-pushed the create-hp-uld-package branch 2 times, most recently from e47b870 to e9cb10e Compare December 6, 2025 21:52
@dotlambda dotlambda changed the title Create new HP driver derivation (hp-uld) hp-unified-linux-driver: init at 1.00.39.12_00.15 Dec 7, 2025
Copy link
Contributor

@Yarny0 Yarny0 left a comment

Choose a reason for hiding this comment

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

Wow, this is quite involved! Welcome and thanks for contributing your solution to nixpkgs.

I have some remarks that -- hopefully -- help to improve your package.

Note that I cannot test it (due to lack of hardware) and that all my suggestions should not be be considered blockers, i.e., don't need to be followed for this to be merged (IMHO .. ultimatelly, it's not my call as I'm not a committer).

@nixpkgs-ci nixpkgs-ci bot removed the 9.needs: reviewer This PR currently has no reviewers requested and needs attention. label Dec 7, 2025
@danberdev danberdev force-pushed the create-hp-uld-package branch 2 times, most recently from 3a47985 to 21a0f5c Compare December 7, 2025 11:14
@Yarny0 Yarny0 requested review from RyanGibb and jokogr December 7, 2025 15:52
@danberdev danberdev force-pushed the create-hp-uld-package branch 5 times, most recently from d563cd7 to 62c8afb Compare December 7, 2025 23:58
@danberdev danberdev requested a review from Yarny0 December 10, 2025 15:30
Copy link
Contributor

@Yarny0 Yarny0 left a comment

Choose a reason for hiding this comment

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

Some small things, but in essence, it looks alright from my perspective.

@danberdev danberdev force-pushed the create-hp-uld-package branch from 62c8afb to a50cd94 Compare December 17, 2025 15:01
Add myself as a new maintainer due to introducing a new package.
@danberdev danberdev force-pushed the create-hp-uld-package branch 2 times, most recently from 93d0772 to 7ad0079 Compare December 17, 2025 15:23
@danberdev danberdev requested a review from Yarny0 December 17, 2025 15:28
@danberdev danberdev force-pushed the create-hp-uld-package branch from 7ad0079 to 823a971 Compare December 17, 2025 15:34
Copy link
Contributor

@Yarny0 Yarny0 left a comment

Choose a reason for hiding this comment

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

That looks very beautiful now, especially replaceVars makes the code much more readable -- thank you.

Unfortunatelly, I uncovered another problem -- see inline comment.

@danberdev danberdev force-pushed the create-hp-uld-package branch from 2f3a097 to 7bca908 Compare December 18, 2025 18:03
Copy link
Contributor

@Yarny0 Yarny0 left a comment

Choose a reason for hiding this comment

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

Great! I tested all four ppd files (not with real hardware, but I printed into files). In all four cases, cups produces data without reporting any error. So as far as I can judge, this works! I cannot test the scanner functionality.

Thanks again for your contribution.

For me, this is ready for merging. I will now report this pull request in the "already reviewed" thread in NixOS Discourse, hopefully attracting a committer that pushes the merge button (or that has additional change requests).

@nixos-discourse
Copy link

This pull request has been mentioned on NixOS Discourse. There might be relevant details there:

https://discourse.nixos.org/t/prs-already-reviewed/2617/2700

@nixpkgs-ci nixpkgs-ci bot added the 12.approvals: 1 This PR was reviewed and approved by one person. label Dec 18, 2025
There are some HP printers that are actually Samsung printers in disguise (because HP bought Samsung
printer division). These printers are not supported by HPLIP. To use them, one must obtain a special
driver: hp-uld (unified linux driver), which is a modified samsung driver.

This driver introduces support for
- HP Color Laser 15x Series
- HP Color Laser MFP 17x Series
- HP Laser 10x Series
- HP Laser MFP 13x Series

Where x stands for various model numbers from the lineup.

This derivation does some ugly library patching, because the scanner library needs some hardcoded
paths. In inspiration from similar packages in the collection, the patch was written.

The driver uses libxml2.so.2, which is provided by an older libxml2 version.
@SuperSandro2000 SuperSandro2000 added this pull request to the merge queue Dec 20, 2025
@nixpkgs-ci nixpkgs-ci bot added 12.approvals: 2 This PR was reviewed and approved by two persons. and removed 12.approvals: 1 This PR was reviewed and approved by one person. labels Dec 20, 2025
Merged via the queue into NixOS:master with commit 2e78825 Dec 20, 2025
28 of 31 checks passed
@danberdev danberdev deleted the create-hp-uld-package branch December 20, 2025 04:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

8.has: maintainer-list (update) This PR changes `maintainers/maintainer-list.nix` 10.rebuild-darwin: 0 This PR does not cause any packages to rebuild on Darwin. 10.rebuild-linux: 1-10 This PR causes between 1 and 10 packages to rebuild on Linux. 10.rebuild-linux: 1 This PR causes 1 package to rebuild on Linux. 12.approvals: 2 This PR was reviewed and approved by two persons. 12.first-time contribution This PR is the author's first one; please be gentle!

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants