Live data from Hacker News

Learning Nix by Example: Building FFmpeg 4.0

blog.kiloreux.me

1–10 of 15 posts

Re: Learning Nix by Example: Building FFmpeg 4.0

#2
Way too much work for a personal machine.

I can see where it might be useful in formal environments and have used nix before sparingly. I found quickly that you need to get in the habit of using the same package manager, when after a few months I couldn't remember how to use a nix package or didn't know how to update a package properly (can't remember exactly what the problem was).

Re: Learning Nix by Example: Building FFmpeg 4.0

#4
Minor grievance, but I've never had particularly good luck with search engines and the term "nix". Usually I get things for `*nix` or NixOS. Even if I search for `nix package manager`, I would get things like "Congress nixes package ..." as the top few results.

Re: Learning Nix by Example: Building FFmpeg 4.0

#6
post #2

Way too much work for a personal machine. I can see where it might be useful in formal environments and have used nix before sparingly. I found quickly that you need to get in the habit of using the same package manager, when after a few months I couldn't remember how to use a nix package or didn't know how to update a package properly (can't remember exactly what the problem was).

I can see where it might be useful in formal environments

...except I've yet to see this wrapper used anywhere in the industry in professional capacity.

Re: Learning Nix by Example: Building FFmpeg 4.0

#7
Yeah, exactly the same work as you would need with an OS-supplied package manager to build your own package. For some reason, though, this is considered sexy, while doing the very same thing for RPM or DEB is regarded as boring and troublesome.

Re: Learning Nix by Example: Building FFmpeg 4.0

#8
post #2

Way too much work for a personal machine. I can see where it might be useful in formal environments and have used nix before sparingly. I found quickly that you need to get in the habit of using the same package manager, when after a few months I couldn't remember how to use a nix package or didn't know how to update a package properly (can't remember exactly what the problem was).

I use nix on my personal machines, including ubuntu and macos. It's more convenient than apt and homebrew because I only have to be familiar with one package manager, and one package repository. I can pin to the same version of the repository on all machines, and have identical software.

I'm no longer frustrated by not being able to get the same version of a package between versions of ubuntu, not to mention between macos and ubuntu.

I'm no longer frustrated by a package in a repository being updated, breaking me, and not having a way to roll back.

I'm no longer frustrated by software installs being stateful, getting into a bad state, and having to uninstall and reinstall them. You'd be surprised, several times I've discovered that packages auto-update themselves outside of the package manager by overwriting themselves after downloading assets from the internet.

Re: Learning Nix by Example: Building FFmpeg 4.0

#9
post #7

Yeah, exactly the same work as you would need with an OS-supplied package manager to build your own package. For some reason, though, this is considered sexy, while doing the very same thing for RPM or DEB is regarded as boring and troublesome.

You don't need to write your own expression for ffmpeg.

To install it with apt: `sudo apt-get install ffmpeg`

To install it with nix: `nix-env -i ffmpeg-3.4.2`

Re: Learning Nix by Example: Building FFmpeg 4.0

#10
post #5

This is all well and good, and certainly the more examples the better, but this will only work so long as one is on GNU/Linux and so long as the compile or link stage don't bust. And then, this whole complicated wrapper shatters.

The Nix package manager also runs on macOS. Think of it as a cross platform Homebrew. Your other objections apply to all package managers, and not just Nix.
Post reply on HN