depot/third_party/nixpkgs/pkgs/applications/misc/owmods-cli/default.nix
Default email 5e7c2d6cef Project import generated by Copybara.
GitOrigin-RevId: f99e5f03cc0aa231ab5950a15ed02afec45ed51a
2023-10-09 21:29:22 +02:00

65 lines
1.4 KiB
Nix

{ lib
, stdenv
, fetchFromGitHub
, rustPlatform
, pkg-config
, installShellFiles
, zstd
, openssl
, Security
}:
rustPlatform.buildRustPackage rec {
pname = "owmods-cli";
version = "0.11.2";
src = fetchFromGitHub {
owner = "ow-mods";
repo = "ow-mod-man";
rev = "cli_v${version}";
hash = "sha256-kjHGuVYX9pKy2I+m347cEdPj6MjCDz8vz2Cnce9+z90=";
};
cargoLock = {
lockFile = ./Cargo.lock;
outputHashes = {
"tauri-plugin-window-state-0.1.0" = "sha256-M6uGcf4UWAU+494wAK/r2ta1c3IZ07iaURLwJJR9F3U=";
};
};
nativeBuildInputs = [
pkg-config
installShellFiles
];
buildInputs = [
zstd
] ++ lib.optionals stdenv.isLinux [
openssl
] ++ lib.optionals stdenv.isDarwin [
Security
];
env = {
ZSTD_SYS_USE_PKG_CONFIG = true;
};
buildAndTestSubdir = "owmods_cli";
postInstall = ''
cargo xtask dist_cli
installManPage man/man*/*
installShellCompletion --cmd owmods \
dist/cli/completions/owmods.{bash,fish,zsh}
'';
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.gpl3Plus;
maintainers = with maintainers; [ locochoco ];
};
}