diff options
author | EuAndreh <eu@euandre.org> | 2023-03-29 11:20:56 -0300 |
---|---|---|
committer | EuAndreh <eu@euandre.org> | 2023-03-29 11:20:56 -0300 |
commit | 1de0bbe4fca7448166b2a6ec0863ca9fffbceaf3 (patch) | |
tree | d8aa24c1e8e79dddb1b89b2a01d79f5cac444fc3 /src | |
parent | src/bin/paku.in: Remove "-latest" suffix from HTML ids (diff) | |
download | package-repository-1de0bbe4fca7448166b2a6ec0863ca9fffbceaf3.tar.gz package-repository-1de0bbe4fca7448166b2a6ec0863ca9fffbceaf3.tar.xz |
src/bin/paku.in: Generate build.nix
Diffstat (limited to 'src')
-rwxr-xr-x | src/bin/paku.in | 15 |
1 files changed, 15 insertions, 0 deletions
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, |