Menu

Post image 1
Post image 2
1 / 2
0

How I Packaged a .deb File for NixOS with Flakes

DEV Community·oxcl·26 days ago
#Rubz6lna
#ssec#sec#linux#myapp#fullscreen#nixos
Reading 0:00
15s threshold

I wanted to run Helium browser on NixOS. Helium only publishes .deb packages on GitHub releases. no AUR, no Nix package, nothing. So I packaged it myself. https://github.com/oxcl/nix-flake-helium-browser The same technique works for any app that ships a .deb but has no Nix package. This covers the full process: grabbing the .deb from a GitHub release, unpacking it, patching the binaries so they run on NixOS, putting it all in a flake, and then writing a NixOS module and a Home Manager module on top. Helium is just the example. the pattern applies to any pre-built binary. Why NixOS can't just run a .deb On a normal Linux distro, apt install ./thing.deb copies files into /usr/lib , /usr/bin , etc. The binaries look for shared libraries at those hardcoded paths. NixOS doesn't have /usr/lib . Libraries live under /nix/store/some-hash-name/lib . A binary compiled on Ubuntu will try to load libc.so.6 from a path that simply doesn't exist on NixOS — it crashes before it does anything. The fix is patchelf .…

Continue reading — create a free account

Join HashtagPLUS to read full articles, follow hashtags, vote, and join the conversation.

Read More