diff options
Diffstat (limited to '')
-rw-r--r-- | Makefile | 3 | ||||
-rwxr-xr-x | src/bin/paku.in | 15 |
2 files changed, 18 insertions, 0 deletions
@@ -67,6 +67,9 @@ result-internet result-internet.sentinel: result-packages.sentinel nix: result.sentinel +build.nix: paku.lock + paku build-nix > $@ + default.nix: paku.lock paku nix > $@ diff --git a/src/bin/paku.in b/src/bin/paku.in index ca43aa6..8dc30c9 100755 --- a/src/bin/paku.in +++ b/src/bin/paku.in @@ -212,6 +212,20 @@ sub emit_release() { exit; } +sub emit_build_nix() { + my $json = load_json(); + my $ns = $json->{namespace}; + $ns =~ s/\./-/g; + print <<~EOF; + { pkgs ? + import <nixpkgs> { overlays = [ (import ./default.nix { inherit pkgs; }) ]; } + }: + + map (name: pkgs.$ns."\${name}") + (builtins.attrNames pkgs.$ns) + EOF +} + sub emit_nix() { my $json = load_json(); my $ns = $json->{namespace}; @@ -944,6 +958,7 @@ sub emit_html() { my %actions = ( 'debian-packages' => \&emit_packages, 'debian-release' => \&emit_release, + 'build-nix' => \&emit_build_nix, nix => \&emit_nix, guix => \&emit_guix, 'guix-channel-key' => \&emit_guix_channel_key, |