Live data from Hacker News

Using NetBSD’s pkgsrc everywhere I can

rubenerd.com

11–20 of 80 posts

Re: Using NetBSD’s pkgsrc everywhere I can

#11
post #8

Other package management systems do one or two of the following things, but I haven't found any that can do all three at once, other than pkgsrc: 1) have good availability of pre-built binary packages for most platforms 2) facilitate building of packages directly from source, whether on non-mainstream platforms / architectures, and / or with or for the purpose of non-default package options 3) unprivileged builds / i…

nix does all three of these, I think.

It looks interesting. However, documentation is sparse. It doesn't clearly say what platforms are supported other than macOS and NixOS (which implies Linux in general, but doesn't clearly state it). Also, it seems to only target x86 and amd64. No mention is made of any other architecture, nor of any BSD other that macOS.

Do you have more information?

Re: Using NetBSD’s pkgsrc everywhere I can

#12
post #8

Other package management systems do one or two of the following things, but I haven't found any that can do all three at once, other than pkgsrc: 1) have good availability of pre-built binary packages for most platforms 2) facilitate building of packages directly from source, whether on non-mainstream platforms / architectures, and / or with or for the purpose of non-default package options 3) unprivileged builds / i…

nix does all three of these, I think.

How does one bootstrap nixpkgs from source? Trying to install nix gives:

sh install-nix-2.3.10 install-nix-2.3.10: sorry, there is no binary distribution of Nix for your platform

Re: Using NetBSD’s pkgsrc everywhere I can

#13

Earlier quoted context omitted.

nix does all three of these, I think.

It looks interesting. However, documentation is sparse. It doesn't clearly say what platforms are supported other than macOS and NixOS (which implies Linux in general, but doesn't clearly state it). Also, it seems to only target x86 and amd64. No mention is made of any other architecture, nor of any BSD other that macOS. Do you have more information?

From https://nixos.org/manual/nix/stable/#ch-supported-platforms>:

> Nix is currently supported on the following platforms:

> - Linux (i686, x86_64, aarch64).

> - macOS (x86_64).

Re: Using NetBSD’s pkgsrc everywhere I can

#14
post #5

I'd been wondering how good pgksrc is on macOS for a little while, previously having used Homebrew wherever Nixpkgs was inconvenient or incomplete. Could pkgsrc could be a better choice? pkgsrc is relatively nice for a cross-platform, source-based package manager in the old style, in that it provides convenient binary caches for most use cases. I wonder: Has the writer of the post in the OP tried any next-gen source-…

I'm always interested to try different things, but I don't understand why people seem to dislike Homebrew so much. I've been a mostly-happy user on both Mac and Linux for years.

Re: Using NetBSD’s pkgsrc everywhere I can

#15
post #5

I'd been wondering how good pgksrc is on macOS for a little while, previously having used Homebrew wherever Nixpkgs was inconvenient or incomplete. Could pkgsrc could be a better choice? pkgsrc is relatively nice for a cross-platform, source-based package manager in the old style, in that it provides convenient binary caches for most use cases. I wonder: Has the writer of the post in the OP tried any next-gen source-…

I'm always interested to try different things, but I don't understand why people seem to dislike Homebrew so much. I've been a mostly-happy user on both Mac and Linux for years.

I dislike it because it’s really slow to do everything. Even printing help text is slow.

Contrast with pacman on Arch, which is incredibly fast at nearly every operation.

Unfortunately I’ve found all the package managers for macOS to be lacking.

brew is slow, but has packages for most things and generally up to date.

fink packages seem a bit out dated last I checked. At least the ones I cared about.

MacPorts is also slow and somewhat out of date.

pkgsrc doesn’t have Apple M1 binary packages available yet.

I haven’t tried Nix.

Sometimes I’m tempted to try my hand at writing my own package manager for macOS, but getting a critical mass of packaged software seems quite hard.

Re: Using NetBSD’s pkgsrc everywhere I can

#16
post #8

Other package management systems do one or two of the following things, but I haven't found any that can do all three at once, other than pkgsrc: 1) have good availability of pre-built binary packages for most platforms 2) facilitate building of packages directly from source, whether on non-mainstream platforms / architectures, and / or with or for the purpose of non-default package options 3) unprivileged builds / i…

I think Archlinux's PKGBUILDs can do that (https://wiki.archlinux.org/title/Creating_packages#Creating_...):

- With both the community-maintained packages and the AUR packages, you can already find almost any binary that already exists

- If it doesn't exist, or if you need particular options/architectures, a PKGBUILD is basically a glorified Makefile with standard steps, so you can for example get binaries from a http source and use them directly, or pass exotic compilation flags during the build() phase

- It is of course possible to put dependencies inside a given package

- preparing a package is entirely done by your user, no need for root right. Inside the package you put your files in a fake root, and when the package is done you apply the package to your real fs. By default it is installed under /, so of course you need root rights, but you can install it under any root you desire. This is actually what's done when installing Arch: it basically runs pacman (the package manager) but instead of installing packages in the live environment's root, it installs packages in the mounted filesystem that will become your root after rebooting.

Re: Using NetBSD’s pkgsrc everywhere I can

#17
post #5

I'd been wondering how good pgksrc is on macOS for a little while, previously having used Homebrew wherever Nixpkgs was inconvenient or incomplete. Could pkgsrc could be a better choice? pkgsrc is relatively nice for a cross-platform, source-based package manager in the old style, in that it provides convenient binary caches for most use cases. I wonder: Has the writer of the post in the OP tried any next-gen source-…

What are the dependencies of these "next-gen" package managers. pkgsrc itself only needs C and a POSIX-like shell.

Re: Using NetBSD’s pkgsrc everywhere I can

#18
post #5

I'd been wondering how good pgksrc is on macOS for a little while, previously having used Homebrew wherever Nixpkgs was inconvenient or incomplete. Could pkgsrc could be a better choice? pkgsrc is relatively nice for a cross-platform, source-based package manager in the old style, in that it provides convenient binary caches for most use cases. I wonder: Has the writer of the post in the OP tried any next-gen source-…

I'm always interested to try different things, but I don't understand why people seem to dislike Homebrew so much. I've been a mostly-happy user on both Mac and Linux for years.

Built in telemetry/analytics was enough for me to not touch it with a ten foot pole.

Re: Using NetBSD’s pkgsrc everywhere I can

#19
post #16
post #8

Other package management systems do one or two of the following things, but I haven't found any that can do all three at once, other than pkgsrc: 1) have good availability of pre-built binary packages for most platforms 2) facilitate building of packages directly from source, whether on non-mainstream platforms / architectures, and / or with or for the purpose of non-default package options 3) unprivileged builds / i…

I think Archlinux's PKGBUILDs can do that ( https://wiki.archlinux.org/title/Creating_packages#Creating_... ): - With both the community-maintained packages and the AUR packages, you can already find almost any binary that already exists - If it doesn't exist, or if you need particular options/architectures, a PKGBUILD is basically a glorified Makefile with standard steps, so you can for example get binaries from a h…

We are missing unprivileged builds and clean chroot builds for `makepkg`. Our interal devtools uses `systemd-nspawn` which requires root. But that should be easy to implement with the leftover code we tried to use with our reproducible builds tooling.

https://github.com/archlinux/archlinux-repro/pull/70

Maybe a weekend hack to wrap `makepkg` with this.

Post reply on HN