Commit graph

29 commits

Author SHA1 Message Date
Kajus Naujokaitis
8bed1ba09d
cosmic: sort package attributes into consistent order
Refactored cosmic packages to follow a consistent attribute sorting order

Signed-off-by: Kajus Naujokaitis <kajusn@gmail.com>
2026-07-06 10:28:51 +03:00
R. Ryantm
57a80d1a41 cosmic-protocols: 0-unstable-2026-05-08 -> 0-unstable-2026-06-25 2026-07-01 18:13:47 +00:00
Pratham Patel
d1682d6dad
cosmic-protocols: enable strictDeps 2026-05-11 20:26:22 +05:30
Pratham Patel
62fad2caa7
cosmic-protocols: enable __structuredAttrs 2026-05-11 20:26:19 +05:30
R. Ryantm
4ceb9efbb0 cosmic-protocols: 0-unstable-2026-01-08 -> 0-unstable-2026-05-08 2026-05-10 14:00:45 +00:00
R. Ryantm
bf2f0b7396 cosmic-protocols: 0-unstable-2025-09-26 -> 0-unstable-2026-01-08 2026-01-13 06:23:40 +00:00
R. Ryantm
dc7cba2444 cosmic-protocols: 0-unstable-2025-09-17 -> 0-unstable-2025-09-26 2025-10-05 13:28:59 +00:00
R. Ryantm
8043611d55 cosmic-protocols: 0-unstable-2025-09-01 -> 0-unstable-2025-09-17 2025-09-24 21:02:35 +00:00
R. Ryantm
5d98b7f98f cosmic-protocols: 0-unstable-2025-08-12 -> 0-unstable-2025-09-01 2025-09-03 13:43:17 +02:00
R. Ryantm
e74dccabaa cosmic-protocols: 0-unstable-2025-08-04 -> 0-unstable-2025-08-12 2025-08-14 16:16:00 +02:00
R. Ryantm
2ffc28e15f cosmic-protocols: 0-unstable-2025-06-24 -> 0-unstable-2025-08-04 2025-08-05 10:45:39 +02:00
R. Ryantm
b9d7717e14 cosmic-protocols: 0-unstable-2025-06-19 -> 0-unstable-2025-06-24 2025-06-30 16:32:09 +00:00
R. Ryantm
d818fc4788 cosmic-protocols: 0-unstable-2025-05-02 -> 0-unstable-2025-06-19 2025-06-21 10:19:56 +02:00
R. Ryantm
6e85f6c7cc cosmic-protocols: 0-unstable-2025-04-14 -> 0-unstable-2025-05-02 2025-05-11 19:13:55 +02:00
Fernando Rodrigues
05580f4b44
treewide: switch instances of lib.teams.*.members to the new meta.teams attribute
Follow-up to #394797.

Signed-off-by: Fernando Rodrigues <alpha@sigmasquadron.net>
2025-04-25 22:20:17 -03:00
R. Ryantm
5509a75e2a cosmic-protocols: 0-unstable-2025-03-21 -> 0-unstable-2025-04-14 2025-04-16 09:10:17 +02:00
Heitor Augusto
446b74a552
{nixos/cosmic, cosmic-packages}: adopt by NixOS/cosmic team 2025-04-11 21:09:51 +05:30
Pratham Patel
60852fa717
cosmic-packages: add passthru.tests 2025-04-09 02:29:30 +05:30
R. Ryantm
ea1268feb3 cosmic-protocols: 0-unstable-2025-03-05 -> 0-unstable-2025-03-21 2025-03-26 14:52:28 +00:00
Heitor Augusto
fd847c7641
cosmic-protocols: 0-unstable-2024-07-31 -> 0-unstable-2025-03-05 2025-03-20 15:21:23 -03:00
Heitor Augusto
31f8d91a37
cosmic-protocols: add HeitorAugustoLN as a maintainer 2025-03-20 15:20:25 -03:00
Heitor Augusto
f75841100f
cosmic-protocols: add updateScript 2025-03-20 15:20:08 -03:00
Heitor Augusto
0c302dfb30
cosmic-protocols: refactor 2025-03-20 15:18:40 -03:00
Peder Bergebakken Sundt
357d2530e5 treewide: substitute pname for strings
Inspired by https://github.com/NixOS/nixpkgs/pull/387725#issuecomment-2704943777, script is based on https://github.com/NixOS/nixpkgs/pull/336172 using what i learned in https://github.com/NixOS/nixpkgs/pull/386865, part of https://github.com/NixOS/nixpkgs/issues/346453

Should be zero rebuilds.

All candidates were made using:

