Unverified Commit f8faeac1 authored by Peder Bergebakken Sundt's avatar Peder Bergebakken Sundt Committed by GitHub
Browse files

fontc: 0.3.0 -> 0.6.0, switch to fetchCrate, add updateScript (#504304)

parents 4918b053 10e6892e
Loading
Loading
Loading
Loading

pkgs/by-name/fo/fontc/Cargo.lock

deleted100644 → 0
+0 −3145

File deleted.

Preview size limit exceeded, changes collapsed.

+13 −18
Original line number Diff line number Diff line
{
  lib,
  rustPlatform,
  fetchFromGitHub,
  fetchCrate,
  nix-update-script,
}:

rustPlatform.buildRustPackage (finalAttrs: {
  pname = "fontc";
  version = "0.3.0";
  version = "0.6.0";

  src = fetchFromGitHub {
    owner = "googlefonts";
    repo = "fontc";
    tag = "fontc-v${finalAttrs.version}";
    hash = "sha256-Zr2nJRNY1vLGhVOGC3KSWbd4cQReO/F8Wgzx3y/qPFc=";
  src = fetchCrate {
    inherit (finalAttrs) pname version;
    hash = "sha256-TjbhVkhoIoyp6A33v/QVaNLoHxB5whT/gOlehQTUKxM=";
  };
  buildAndTestSubdir = "fontc";

  postPatch = ''
    ln -s ${./Cargo.lock} Cargo.lock
  '';
  cargoLock = {
    lockFile = ./Cargo.lock;
    outputHashes = {
      "tidy-sys-0.8.2" = "sha256-Okt+mqakdwm0OlD4UXBtQIbO+Wmlk6jTMWi9Q5Y1M2o=";
    };
  };
  cargoHash = "sha256-FLvEgIFgLE++59j5LeCRC4ptgRhAiDF7hani4Yh8kn0=";

  # skip `cargo test` because source code from crates.io doesn't include necessary resources for testing
  doCheck = false;

  passthru.updateScript = nix-update-script { };

  meta = {
    description = "Wherein we pursue oxidizing fontmake";
    homepage = "https://github.com/googlefonts/fontc";
    changelog = "https://github.com/googlefonts/fontc/releases/tag/${finalAttrs.src.tag}";
    changelog = "https://github.com/googlefonts/fontc/releases/tag/fontc-v${finalAttrs.version}";
    license = lib.licenses.asl20;
    maintainers = with lib.maintainers; [ shiphan ];
    mainProgram = "fontc";