How to reuse Softwares which supports other Linux distribution in NixOS?

There are many softwares providing Linux versions for Debian & CentOS, but it seems that there is no easy way for NixOS user’s to benifit from these efforts.

It’s possible to make use of autoPatchelfHook to automatically patch binaries to work on NixOS. Use rpmextract to extract RPM packages or dpkg-deb -x to extract Debian packages - examples are available in nixpkgs.

Note that if source code is available it’s often a better idea to package it instead of bothering with packaging packages designed for other distributions.

2 Likes

do you have anything specific in mind?

1 Like

If the software can be built using the regular tools (make, cmake, setup.py, etc), packaging the software is usually just a stdenv.mkDerivation (or language equivalent) away.