Files
nixpkgs/pkgs/by-name/ow/owmods-cli/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

76 lines
1.6 KiB
Nix

{
lib,
stdenv,
nix-update-script,
fetchFromGitHub,
rustPlatform,
pkg-config,
installShellFiles,
zstd,
libsoup_3,
makeWrapper,
mono,
wrapWithMono ? true,
openssl,
}:
rustPlatform.buildRustPackage rec {
pname = "owmods-cli";
version = "0.15.2";
src = fetchFromGitHub {
owner = "ow-mods";
repo = "ow-mod-man";
rev = "cli_v${version}";
hash = "sha256-5ymU9X4J5UPLHxV+7WB29e5Wuq++wYA9bqI2YPjDtWs=";
};
cargoHash = "sha256-Z/muI8JLjOFJBSIMWlvCyFW4JI3lP6/O0AI8Uj8AtBo=";
nativeBuildInputs = [
pkg-config
installShellFiles
]
++ lib.optional wrapWithMono makeWrapper;
buildInputs = [
zstd
libsoup_3
]
++ lib.optionals stdenv.hostPlatform.isLinux [
openssl
];
env = {
ZSTD_SYS_USE_PKG_CONFIG = true;
};
buildAndTestSubdir = "owmods_cli";
postInstall = ''
cargo xtask dist_cli
installManPage dist/cli/man/*
installShellCompletion --cmd owmods \
dist/cli/completions/owmods.{bash,fish,zsh}
''
+ lib.optionalString wrapWithMono ''
wrapProgram $out/bin/${meta.mainProgram} --prefix PATH : '${mono}/bin'
'';
passthru.updateScript = nix-update-script { };
meta = {
description = "CLI version of the mod manager for Outer Wilds Mod Loader";
homepage = "https://github.com/ow-mods/ow-mod-man/tree/main/owmods_cli";
downloadPage = "https://github.com/ow-mods/ow-mod-man/releases/tag/cli_v${version}";
changelog = "https://github.com/ow-mods/ow-mod-man/releases/tag/cli_v${version}";
mainProgram = "owmods";
license = lib.licenses.gpl3Plus;
maintainers = with lib.maintainers; [
bwc9876
spoonbaker
locochoco
];
};
}