diff options
-rw-r--r-- | paku.lock | 2 | ||||
-rwxr-xr-x | src/bin/paku.in | 20 |
2 files changed, 11 insertions, 11 deletions
@@ -27,7 +27,7 @@ "http": "https://euandre.org/git/package-repository/", "tarball": "https://euandre.org/git/package-repository/snapshot/package-repository-main.tar.xz" }, - "packages": [ + "pkgs": [ { "name": "git-permalink", "license": "AGPL-3.0-or-later", diff --git a/src/bin/paku.in b/src/bin/paku.in index 72f901d..f5392bd 100755 --- a/src/bin/paku.in +++ b/src/bin/paku.in @@ -236,7 +236,7 @@ sub emit_nix() { $ns = rec { EOF my $license_mapping = $json->{mappings}{nix}{licenses}; - for my $pkg (@{$json->{packages}}) { + for my $pkg (@{$json->{pkgs}}) { my $long = $pkg->{'long-description'}; $long =~ s/^(.)/ $1/gm; my $license = license_for 'nix', $license_mapping, $pkg->{license}; @@ -323,7 +323,7 @@ sub emit_guix() { my $pkg_mapping = $json->{mappings}{guix}{packages}; my $license_mapping = $json->{mappings}{guix}{licenses}; my @pkgs = (); - for my $pkg (@{$json->{packages}}) { + for my $pkg (@{$json->{pkgs}}) { my $long = $pkg->{'long-description'}; $long =~ s/^(.)/ $1/gm; my $license = license_for 'guix', $license_mapping, $pkg->{license}; @@ -399,7 +399,7 @@ sub emit_debian() { my @debs = (); my @targets = (); - for my $pkg (@{$json->{packages}}) { + for my $pkg (@{$json->{pkgs}}) { push @targets, <<~EOF; \$(DIR)/debian/tarballs/$pkg->{fname}: mkdir -p \$(\@D) @@ -516,7 +516,7 @@ sub emit_debian() { sub emit_alpine() { my $d = $ARGV[0] or die 'Missing "src/alpine/" directory'; my $json = load_json(); - for my $pkg (@{$json->{packages}}) { + for my $pkg (@{$json->{pkgs}}) { my @subpackages = (); if ($pkg->{manpages}) { push @subpackages, "$pkg->{name}-doc"; @@ -576,7 +576,7 @@ sub emit_alpine() { my @apks = (); my @targets = (); - for my $pkg (@{$json->{packages}}) { + for my $pkg (@{$json->{pkgs}}) { next if $pkg->{architectures} ne 'any'; my $date = $pkg->{date} =~ s/-//gr; @@ -640,7 +640,7 @@ sub pascal_case($s) { sub emit_homebrew() { my $d = $ARGV[0] or die 'Missing "Formula/" directory'; my $json = load_json(); - for my $pkg (@{$json->{packages}}) { + for my $pkg (@{$json->{pkgs}}) { my $name = $pkg->{name} . ( $pkg->{label} eq 'latest' ? '' : "-$pkg->{label}" ); @@ -734,7 +734,7 @@ sub emit_html() { <ul> EOF - for my $pkg (@{$json->{packages}}) { + for my $pkg (@{$json->{pkgs}}) { my $guix_suffix = $pkg->{label} eq 'latest' ? '' : '@' . $pkg->{label} =~ s/-/./gr; my $suffix = $pkg->{label} eq 'latest' ? '' : "-$pkg->{label}"; my $apt_suffix = $suffix =~ s/-/=/r; @@ -907,12 +907,12 @@ sub emit_html() { <p> All the packages live under the <code>$overlay_name</code> attribute set, like. - <code>$overlay_name.$json->{packages}[0]->{name}</code>, + <code>$overlay_name.$json->{pkgs}[0]->{name}</code>, so it can be included in the list of packages: </p> <pre><code> environment.systemPackages = with pkgs; [ ... - $overlay_name.$json->{packages}[0]->{name} + $overlay_name.$json->{pkgs}[0]->{name} ];</pre></code> <p> To make the overlay available outside the system @@ -931,7 +931,7 @@ sub emit_html() { Then you'd be able to launch a shell with a package from this overlay: </p> - <pre><code>\$ nix-shell -p $overlay_name.$json->{packages}[0]->{name}</code></pre> + <pre><code>\$ nix-shell -p $overlay_name.$json->{pkgs}[0]->{name}</code></pre> </article> <article id="homebrew-instructions"> <h2>Homebrew instructions</h2> |