From 55bdf1e63ef961272b881a6aee7d3e3bb87c037e Mon Sep 17 00:00:00 2001 From: Hannes Schulze <43932053+hannesschulze@users.noreply.github.com> Date: Tue, 16 Jul 2024 14:59:36 +0200 Subject: [PATCH] Update Nix Flake (#161) * nix: add support for aarch64-linux * nix: add librsvg to enable svg icons in gtk --- flake.nix | 2 ++ nix/default.nix | 7 +++++++ 2 files changed, 9 insertions(+) diff --git a/flake.nix b/flake.nix index e5611e3..8932ae2 100644 --- a/flake.nix +++ b/flake.nix @@ -16,6 +16,7 @@ inherit (nixpkgs) lib; genSystems = lib.genAttrs [ "aarch64-darwin" + "aarch64-linux" "x86_64-darwin" "x86_64-linux" ]; @@ -50,6 +51,7 @@ xorg.libX11 gtk4 libadwaita + librsvg xorg.libXtst ] ++ lib.optionals stdenv.isDarwin [ darwin.apple_sdk_11_0.frameworks.CoreGraphics diff --git a/nix/default.nix b/nix/default.nix index b5a9448..41eda0d 100644 --- a/nix/default.nix +++ b/nix/default.nix @@ -14,6 +14,7 @@ rustPlatform.buildRustPackage { nativeBuildInputs = with pkgs; [ pkg-config cmake + makeWrapper buildPackages.gtk4 ]; @@ -36,6 +37,12 @@ rustPlatform.buildRustPackage { # Set Environment Variables RUST_BACKTRACE = "full"; + # Needed to enable support for SVG icons in GTK + postInstall = '' + wrapProgram "$out/bin/lan-mouse" \ + --set GDK_PIXBUF_MODULE_FILE ${pkgs.librsvg.out}/lib/gdk-pixbuf-2.0/2.10.0/loaders.cache + ''; + meta = with lib; { description = "Lan Mouse is a mouse and keyboard sharing software"; longDescription = ''