nixpkgs/pkgs/by-name/wo/wofi/do_not_follow_symlinks.patch
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

40 lines
761 B
Diff

diff -r 3414ab984249 modes/run.c
--- a/modes/run.c Tue Aug 11 19:07:49 2020 -0700
+++ b/modes/run.c Sat Aug 22 13:39:52 2020 +0200
@@ -91,23 +91,10 @@
char* path = strdup(getenv("PATH"));
- struct map* paths = map_init();
-
char* save_ptr;
char* str = strtok_r(path, ":", &save_ptr);
do {
- str = realpath(str, NULL);
- if(str == NULL) {
- continue;
- }
- if(map_contains(paths, str)) {
- free(str);
- continue;
- }
-
- map_put(paths, str, "true");
-
DIR* dir = opendir(str);
if(dir == NULL) {
continue;
@@ -132,11 +119,9 @@
}
free(full_path);
}
- free(str);
closedir(dir);
} while((str = strtok_r(NULL, ":", &save_ptr)) != NULL);
free(path);
- map_free(paths);
map_free(cached);
map_free(entries);
}