diff --git a/pkgs/by-name/co/cosmic-ext-calculator/package.nix b/pkgs/by-name/co/cosmic-ext-calculator/package.nix index 4bccb86bcffe..7841e35e66b9 100644 --- a/pkgs/by-name/co/cosmic-ext-calculator/package.nix +++ b/pkgs/by-name/co/cosmic-ext-calculator/package.nix @@ -8,21 +8,31 @@ rustPlatform, fetchFromGitHub, libcosmicAppHook, + libqalculate, just, nix-update-script, + fetchpatch, }: rustPlatform.buildRustPackage rec { pname = "cosmic-ext-calculator"; - version = "0.1.1"; + version = "0.2.0"; src = fetchFromGitHub { owner = "cosmic-utils"; repo = "calculator"; tag = version; - hash = "sha256-UO3JKPsztptNEFAxolRui9FxtCsTRgpXhHH242i9b6E="; + hash = "sha256-qPo+Qi6P0m3rNA6Qo6iNsgzGyirPqzXk4nj3OG6IuZ0="; }; - cargoHash = "sha256-a4IOmCWKX8RR8xeKS6wdsTlNyTr91B93bYMDx/+/+04="; + cargoHash = "sha256-Pq1E4O6lZMe+wKJgQKDBmgdsJJsJTyK0FDXU53n+Di4="; + + # TODO: Remove in the next release + patches = [ + (fetchpatch { + url = "https://github.com/cosmic-utils/calculator/commit/fc176a8d5d8af7fd808d450a78635432db6b64e6.patch"; + hash = "sha256-amSB+67rwCUqfqOTFGCkInvoZmA//wAR0viuvNdPkuc="; + }) + ]; nativeBuildInputs = [ libcosmicAppHook @@ -41,6 +51,12 @@ rustPlatform.buildRustPackage rec { "target/${stdenv.hostPlatform.rust.cargoShortTarget}/release/cosmic-ext-calculator" ]; + preFixup = '' + libcosmicAppWrapperArgs+=( + --prefix PATH : ${lib.makeBinPath [ libqalculate ]} + ) + ''; + passthru.updateScript = nix-update-script { }; meta = {