- #Linux
- #Fedora
- #Hyprland
- #Packaging
When I moved my dev box to Fedora, Hyprland was the one thing I wasn't giving up. That turned out to be the hardest part of the move.
Fedora's repos carry old Hyprland libraries, but no compositor you can actually switch to. The COPR that most guides point to was abandoned, and the one the wiki suggests now is a single person's fork that tracks git. I'm not putting a stranger's git HEAD in charge of my login session, so I packaged it myself.
This is the method. It works for any fast-moving project your distro doesn't keep up with.
Rule one: pin a release
I pinned to one upstream Hyprland release tag, and nothing moves until I move it.
Hyprland is a compositor plus a stack of its own libraries: hyprutils, hyprlang, hyprgraphics, hyprcursor, aquamarine and more. The right version of each one is whatever that release's flake.lock points at.
Trap: the library's version tag and the commit in the lock file aren't always the same commit. Several vX.Y.Z tags pointed somewhere else. So I build the commit from the lock and put it in the release field (1.git<commit>). I only use a tag archive when the tag is the lock commit.
Write every version down in one file. Mine is pins.json, and a make check fails if any spec drifts from it. One version list, one place to change it.
Rule two: specs in git, builds in mock
Every package is an RPM spec in a git repo. mock builds them in a clean Fedora chroot, so nothing from my desktop leaks into the build.
The trick that makes a whole stack build in one shot is mock --chain with a local repo:
mock -r fedora-<release>-x86_64 --chain --localrepo "$PWD/out/repo" \
out/srpms/lua5.5-*.src.rpm \
out/srpms/glaze-*.src.rpm \
out/srpms/hyprutils-*.src.rpm \
...
out/srpms/hyprland-*.src.rpmEach package lands in out/repo as it finishes, and the next package in the chain can build against it. The order matters, so it lives in the same pins file.
Trap: use an explicit Release: in your specs. %autorelease reads git history, and mock copies the spec out of git, so it has nothing to read.
Rule three: fill the gaps Fedora leaves
My pin needed two things Fedora didn't have yet:
- Lua 5.5. Fedora ships 5.4. I packaged 5.5 as
lua5.5, so it never replaces/usr/bin/lua, and its pkg-config name is the one Hyprland's CMake looks for. - glaze. Without a package, Hyprland's build downloads it on its own. I'd rather nothing download mid-build. The package installs its CMake config under
%{_libdir}/cmake/glaze, because glaze's default path isn't somewherefind_packagelooks.
The session tools came after the compositor: hyprlock, hypridle, hyprpaper, hyprpicker, hyprsunset, awww and a cursor theme. Anything Fedora already ships well (quickshell, waybar, swaync, rofi, Thunar) stays a Fedora package. Packaging something Fedora maintains just gives you more to keep up with.
Rule four: install from your repo, in one go
Fedora's old hyprutils and my pinned one share a name. Install the whole set from your local repo in one transaction so dnf never mixes the two chains.
Trap: after you add packages to the local repo, run dnf with --refresh. Otherwise it keeps the old metadata and tells you the package doesn't exist.
What I didn't do
- No third-party COPRs.
- No
make installinto/usr/local. Everything on the system is in the package database and comes out cleanly withdnf remove. - No forking the compositor. The source is upstream's release tarball.
- No touching the GPU driver.
- Keep a second desktop installed as a fallback login. If a build ever goes sideways, you log into that and fix it from there.
The NVIDIA suspend bonus round
If you run NVIDIA, this one is worth knowing. The screens came back black after suspend. The open NVIDIA modules need NVreg_PreserveVideoMemoryAllocations=1 to save video memory across a normal suspend, and a temp path to save it to.
The second half of the fix is the part I didn't see coming. With NVreg_UseKernelSuspendNotifiers=1, the save runs from the process going to sleep, and SELinux denies that write to /var/tmp. The driver then cancels the suspend. Setting it to 0 lets nvidia-suspend.service do the save, and that write is allowed.
# /etc/modprobe.d/nvidia-power-management.conf
options nvidia NVreg_PreserveVideoMemoryAllocations=1 NVreg_TemporaryFilePath=/var/tmp NVreg_UseKernelSuspendNotifiers=0Rebuild the initramfs and reboot before you judge it.
Why this beats a COPR
A COPR is someone else's build of someone else's choices. Owning the specs costs you an afternoon per Hyprland release, and in exchange you know every version, every build is reproducible, and you can roll back by pinning the last tag.
If a tool is central to how you work and your distro doesn't keep up with it, pin a release, put the specs in git, and build it yourself.
The rest of the move is in why my dev box runs Fedora now.
- Linux
- Fedora
- Hyprland
- Packaging
