Unverified Commit 92e7094f authored by Aleksana's avatar Aleksana Committed by GitHub
Browse files

cosmic-ext-calculator: 0.1.1 -> 0.2.0 (#462892)

parents 4c6b540e cfec04fa
Loading
Loading
Loading
Loading
+19 −3
Original line number Diff line number Diff line
@@ -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 = {