Commit Graph

36 Commits

Author SHA1 Message Date
quantenzitrone
9380e05c3c various: switch buildGoModule packages to use finalAttrs
this shouldn't create any rebuilds

the following script was used to generate this:
```fish
#!/usr/bin/env fish

# nix shell .#nixfmt nixpkgs#{nixf-diagnose,ripgrep,sd}

set base (git rev-parse HEAD)

set scope pkgs/by-name
set builder buildGoModule

set files (rg --files-with-matches -F "$builder rec {" $scope | sort -u)

for file in $files
    echo $file
    sd -F "$builder rec {" "$builder (finalAttrs: {" $file
    # version
    sd -F 'version}' 'finalAttrs.version}' $file
    sd -F '${version' '${finalAttrs.version' $file
    sd -F '= version' '= finalAttrs.version' $file
    sd -F 'inherit version;' 'inherit (finalAttrs) version;' $file
    sd -F ' + version;' ' + finalAttrs.version;' $file
    sd 'replaceStrings (.*) version' 'replaceStrings $1 finalAttrs.version' $file
    sd -F 'splitVersion version' 'splitVersion finalAttrs.version' $file
    sd -F 'versionAtLeast version' 'versionAtLeast finalAttrs.version' $file
    sd 'versions\.([a-z]+) version' 'versions.$1 finalAttrs.version' $file
    # src
    sd -F 'src}' 'finalAttrs.src}' $file
    sd -F '${src' '${finalAttrs.src' $file
    sd -F '= src' '= finalAttrs.src' $file
    sd -F 'inherit src;' 'inherit (finalAttrs) src;' $file
    sd -F 'inherit (src' 'inherit (finalAttrs.src' $file
    # meta
    sd -F '${meta' '${finalAttrs.meta' $file
    sd -F '= meta' '= finalAttrs.meta' $file
    sd -F 'inherit (meta' 'inherit (finalAttrs.meta' $file
    # other
    sd -F 'inherit version src;' 'inherit (finalAttrs) version src;' $file
    sd -F 'inherit src version;' 'inherit (finalAttrs) src version;' $file
    sd -F 'makeLibraryPath buildInputs' 'makeLibraryPath finalAttrs.buildInputs' $file
    sd -F 'buildInputs}' 'finalAttrs.buildInputs}' $file
    sd -F 'desktopItem}' 'finalAttrs.desktopItem}' $file
    sd -F 'runtimeLibs}' 'finalAttrs.runtimeLibs}' $file
    sd -F 'libPath}' 'finalAttrs.libPath}' $file
    sd -F 'runtimeDependencies}' 'finalAttrs.runtimeDependencies}' $file
    sd -F 'nativeRuntimeInputs}' 'finalAttrs.nativeRuntimeInputs}' $file
    sd -F '(!doCheck)' '(!finalAttrs.doCheck)' $file
    sd -F 'optional doCheck' 'optional finalAttrs.doCheck' $file
    sd -F 'optionals doCheck' 'optionals finalAttrs.doCheck' $file
    sd -F '++ runtimeDependencies' '++ finalAttrs.runtimeDependencies' $file
    # pname (restored afterwards)
    sd -F 'pname}' 'finalAttrs.pname}' $file
    sd -F '${pname' '${finalAttrs.pname' $file
    sd -F '= pname' '= finalAttrs.pname' $file
    # close finalAttrs lambda
    echo ')' >>$file
    # catch some errors early
    if ! nixfmt $file
        git restore $file
        continue
    end
    if ! nixf-diagnose -i sema-primop-overridden $file
        git restore $file
        continue
    end
end

set torestore (rg -F .finalAttrs --files-with-matches $scope)
if test (count $torestore) -gt 0
    git restore $torestore
end
set torestore (rg -F finalAttrs.pname --files-with-matches $scope)
if test (count $torestore) -gt 0
    git restore $torestore
end

# commit for faster eval times
git add pkgs
git commit --no-gpg-sign -m temp
set torestore

for file in $files
    # file hasn't changed
    if git diff --quiet $base $file
        continue
    end
    # try to eval the package to definitely catch all errors
    echo $file
    set pname (string split / $file -f 4)
    if ! nix eval .#$pname
        set torestore $torestore $file
    end
end

# restore files that don't eval
git reset --soft $base
git restore --staged .
if test (count $torestore) -gt 0
    git restore $torestore
end
```

after that some manual cleanup was done:
- restoring files that cause changes in the number of lines
- restoring files that cause rebuilds
- restoring files that cause merge conflicts with staging
2026-02-07 09:28:59 +01:00
Ihar Hrachyshka
567e8dfd8e treewide: clean up 'meta = with' pattern
This commit was created by a combination of scripts and tools:
- an ast-grep script to prefix things in meta with `lib.`,
- a modified nixf-diagnose / nixf combination to remove unused `with
lib;`, and
- regular nixfmt.

Co-authored-by: Wolfgang Walther <walther@technowledgy.de>
2025-12-10 18:09:49 +01:00
R. Ryantm
1ae9e92687 flarectl: 0.115.0 -> 0.116.0 2025-09-06 04:52:52 +00:00
Winter
a19cd4ffb1 Revert "treewide: replace rev with tag"
This reverts commit 65a333600d.

