Table of contents
🛠 Building
Prerequisites
- Nix with flakes enabled
(
experimental-features = nix-command flakesinnix.conf, or pass--extra-experimental-features 'nix-command flakes'on each invocation). - Optional: direnv for automatic
devShellactivation. - That's it. Every package builds on any of Nix's four default systems — Linux and macOS, x86_64 and ARM — verified directly, not just assumed; see Architecture § Cross-platform builds. Only CI specifically runs on Linux, for reasons that have nothing to do with what the packages themselves need.
Build
nix develop # or: direnv allow
nix build .#hp-upd-pcl6 # a single driver series
nix build .#all # every vendor/series, aggregated
Each package's output directory contains one <name>.intunewin file, ready
to upload to Intune — see Deploying.
Repository layout
flake.nix devShell + one package per vendor/series
lib/mkIntunePackage.nix reusable builder: driver + scripts -> .intunewin
nix/intunewin-packer.nix wraps tools/mkintunewin.py as the `mkintunewin` CLI
tools/mkintunewin.py .intunewin format implementation
vendors/<vendor>/<series>/ one folder per driver package (see docs/adding-a-printer.md)
.forgejo/workflows/build.yml CI: build all packages, publish releases on tags
.forgejo/workflows/wiki.yml CI: mirror README + docs/ to this wiki
Pinning a driver to a real hash
Vendor default.nix files fetch the driver archive with pkgs.fetchzip and
pin its content by SRI hash — no fakeHash in committed code. To add or
update a pin:
nix develop
nix-prefetch-url --unpack <driver-url>
# convert the returned hash to SRI form:
nix hash convert --hash-algo sha256 --to sri <hash>
Put the resulting sha256-... value in the vendor's default.nix.
CI
.forgejo/workflows/build.yml runs on a self-hosted Forgejo runner (Linux,
Docker-in-Docker, Nix-only container image), builds every package with
nix build .#all on every push and PR, and on v* tags creates a release:
a changelog generated from the commits since the previous tag, with every
.intunewin attached as a download. See
Architecture § Format validation and fallback
— the packer's own format is confirmed against a real Intune upload, but
still validate every new vendor package once before relying on it.
.forgejo/workflows/wiki.yml mirrors this README and everything under
docs/ to this wiki whenever they change on main. Edit the files in the
repo, not here — this page gets overwritten on the next sync.