571c71e6f7
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.
12 lines
462 B
Bash
12 lines
462 B
Bash
unpackCmdHooks+=(_tryUnzip)
|
|
_tryUnzip() {
|
|
if ! [[ "$curSrc" =~ \.zip$ ]]; then return 1; fi
|
|
|
|
# UTF-8 locale is needed for unzip on glibc to handle UTF-8 symbols:
|
|
# https://github.com/NixOS/nixpkgs/issues/176225#issuecomment-1146617263
|
|
# Otherwise unzip unpacks escaped file names as if '-U' options was in effect.
|
|
#
|
|
# Pick en_US.UTF-8 as most possible to be present on glibc, musl and darwin.
|
|
LANG=en_US.UTF-8 unzip -qq "$curSrc"
|
|
}
|