From ae480c4541172fb26b53089955fb27d980728a32 Mon Sep 17 00:00:00 2001 From: GHOSCHT <31184695+GHOSCHT@users.noreply.github.com> Date: Fri, 26 Jan 2024 20:20:06 +0100 Subject: [PATCH] Add self-packaged protonup-rs --- home/features/cli/default.nix | 1 + pkgs/default.nix | 1 + pkgs/protonup-rs/default.nix | 35 +++++++++++++++++++++++++++++++++++ 3 files changed, 37 insertions(+) create mode 100644 pkgs/protonup-rs/default.nix diff --git a/home/features/cli/default.nix b/home/features/cli/default.nix index 1270300..9b7e328 100644 --- a/home/features/cli/default.nix +++ b/home/features/cli/default.nix @@ -26,6 +26,7 @@ tldr # Nice & short manual snippets ntfy-sh # Push notifications to other devices ipinfo # IP geolocation + protonup-rs mpv # Video player diff --git a/pkgs/default.nix b/pkgs/default.nix index b1e2bbc..9c5825d 100644 --- a/pkgs/default.nix +++ b/pkgs/default.nix @@ -4,4 +4,5 @@ # example = pkgs.callPackage ./example { }; alvr = pkgs.callPackage ./alvr {}; feishin-appimage = pkgs.callPackage ./feishin {}; + protonup-rs = pkgs.callPackage ./protonup-rs {}; } diff --git a/pkgs/protonup-rs/default.nix b/pkgs/protonup-rs/default.nix new file mode 100644 index 0000000..a96f9db --- /dev/null +++ b/pkgs/protonup-rs/default.nix @@ -0,0 +1,35 @@ +{ + lib, + fetchFromGitHub, + rustPlatform, +}: +rustPlatform.buildRustPackage rec { + pname = "protonup-rs"; + version = "v0.6.0"; + + src = fetchFromGitHub { + owner = "auyer"; + repo = pname; + rev = version; + hash = "sha256-IE8QO9LaEllTYRRDA704SNWp4Ap2NQmoYMaKX4l9McY="; + }; + + cargoBuildFlags = "-p protonup-rs"; + + # tests somehow fail, but compiled result works + checkFlags = [ + "--skip=github::tests::test_fetch_data_from_tag" + "--skip=github::tests::test_get_release" + "--skip=github::tests::test_list_releases" + ]; + + cargoSha256 = "sha256-/8JhMDwBP3INP9+YlkTc+SwGnZypcj7OJingiyw1pcU="; + + meta = with lib; { + description = "A Rust app to Install and Update GE-Proton for Steam, and Wine-GE for Lutris"; + homepage = "https://github.com/auyer/Protonup-rs"; + license = licenses.asl20; + maintainers = with maintainers; [GHOSCHT]; + mainProgram = "protonup-rs"; + }; +}