Files
nixpkgs/pkgs/by-name/ya/yay/package.nix
Dark Steveneq 646b892680
Some checks failed
Periodic Merges (6h) / master → staging-nixos (push) Failing after 12m50s
Periodic Merges (6h) / master → staging-next (push) Failing after 12m54s
Periodic Merges (24h) / merge-base(master,staging) → haskell-updates (push) Failing after 11m54s
Periodic Merges (6h) / staging-next → staging (push) Failing after 12m13s
Periodic Merges (24h) / staging-next-25.05 → staging-25.05 (push) Failing after 13m24s
Periodic Merges (24h) / release-25.05 → staging-next-25.05 (push) Failing after 14m28s
push sheeet
2025-10-09 14:15:47 +02:00

73 lines
1.8 KiB
Nix

{
lib,
stdenv,
buildGoModule,
fetchFromGitHub,
pacman,
libarchive,
installShellFiles,
}:
buildGoModule (finalAttrs: {
pname = "yay";
version = "12.5.0";
src = fetchFromGitHub {
owner = "Jguer";
repo = "yay";
tag = "v${finalAttrs.version}";
hash = "sha256-qcNjEy8W+6hjTqzkYk8MqHN8owrSONZPB4sXSOstGSE=";
};
vendorHash = "sha256-8auZMcfaC0nI0vj1VRz8g/4ijFd57oALYaszGUb0K9A=";
nativeBuildInputs = [ installShellFiles ];
buildInputs = [
pacman
libarchive
];
env.CGO_ENABLED = 1;
checkFlags =
let
skippedTests = [
# need fhs
"TestAlpmExecutor"
"TestBuildRuntime"
"TestPacmanConf"
# need su/sudo/doas
"TestNewConfig"
"TestNewConfigAURDEST"
"TestNewConfigAURDESTTildeExpansion"
"TestConfiguration_setPrivilegeElevator"
"TestConfiguration_setPrivilegeElevator_su"
"TestConfiguration_setPrivilegeElevator_no_path"
"TestConfiguration_setPrivilegeElevator_doas"
"TestConfiguration_setPrivilegeElevator_pacman_auth_doas"
"TestConfiguration_setPrivilegeElevator_custom_script"
"TestConfiguration_setPrivilegeElevator_pacman_auth_sudo"
];
in
[ "-skip=^${builtins.concatStringsSep "$|^" skippedTests}$" ];
postInstall = ''
installManPage doc/yay.8
''
+ lib.optionalString (stdenv.buildPlatform.canExecute stdenv.hostPlatform) ''
installShellCompletion --name yay.bash --bash completions/bash
installShellCompletion --name yay.fish --fish completions/fish
installShellCompletion --name _yay --zsh completions/zsh
'';
meta = {
description = "AUR Helper written in Go";
homepage = "https://github.com/Jguer/yay";
mainProgram = "yay";
platforms = lib.platforms.linux;
license = with lib.licenses; [ gpl3Plus ];
maintainers = [ ];
};
})