Skip to content

Commit

Permalink
Add pikaur (#37)
Browse files Browse the repository at this point in the history
Add pikaur as a backend to the arch group.
  • Loading branch information
keilmillerjr authored Oct 28, 2024
1 parent fd88dbc commit eeffcf4
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 14 deletions.
24 changes: 12 additions & 12 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -58,16 +58,16 @@ but not in your group files (`metapac clean`).
At the moment, supported backends are the following. Pull Requests for
additional backends are welcome!

| Backend | Group Name | Notes |
| --------------------- | ----------- | ------------------------------------- |
| `pacman`/`paru`/`yay` | `[arch]` | see the `arch_package_manager` config |
| `apt` | `[apt]` | |
| `dnf` | `[dnf]` | |
| `flatpak` | `[flatpak]` | |
| `pipx` | `[pipx]` | |
| `cargo` | `[cargo]` | |
| `rustup` | `[rustup]` | |
| `xbps` | `[xbps]` | |
| Backend | Group Name | Notes |
| ------------------------------ | ----------- | ------------------------------------- |
| `pacman`/`paru`/`pikaur`/`yay` | `[arch]` | see the `arch_package_manager` config |
| `apt` | `[apt]` | |
| `dnf` | `[dnf]` | |
| `flatpak` | `[flatpak]` | |
| `pipx` | `[pipx]` | |
| `cargo` | `[cargo]` | |
| `rustup` | `[rustup]` | |
| `xbps` | `[xbps]` | |

## Config

Expand All @@ -80,10 +80,10 @@ additional backends are welcome!
# metapac uses the machine's hostname in the hostname_groups table in
# the config file to get a list of group file names.

# Since pacman, yay and paru all operate on the same package database
# Since pacman, paru, pikaur and yay all operate on the same package database
# they are mutually exclusive and so you must pick which one you want
# metapac to use.
# Must be one of: ["pacman", "paru", "yay"]
# Must be one of: ["pacman", "paru", "pikaur", "yay"]
# Default: "pacman"
arch_package_manager = "paru"

Expand Down
4 changes: 2 additions & 2 deletions config.toml
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,10 @@
# metapac uses the machine's hostname in the hostname_groups table in
# the config file to get a list of group file names.

# Since pacman, yay and paru all operate on the same package database
# Since pacman, paru, pikaur and yay all operate on the same package database
# they are mutually exclusive and so you must pick which one you want
# metapac to use.
# Must be one of: ["pacman", "paru", "yay"]
# Must be one of: ["pacman", "paru", "pikaur", yay"]
# Default: "pacman"
arch_package_manager = "paru"

Expand Down
3 changes: 3 additions & 0 deletions src/config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -58,13 +58,15 @@ pub enum ArchPackageManager {
#[default]
Pacman,
Paru,
Pikaur,
Yay,
}
impl ArchPackageManager {
pub fn as_command(&self) -> &'static str {
match self {
ArchPackageManager::Pacman => "pacman",
ArchPackageManager::Paru => "paru",
ArchPackageManager::Pikaur => "pikaur",
ArchPackageManager::Yay => "yay",
}
}
Expand All @@ -73,6 +75,7 @@ impl ArchPackageManager {
match self {
ArchPackageManager::Pacman => Perms::Sudo,
ArchPackageManager::Paru => Perms::Same,
ArchPackageManager::Pikaur => Perms::Same,
ArchPackageManager::Yay => Perms::Same,
}
}
Expand Down

0 comments on commit eeffcf4

Please sign in to comment.