4 ms·
For what it's worth, the Nix definition for autotools-using programs can basically be: { pkgs ? import <nixpkgs> {} }: pkgs.stdenv.mkDerivation {
by Nullabillity 5y ago
For what it's worth, the Nix definition for autotools-using programs can basically be:
{ pkgs ? import <nixpkgs> {} }:
pkgs.stdenv.mkDerivation {
name = "foo-1.0";
src = ./.;
buildInputs = [ pkgs.libfoo pkgs.libbar ];
}
You could make a CLI that does the templating for you, but there's nothing fundamental here that would require a fork of Nix (or Nixpkgs/NixOS) itself.
- spindle 5y agoI agree ... and I think we urgently need that CLI.
- pxc 5y agoPackaging most things for Nixpkgs is super easy, which is awesome. But I think impurity could be a different kind of on-ramp. See things like envfs or the reverted PR for the LSB module in NixOS.
- Nullabillity 5y agoEnvfs looks interesting, but I don't think compromising on Nix(OS)'s core to be more familiar is a sustainable approach, and the unreliability of the produced frankenbuilds seem more like something that'd scare newcomers away once things start breaking. I'd rather look into how to make the Nix-native workflow be as appealing and welcoming as the impure one, than compromise and end up with a system ultimately just that has the downsides of both.
- pxc 5y ago> I don't think compromising on Nix(OS)'s core to be more familiar is a sustainable approach That's why I say this would be a downstream distro, because then > and the unreliability of the produced frankenbuilds [can] scare newcomers away to NixOS proper, which can remain pure, principled, and a little difficult. :) The idea is a workstation/desktop-centric downstream where people can * use NixOS modules to configure the base system (which is super convenient) * learn the Nix language ‘by immersion’ and tooling without *immediately* having to choose between packaging and giving up any proprietary/oddball software they might already be using that isn't already in Nixpkgs * try Nix in its most attractive form (fully declarative OOTB and in control of a full operating system, unlike Nix on macOS or foreign Linux distros) * start out with all of the commonsense community goodies (flakes, flake-utils-plus, Home-Manager, NUR, and extra binary caches enabled when relevant) pre-enabled and configured in the simplest possible way * comes with a reset button (like a slightly gentler NIXOS_LUSTRATE) that users can easily use to remove any impurely installed software While many users have had success diving into NixOS head-first, many others have reported that they found it easier and more productive to first learn the Nix language and Nix tools on macOS. Those users report that they have an easier time because it allows them to learn more gradually or in smaller chunks according to the availability of their free time, with the macOS base system and impure tooling built on top of it providing an escape hatch for when they get stuck or frustrated, or want to quickly try something that's not packaged in Nixpkgs. There's no reason that Nix itself couldn't be used to create the same kind of stable, impurely accessible, compatible (with traditional tools), kind of base system. I think it'll happen some time in the next few years. There's much wider interest in NixOS than their used to be, and with that has come increased interest in making it even more accessible to new users.