this post was submitted on 09 Aug 2023
28 points (100.0% liked)
Linux
48090 readers
745 users here now
From Wikipedia, the free encyclopedia
Linux is a family of open source Unix-like operating systems based on the Linux kernel, an operating system kernel first released on September 17, 1991 by Linus Torvalds. Linux is typically packaged in a Linux distribution (or distro for short).
Distributions include the Linux kernel and supporting system software and libraries, many of which are provided by the GNU Project. Many Linux distributions use the word "Linux" in their name, but the Free Software Foundation uses the name GNU/Linux to emphasize the importance of GNU software, causing some controversy.
Rules
- Posts must be relevant to operating systems running the Linux kernel. GNU/Linux or otherwise.
- No misinformation
- No NSFW content
- No hate speech, bigotry, etc
Related Communities
Community icon by Alpár-Etele Méder, licensed under CC BY 3.0
founded 5 years ago
MODERATORS
you are viewing a single comment's thread
view the rest of the comments
view the rest of the comments
Nix has "flakes", which allow you to share Nix code in a Git repository, it's like repos on steroids. There are many Git projects that offer new packages (such as nix-gaming) or NixOS modules (such as my project nixos-router), or even just Nix code (such as my projects notlua and notnft, which allow you to write Lua code and nftables rules in Nix), or any combination thereof.
Kind of. You first have to understand what Nix derivations are - builders that take certain inputs (such as certain versions of libraries) and produce some outputs.
What happens if the inputs (such as a library version) change? The outputs change as well - previously it was /nix/store/abcdefgh-libfoo/lib/libfoo.so, now it's /nix/store/ijklmnop-libfoo/lib/libfoo.so - the path to libfoo changes, and the binary's RPATH reflects that.
So if you want to package binary software for NixOS, you either have to pin library versions (so the paths don't ever change), or patch the binary.
It depends on what those codecs are.
Let's say they are a binary. In that case, you install them and they get added to your PATH - easy.
Let's say they are some data files. In that case you install it and it gets put into XDG_DATA_DIRS - easy.
Let's say it's a shared library (.so). First question - how is that .so loaded? By which program? From where?
Depending on the answer, what you have to do changes as well. You may have to override some core media library, or ffmpeg, or maybe you can override VLC, or VLC's ffmpeg, but not system ffmpeg. Or, it may be the case that a simple LD_LIBRARY_PATH change will do it for you.
Basically - it depends. That's why NixOS requires a deeper knowledge of Linux, or forces you to learn.