From ab1b08f3c70db016b98003cdbfea7427e8cc61b6 Mon Sep 17 00:00:00 2001 From: Heitor Augusto Date: Sat, 15 Feb 2025 11:59:27 -0300 Subject: [PATCH] tasks: use libcosmicAppHook and just for building Also removed some unnecessary buildInputs that were not needed neither for tasks neither for its dependencies --- pkgs/by-name/ta/tasks/package.nix | 47 +++++++++++-------------------- 1 file changed, 16 insertions(+), 31 deletions(-) diff --git a/pkgs/by-name/ta/tasks/package.nix b/pkgs/by-name/ta/tasks/package.nix index f633835a4991..784696938612 100644 --- a/pkgs/by-name/ta/tasks/package.nix +++ b/pkgs/by-name/ta/tasks/package.nix @@ -1,21 +1,13 @@ { lib, + stdenv, rustPlatform, fetchFromGitHub, - pkg-config, - wrapGAppsHook3, - atk, - cairo, - gdk-pixbuf, - glib, - gtk3, + libcosmicAppHook, + just, libsecret, - libxkbcommon, openssl, - pango, sqlite, - vulkan-loader, - wayland, nix-update-script, }: @@ -39,34 +31,27 @@ rustPlatform.buildRustPackage rec { env.VERGEN_GIT_SHA = "0e8c728c88a9cac1bac130eb083ca0fe58c7121d"; nativeBuildInputs = [ - pkg-config - wrapGAppsHook3 + libcosmicAppHook + just ]; buildInputs = [ - atk - cairo - gdk-pixbuf - glib - gtk3 libsecret - libxkbcommon openssl - pango sqlite - vulkan-loader - wayland ]; - postFixup = '' - wrapProgram $out/bin/tasks \ - --prefix LD_LIBRARY_PATH : "${ - lib.makeLibraryPath [ - libxkbcommon - wayland - ] - }" - ''; + dontUseJustBuild = true; + dontUseJustCheck = true; + + justFlags = [ + "--set" + "prefix" + (placeholder "out") + "--set" + "bin-src" + "target/${stdenv.hostPlatform.rust.cargoShortTarget}/release/tasks" + ]; passthru = { updateScript = nix-update-script { };