ow-mod-man/nix/packages/owmods-cli.nix
Ben C 4a3e1eaa50
[CHORE] Update Deps, Switch to flakelight
- The Nix flake now uses flakelight
- The dev shell uses latest Rust version to be compatible
  with GH actions version
- Ran the newest clippy, fixing all new lints
- Ran a tree-wide nix fmt
2025-07-10 02:21:03 -04:00

69 lines
1.5 KiB
Nix

{
lib,
pkg-config,
openssl,
libsoup,
installShellFiles,
rustPlatform,
makeWrapper,
mono,
wrapWithMono ? true,
}:
rustPlatform.buildRustPackage rec {
pname = "owmods-cli";
version = "0.15.1";
# Prevent unneeded rebuilds
src = with lib.fileset;
toSource {
root = ../.;
fileset = unions [
../.cargo
../owmods_gui
../owmods_cli
../owmods_core
../xtask
../Cargo.toml
../Cargo.lock
];
};
cargoLock = {
lockFile = ../Cargo.lock;
};
doCheck = false;
nativeBuildInputs =
[
pkg-config
installShellFiles
]
++ lib.optional wrapWithMono makeWrapper;
buildInputs = [
openssl
libsoup
];
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'"}
'';
meta = with lib; {
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 = licenses.gpl3;
maintainers = with maintainers; [bwc9876 locochoco];
};
}