!tPxtoBdChSsxHuBlNW:nixos.org

NixOS Marketing

257 Members
NixOS website + marketing team: https://nixos.org/community/teams/marketing.html56 Servers

You have reached the beginning of time (for this room).


SenderMessageTime
21 Apr 2024
@avocadoom:avocadoom.deavocadoomAwesome, I'll take a look at that later on 👍17:05:59
23 Apr 2024
@sigmanificient:matrix.orgSigmanificientRedacted or Malformed Event15:48:16
@sigmanificient:matrix.orgSigmanificient
In reply to @sigmanificient:matrix.org

Hello again, last time we bumped the packages count to a round 100k, but this might happen again in the future and the original issue is about the value being hard-coded.

Any plan to integrate a script to automatically bump package count on both search.nixos.org & nixpkgs? I proposed a simple script on the issue, which can surely be improved.

I don't know anything about elm, and I am unsure on what to exactly do to help, so your help would be appreciated to sort this out!

I managed to simplify my script a lot by using the auto redirect link, now it outputs a json of both package and options count.

#!/usr/bin/env nix-shell
#!nix-shell -i bash -p curl jq brotli

function parse_unstable_json() {
    local url="https://channels.nixos.org/nixos-unstable/$1.json.br"
    echo $(                \
      curl -L "$url"       \
      | brotli -d --stdout \
      | jq "$2")
}

pkg_count=$(parse_unstable_json "packages" ".packages | length")
opt_count=$(parse_unstable_json "options" "length")

echo "{ 'packages': $pkg_count, 'options': $opt_count }" | tr "'" '"'

which gives { "packages": 111413, "options": 18524 }

15:49:00
@sigmanificient:matrix.orgSigmanificient
In reply to @sigmanificient:matrix.org

Hello again, last time we bumped the packages count to a round 100k, but this might happen again in the future and the original issue is about the value being hard-coded.

Any plan to integrate a script to automatically bump package count on both search.nixos.org & nixpkgs? I proposed a simple script on the issue, which can surely be improved.

I don't know anything about elm, and I am unsure on what to exactly do to help, so your help would be appreciated to sort this out!

*

I managed to simplify my script a lot by using the auto redirect link, now it outputs a json of both package and options count.

#!/usr/bin/env nix-shell
#!nix-shell -i bash -p curl jq brotli

function parse_unstable_json() {
    local url="https://channels.nixos.org/nixos-unstable/$1.json.br"
    echo $(curl -L "$url" | brotli -d --stdout | jq "$2")
}

pkg_count=$(parse_unstable_json "packages" ".packages | length")
opt_count=$(parse_unstable_json "options" "length")

echo "{ 'packages': $pkg_count, 'options': $opt_count }" | tr "'" '"'

which gives { "packages": 111413, "options": 18524 }

15:49:33
@sigmanificient:matrix.orgSigmanificient *

I managed to simplify my script a lot by using the auto redirect link, now it outputs a json of both package and options count.

#!/usr/bin/env nix-shell
#!nix-shell -i bash -p curl jq brotli

function parse_unstable_json() {
    local url="https://channels.nixos.org/nixos-unstable/$1.json.br"
    echo $(curl -L "$url" | brotli -d --stdout | jq "$2")
}

pkg_count=$(parse_unstable_json "packages" ".packages | length")
opt_count=$(parse_unstable_json "options" "length")

echo "{ 'packages': $pkg_count, 'options': $opt_count }" | tr "'" '"'

which gives the following stats: { "packages": 111413, "options": 18524 } 👀

15:49:58

Show newer messages


Back to Room ListRoom Version: 6