zoxide: 0.9.6 -> 0.9.7 (#380745)
[NixPkgs.git] / pkgs / by-name / ow / owmods-cli / package.nix
blob75e98dd7d0e910bc4287745d88c1f501139e190d
2   lib,
3   stdenv,
4   nix-update-script,
5   fetchFromGitHub,
6   rustPlatform,
7   pkg-config,
8   installShellFiles,
9   zstd,
10   libsoup_3,
11   makeWrapper,
12   mono,
13   wrapWithMono ? true,
14   openssl,
15   darwin,
18 rustPlatform.buildRustPackage rec {
19   pname = "owmods-cli";
20   version = "0.15.1";
22   src = fetchFromGitHub {
23     owner = "ow-mods";
24     repo = "ow-mod-man";
25     rev = "cli_v${version}";
26     hash = "sha256-NIg8heytWUshpoUbaH+RFIvwPBQGXL6yaGKvUuGnxg8=";
27   };
29   useFetchCargoVendor = true;
30   cargoHash = "sha256-kLuiNfrxc3Z8UeDQ2Mb6N78TST6c2f4N7mt4X0zv1Zk=";
32   nativeBuildInputs = [
33     pkg-config
34     installShellFiles
35   ] ++ lib.optional wrapWithMono makeWrapper;
37   buildInputs =
38     [
39       zstd
40       libsoup_3
41     ]
42     ++ lib.optionals stdenv.hostPlatform.isLinux [
43       openssl
44     ]
45     ++ lib.optionals stdenv.hostPlatform.isDarwin [
46       darwin.apple_sdk.frameworks.Security
47       darwin.apple_sdk.frameworks.SystemConfiguration
48     ];
50   env = {
51     ZSTD_SYS_USE_PKG_CONFIG = true;
52   };
54   buildAndTestSubdir = "owmods_cli";
56   postInstall =
57     ''
58       cargo xtask dist_cli
59       installManPage dist/cli/man/*
60       installShellCompletion --cmd owmods \
61       dist/cli/completions/owmods.{bash,fish,zsh}
62     ''
63     + lib.optionalString wrapWithMono ''
64       wrapProgram $out/bin/${meta.mainProgram} --prefix PATH : '${mono}/bin'
65     '';
67   passthru.updateScript = nix-update-script { };
69   meta = with lib; {
70     description = "CLI version of the mod manager for Outer Wilds Mod Loader";
71     homepage = "https://github.com/ow-mods/ow-mod-man/tree/main/owmods_cli";
72     downloadPage = "https://github.com/ow-mods/ow-mod-man/releases/tag/cli_v${version}";
73     changelog = "https://github.com/ow-mods/ow-mod-man/releases/tag/cli_v${version}";
74     mainProgram = "owmods";
75     license = licenses.gpl3Plus;
76     maintainers = with maintainers; [
77       bwc9876
78       spoonbaker
79       locochoco
80     ];
81   };