nixpkgs/pkgs/by-name/ab/abuse/abuse.sh
aleksana 571c71e6f7 treewide: migrate packages to pkgs/by-name, take 1
We are migrating packages that meet below requirements:

1. using `callPackage`
2. called path is a directory
3. overriding set is empty (`{ }`)
4. not containing path expressions other than relative path (to
makenixpkgs-vet happy)
5. not referenced by nix files outside of the directory, other
than`pkgs/top-level/all-packages.nix`
6. not referencing nix files outside of the directory
7. not referencing `default.nix` (since it's changed to `package.nix`)
8. `outPath` doesn't change after migration

The tool is here: https://github.com/Aleksanaa/by-name-migrate.
2024-11-09 20:04:51 +08:00

19 lines
772 B
Bash

#! @shell@
if grep datadir ~/.abuse/abuserc &>/dev/null; then
if [ ! -d "$(grep datadir ~/.abuse/abuserc | cut -d= -f2)" ]; then
echo "Warning: ~/.abuse/abuserc references a datadir which is not existent." >&2
echo "Try removing ~/.abuse/abuserc, else abuse will most likely not run." >&2
echo >&2
# This can happen if the build hash of abuse changes and the older version
# is garbage-collected. The correct path of the datadir is compiled into
# the binary, but unfortunately abuse writes out the path into abuserc on
# first start. This entry may later become stale.
fi
fi
# The timidity bundled into SDL_mixer looks in . and in several global places
# like /etc for its configuration file.
cd @out@/etc
exec @out@/bin/.abuse-bin "$@"