From 07547bc42f5ea54f58836a097cd2698052ac09c0 Mon Sep 17 00:00:00 2001 From: Crony Akatsuki Date: Mon, 1 Apr 2024 17:19:49 +0200 Subject: [PATCH] Make buildable comet package. --- home-manager/home.nix | 4 +++- home-manager/modules/comet-gog.nix | 3 +-- home-manager/modules/patches/comet.patch | 12 ++++++++++++ 3 files changed, 16 insertions(+), 3 deletions(-) create mode 100644 home-manager/modules/patches/comet.patch diff --git a/home-manager/home.nix b/home-manager/home.nix index ebd49bd..f2644b4 100644 --- a/home-manager/home.nix +++ b/home-manager/home.nix @@ -85,7 +85,9 @@ # pcsx2 # Playstation 2 emulator # ppsspp-sdl-wayland # Playstation portable emulator (callPackage ./modules/scripts.nix { inherit pkgs; }) # My scripts - # (callPackage ./modules/comet-gog.nix { inherit pkgs; }) # Comet for gog achievements + (callPackage ./modules/comet-gog.nix { + inherit pkgs; + }) # Comet for gog achievements ]; # Environmental variables I can't live without diff --git a/home-manager/modules/comet-gog.nix b/home-manager/modules/comet-gog.nix index 10eda07..1acdc04 100644 --- a/home-manager/modules/comet-gog.nix +++ b/home-manager/modules/comet-gog.nix @@ -12,9 +12,8 @@ rustPlatform.buildRustPackage rec { fetchSubmodules = true; }; - PROTOC = "${protobuf}/bin/protoc"; - PROTOC_INCLUDE = "${protobuf}/include"; nativeBuildInputs = [ protobuf ]; + patches = [ ./patches/comet.patch ]; cargoLock.lockFile = src + /Cargo.lock; } diff --git a/home-manager/modules/patches/comet.patch b/home-manager/modules/patches/comet.patch new file mode 100644 index 0000000..d5ae255 --- /dev/null +++ b/home-manager/modules/patches/comet.patch @@ -0,0 +1,12 @@ +diff --git a/build.rs b/build.rs +index f6a0904..6252aec 100644 +--- a/build.rs ++++ b/build.rs +@@ -3,7 +3,6 @@ use protobuf_codegen::Codegen; + fn main() { + Codegen::new() + .protoc() +- .protoc_path(&protoc_bin_vendored::protoc_bin_path().unwrap()) + .includes(["proto"]) + .input("proto/gog.protocols.pb.proto") + .input("proto/galaxy.protocols.webbroker_service.proto")