From 7adaf453d4792473433bc6f2cbae37e108dc7d22 Mon Sep 17 00:00:00 2001 From: EuAndreh Date: Wed, 22 Mar 2023 18:15:58 -0300 Subject: src/bin/paku: Explain how to have a file as overlay for Nix --- src/bin/paku | 26 +++++++++++++++++++++++++- 1 file changed, 25 insertions(+), 1 deletion(-) (limited to 'src') diff --git a/src/bin/paku b/src/bin/paku index 2cbca20..fcaf1ea 100755 --- a/src/bin/paku +++ b/src/bin/paku @@ -664,8 +664,32 @@ sub emit_html() { };

All the packages live under the - $overlay_name attribute set. + $overlay_name attribute set, like. + $overlay_name.$json->{packages}[0]->{name}, + so it can be included in the list of packages:

+
  environment.systemPackages = with pkgs; [
+		    ...
+		    $overlay_name.$json->{packages}[0]->{name}
+		  ];
+

+ To make the overlay available outside the system + environment of + /etc/nixos/configuration.nix, you need to + add this overlay to your + ~/.config/nixpkgs/overlays/ directory, + like a + ~/.config/nixpkgs/overlays/$json->{namespace}.nix + file containing: +

+
import (fetchTarball {
+		  url = "$json->{vcs}->{tarball}";
+		}) { pkgs = import <nixpkgs> {}; }
+

+ Then you'd be able to launch a shell with a package + from this overlay: +

+
\$ nix-shell -p $overlay_name.$json->{packages}[0]->{name}

Homebrew instructions

-- cgit v1.2.3