```shell

export NIXPKGS_ALLOW_UNFREE=1
export NIXPKGS_ALLOW_INSECURE=1
export NIXPKGS_ALLOW_BROKEN=1

git-wait restore .

test -s packages.json || ( set -x;
  time nix-env --extra-experimental-features no-url-literals --option system x86_64-linux -f ./. -qaP --json --meta --drv-path --out-path --show-trace --no-allow-import-from-derivation --arg config '{ allowAliases = false; }' > packages.json
)

list_attrpath_fname_col() {
    jq <packages.json 'to_entries[] | select(.value.meta.position==null|not) | "\(.key)\t\(.value.meta.position)"' -r |
        sed -e "s#\t$(realpath .)/#\t#" |
        sed -e 's#:\([0-9]*\)$#\t\1#' |
        grep . |
        grep -iv haskell |
        grep -iv /top-level/ |
        grep -iv chicken |
        grep pkgs/by-name/ |
        grep -iv build |
        grep -E '/(package|default)\.nix'
}

FLOCKDIR="$(mktemp -d)"
N_WORKERS=4
while read attrpath fname col; do
    grep -qE 'repo *= *("\$\{pname\}"|pname);' "$fname" || continue

    echo | (
        # mutex on fname
        flock --nonblock 200 || {
            >&2 echo "failed to aquire lock for $fname"
            exit 1
        }

        echo "$attrpath"
        data="$(nix eval --impure  --expr 'with import ./. {}; { inherit ('"$attrpath"') pname drvPath passthru meta; drvPath2='"$attrpath"'.src.drvPath; }' --json)" || exit
        test -n "$data" || exit
        pname="$(jq <<<"$data" .pname -r)"
        test -n "$pname" || exit

        (set -x
            sd -F '${pname}'  "$pname"         "$fname"
            sd -F ' = pname;' " = \"$pname\";" "$fname"
        )

        data2="$(nix eval --impure  --expr 'with import ./. {}; { inherit ('"$attrpath"') pname drvPath passthru meta; drvPath2='"$attrpath"'.src.drvPath; }' --json)"
        if [[ "$data" = "$data2" ]]; then
            (set -x; git-wait add "$fname")
        else
            (set -x; git-wait restore "$fname")
            exit
        fi

        (set -x
            sd -F ' rec {' ' {' "$fname"
        )

        data3="$(nix eval --impure  --expr 'with import ./. {}; { inherit ('"$attrpath"') pname drvPath passthru meta; drvPath2='"$attrpath"'.src.drvPath; }' --json 2>/dev/nul)"

        if [[ "$data" = "$data3" ]]; then
            (set -x; git-wait add "$fname")
        else
            (set -x; git-wait restore "$fname")
        fi

    ) 200>"$FLOCKDIR"/"$(sha256sum - <<<"$fname" | cut -d' ' -f1)".lock &

    while [[ $(jobs -p | wc -l) -ge $N_WORKERS ]]; do
        wait -n < <(jobs -p) || true
    done

done < <(list_attrpath_fname_col)

wait

git restore .

time nix-env --extra-experimental-features no-url-literals --option system x86_64-linux -f ./. -qaP --json --meta --drv-path --out-path --show-trace --no-allow-import-from-derivation --arg config '{ allowAliases = false; }' > packages2.json
```

`diff packages{,2}.json` is empty, indicating that no package nor src derivation has changed.
I checked and cherry-picked the changes using `GIT_DIFF_OPTS='-u15' git -c interactive.singleKey=true add --patch`
2025-03-11 23:55:31 +01:00
Silvan Mosberger
4f0dadbf38 treewide: format all inactive Nix files
After final improvements to the official formatter implementation,
this commit now performs the first treewide reformat of Nix files using it.
This is part of the implementation of RFC 166.

Only "inactive" files are reformatted, meaning only files that
aren't being touched by any PR with activity in the past 2 months.
This is to avoid conflicts for PRs that might soon be merged.
Later we can do a full treewide reformat to get the rest,
which should not cause as many conflicts.

A CI check has already been running for some time to ensure that new and
already-formatted files are formatted, so the files being reformatted here
should also stay formatted.

This commit was automatically created and can be verified using

    nix-build https://github.com/infinisil/treewide-nixpkgs-reformat-script/archive/a08b3a4d199c6124ac5b36a889d9099b4383463f.tar.gz \
      --argstr baseRev b32a094368
    result/bin/apply-formatting $NIXPKGS_PATH
2024-12-10 20:26:33 +01:00
Niko Cantero
55e6535e4e
maintainers: rename nyanbinary to nyabinary 2024-09-19 15:04:36 -04:00
a-kenji
40e3a2d6d4 cosmic-protocols: fix typo in description 2024-08-17 17:03:16 +02:00
a-kenji
ebb172b731 cosmic-protocols: 0-unstable-2024-01-11 -> 0-unstable-2024-07-31 2024-08-17 17:01:57 +02:00
Niko
a42d93aa85 cosmic-protocols: init at 0-unstable-2024-01-11 2024-01-16 14:27:46 -05:00