nixpkgs/pkgs/by-name/fo/formatter/fix-paths.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

54 lines
2.6 KiB
Diff

diff --git a/src/Objects/DeviceFormatter.vala b/src/Objects/DeviceFormatter.vala
index cf6a3b8..0de10a9 100644
--- a/src/Objects/DeviceFormatter.vala
+++ b/src/Objects/DeviceFormatter.vala
@@ -62,42 +62,42 @@ namespace Formatter {
string drive_identifier = drive.get_identifier ("unix-device");
switch (filesystem) {
case Formatter.Filesystems.EXT4:
- spawn_args = {"pkexec", "mkfs.ext4", drive_identifier, "-F"};
+ spawn_args = {"pkexec", "@ext4@", drive_identifier, "-F"};
if (label != "") {
spawn_args += "-L";
spawn_args += label;
}
break;
case Formatter.Filesystems.EXFAT:
- spawn_args = {"pkexec", "mkfs.exfat", drive_identifier};
+ spawn_args = {"pkexec", "@exfat@", drive_identifier};
if (label != "") {
spawn_args += "-n";
spawn_args += label;
}
break;
case Formatter.Filesystems.FAT16:
- spawn_args = {"pkexec", "mkfs.fat", "-F16", "-I", drive_identifier};
+ spawn_args = {"pkexec", "@fat@", "-F16", "-I", drive_identifier};
if (label != "") {
spawn_args += "-n";
spawn_args += label;
}
break;
case Formatter.Filesystems.FAT32:
- spawn_args = {"pkexec", "mkfs.fat", "-F32", "-I", drive_identifier};
+ spawn_args = {"pkexec", "@fat@", "-F32", "-I", drive_identifier};
if (label != "") {
spawn_args += "-n";
spawn_args += label;
}
break;
case Formatter.Filesystems.NTFS:
- spawn_args = {"pkexec", "mkfs.ntfs", drive_identifier, "-f", "-F"};
+ spawn_args = {"pkexec", "@ntfs@", drive_identifier, "-f", "-F"};
if (label != "") {
spawn_args += "-L";
spawn_args += label;
}
break;
case Formatter.Filesystems.HFS_PLUS:
- spawn_args = {"pkexec", "mkfs.hfsplus", drive_identifier};
+ spawn_args = {"pkexec", "@hfsplus@", drive_identifier};
if (label != "") {
spawn_args += "-v";
spawn_args += label;