This wasn't tested for correctness with something like fodwatch [0],
and should not have been (self-)merged so quickly, especially without
further review.

It also resulted in the breakage of at least one package [1] (and that's
the one we know of and was caught).

A few packages that were updated in between this commit and this revert
were not reverted back to using `rev`, but other than that, this is a
1:1 revert.

[0]: https://codeberg.org/raphaelr/fodwatch
[1]: https://github.com/NixOS/nixpkgs/pull/396904 / 758551e458
2025-04-08 02:57:25 -04:00
Pol Dellaiera
65a333600d treewide: replace rev with tag 2025-04-07 16:57:22 +02:00
R. Ryantm
4cb1615d3d flarectl: 0.114.0 -> 0.115.0 2025-02-07 07:47:15 +00:00
R. Ryantm
787497b843 flarectl: 0.113.0 -> 0.114.0 2025-01-26 15:34:52 +00:00
R. Ryantm
e0645516b2 flarectl: 0.112.0 -> 0.113.0 2025-01-02 01:52:57 +00:00
R. Ryantm
9e67e8aeee flarectl: 0.111.0 -> 0.112.0 2024-12-18 13:13:54 +00: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 a08b3a4d19.tar.gz \
      --argstr baseRev b32a094368
    result/bin/apply-formatting $NIXPKGS_PATH
2024-12-10 20:26:33 +01:00
R. Ryantm
d5f8109306 flarectl: 0.108.0 -> 0.111.0 2024-12-07 04:40:33 +00:00
R. Ryantm
145fd69e94 flarectl: 0.105.0 -> 0.108.0 2024-10-26 08:20:13 +00:00
R. Ryantm
7d89dcaeb2 flarectl: 0.104.0 -> 0.105.0 2024-10-01 19:04:33 +00:00
R. Ryantm
8565e8cd24 flarectl: 0.103.0 -> 0.104.0 2024-09-13 22:42:51 +00:00
R. Ryantm
025feb1a9b flarectl: 0.102.0 -> 0.103.0 2024-08-28 13:25:35 +00:00
R. Ryantm
809cb167dc flarectl: 0.101.0 -> 0.102.0 2024-08-14 20:31:29 +00:00
R. Ryantm
02ef1997d9 flarectl: 0.99.0 -> 0.101.0 2024-08-07 19:14:19 +00:00
R. Ryantm
7cf9cbd92d flarectl: 0.98.0 -> 0.99.0 2024-07-04 04:27:24 +00:00
R. Ryantm
2673432cb8 flarectl: 0.97.0 -> 0.98.0 2024-06-25 11:40:00 +00:00
R. Ryantm
386d30ce0b flarectl: 0.96.0 -> 0.97.0 2024-06-05 14:00:27 +00:00
R. Ryantm
ea7f0ec834 flarectl: 0.95.0 -> 0.96.0 2024-05-28 19:36:46 +00:00
R. Ryantm
a1e9afa59b flarectl: 0.94.0 -> 0.95.0 2024-05-11 23:15:28 +00:00
R. Ryantm
7e2b84c4f9 flarectl: 0.93.0 -> 0.94.0 2024-05-04 07:20:15 +00:00
R. Ryantm
db6607c336 flarectl: 0.92.0 -> 0.93.0 2024-04-10 12:56:36 +00:00
R. Ryantm
e86bae7be2 flarectl: 0.91.0 -> 0.92.0 2024-03-28 06:48:44 +00:00
R. Ryantm
987cdf40ee flarectl: 0.90.0 -> 0.91.0 2024-03-22 00:58:23 +00:00
R. Ryantm
ac1a8bbb14 flarectl: 0.89.0 -> 0.90.0 2024-03-13 01:08:07 +00:00
R. Ryantm
ca8c5621e2 flarectl: 0.88.0 -> 0.89.0 2024-02-28 01:46:54 +00:00
R. Ryantm
6e9b54646b flarectl: 0.87.0 -> 0.88.0 2024-02-14 05:05:17 +00:00
R. Ryantm
4490d707c1 flarectl: 0.86.0 -> 0.87.0 2024-01-31 05:54:11 +00:00
R. Ryantm
947bab5f71 flarectl: 0.85.0 -> 0.86.0 2024-01-18 11:25:49 +00:00
R. Ryantm
2c60b86fbd flarectl: 0.84.0 -> 0.85.0 2024-01-03 07:04:21 +00:00
R. Ryantm
9b3a560a8a flarectl: 0.83.0 -> 0.84.0 2023-12-26 03:52:25 +00:00
R. Ryantm
1d0612e3c7 flarectl: 0.82.0 -> 0.83.0 2023-12-15 00:53:11 +00:00
R. Ryantm
bc485619fa flarectl: 0.80.0 -> 0.82.0 2023-12-02 12:43:00 +00:00
Jared Baur
673be3eed6 flarectl: init at 0.80.0
Flarectl is a CLI application for interacting with a Cloudflare account.
2023-10-29 03:50:25 +00:00