Unverified Commit cbfe24f9 authored by Pol Dellaiera's avatar Pol Dellaiera Committed by GitHub
Browse files

smiley-sans: use installFonts hook (#505696)

parents 887f370b 7e4b5892
Loading
Loading
Loading
Loading
+11 −11
Original line number Diff line number Diff line
@@ -3,25 +3,25 @@
  stdenvNoCC,
  fetchzip,
  nix-update-script,
  installFonts,
}:

stdenvNoCC.mkDerivation rec {
stdenvNoCC.mkDerivation (finalAttrs: {
  pname = "smiley-sans";
  version = "2.0.1";

  src = fetchzip {
    url = "https://github.com/atelier-anchor/smiley-sans/releases/download/v${version}/smiley-sans-v${version}.zip";
    url = "https://github.com/atelier-anchor/smiley-sans/releases/download/v${finalAttrs.version}/smiley-sans-v${finalAttrs.version}.zip";
    sha256 = "sha256-p6DwX5MBPemAfV99L9ayLkEWro31ip4tf+wBQr8mkbs=";
    stripRoot = false;
  };

  installPhase = ''
    runHook preInstall
    install -Dm644 -t $out/share/fonts/opentype *.otf
    install -Dm644 -t $out/share/fonts/truetype *.ttf
    install -Dm644 -t $out/share/fonts/woff2 *.woff2
    runHook postInstall
  '';
  nativeBuildInputs = [ installFonts ];

  outputs = [
    "out"
    "webfont"
  ];

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

@@ -30,7 +30,7 @@ stdenvNoCC.mkDerivation rec {
    homepage = "https://atelier-anchor.com/typefaces/smiley-sans/";
    changelog = "https://github.com/atelier-anchor/smiley-sans/blob/main/CHANGELOG.md";
    license = lib.licenses.ofl;
    maintainers = [ ];
    maintainers = with lib.maintainers; [ pancaek ];
    platforms = lib.platforms.all;
  };
}
})