forgejo-lts: 7.0.10 -> 7.0.11
[NixPkgs.git] / pkgs / games / ferium / default.nix
blob08710c42214da956d7af543695394492289db768
1 { lib
2 , stdenv
3 , fetchFromGitHub
4 , rustPlatform
5 , Security
6 , SystemConfiguration
7 , installShellFiles
8 }:
10 rustPlatform.buildRustPackage rec {
11   pname = "ferium";
12   version = "4.7.1";
14   src = fetchFromGitHub {
15     owner = "gorilla-devs";
16     repo = pname;
17     rev = "v${version}";
18     hash = "sha256-eeQjezB6pRdnPADLgDLo8b+bUSP12gfBhFNt/uYCwHU=";
19   };
21   buildInputs = lib.optionals stdenv.hostPlatform.isDarwin [ Security SystemConfiguration ];
23   cargoHash = "sha256-yBi6zyljkYEIUvSH4nXMw8fjPnt4kjqiuZ/QLT5IbqQ=";
25   # Disable the GUI file picker so that GTK/XDG dependencies aren't used
26   buildNoDefaultFeatures = true;
28   # Requires an internet connection
29   doCheck = false;
31   nativeBuildInputs = [ installShellFiles ];
33   postInstall = ''
34     for shell in bash fish zsh; do
35       $out/bin/ferium complete $shell > ferium.$shell
36       installShellCompletion ferium.$shell
37     done
38   '';
40   meta = with lib; {
41     description = "Fast and multi-source CLI program for managing Minecraft mods and modpacks from Modrinth, CurseForge, and GitHub Releases";
42     mainProgram = "ferium";
43     homepage = "https://github.com/gorilla-devs/ferium";
44     license = licenses.mpl20;
45     maintainers = with maintainers; [ leo60228 soupglasses ];
46   };