New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Remove periods from the end of package descriptions #97835
Conversation
def7408
to
a389064
Compare
doesn't mean much if we can't enforce this rule via ofborg. Also some of these descriptions are generated so we would need to fix those descriptions as well. Not worth the hassle IMO. |
We can put this in ofborg (see #97685), but for now, it would be good to fix up the description of hundreds of packages. |
I'll remove the edits to the autogenerated packages. |
a389064
to
3291261
Compare
@worldofpeace Should I resolve the merge conflicts and have this be merged? The plan is for @GrahamcOfBorg to check this for new PRs in the future. |
Sure, let's try to merge it quickly to avoid any more conflicts. |
I think we're actually considering moving everything into github checks. |
I'm okay with this, scales much better; and don't have to bug graham all the time |
bb4a76b
to
467e6d2
Compare
For future reference, Nix script to fetch paths to derivations whose descriptions end with periodlet
pkgs = import ./../../default.nix {};
safeEval = e: let result = builtins.tryEval e;
in
if result.success
then result.value
else [ ];
packagesWith = cond:
pkgs.lib.concatLists (pkgs.lib.mapAttrsToList
(name: pkg: safeEval
(if pkgs.lib.isDerivation pkg && cond name pkg
then [ (builtins.elemAt (pkgs.lib.splitString ":" pkg.meta.position) 0) ]
else [ ]))
pkgs);
hasDesc = pkg: builtins.hasAttr "description" pkg.meta;
lastChar = x: builtins.substring (builtins.stringLength x - 1) (-1) x;
report = desc: l:
builtins.trace (pkgs.lib.concatStringsSep "\n" l) "";
in
{
periodDesc =
report "have a period at the end of their description"
(packagesWith
(name: pkg:
if hasDesc pkg && builtins.stringLength pkg.meta.description != 0
then lastChar pkg.meta.description == "."
else false));
} The output of the script is fed into an awk file with contents { system("sed --in-place='' -re 's#(description\\s*=\\s*\".+)\\.\"#\\1\"#' " $0)} Finally, I went through the changed files to see which ones had a delta greater than 2, indicating it was probably a package collection (Haskell/Node/Lua packages came up). |
24004b5
to
6e43139
Compare
6e43139
to
c1cbbba
Compare
@jonringer @worldofpeace Should be ready to merge. |
@@ -22,14 +22,14 @@ stdenv.mkDerivation rec { | |||
|
|||
installPhase = '' | |||
mkdir -p $out/bin $out/share/doc/bliss $out/lib $out/include/bliss | |||
mv bliss $out/bin | |||
mv bliss $out/bin |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
oh, the rebuild is due to whitespace, for the check.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Result of nixpkgs-review pr 97835 1
1 package blacklisted:
- tests.nixos-functions.nixos-test
4 packages built:
- bliss
- documentation-highlighter
- polymake
- trilium-desktop
Motivation for this change
Addresses #97685
Things done
Got the list of packages to fix with a Nix script (see #97685), then went over the paths with an
awk
file;sandbox
innix.conf
on non-NixOS linux)nix-shell -p nixpkgs-review --run "nixpkgs-review wip"
./result/bin/
)nix path-info -S
before and after)