nixpkgs/pkgs/by-name/ma/material-design-icons/package.nix
aleksana 571c71e6f7 treewide: migrate packages to pkgs/by-name, take 1
We are migrating packages that meet below requirements:

1. using `callPackage`
2. called path is a directory
3. overriding set is empty (`{ }`)
4. not containing path expressions other than relative path (to
makenixpkgs-vet happy)
5. not referenced by nix files outside of the directory, other
than`pkgs/top-level/all-packages.nix`
6. not referencing nix files outside of the directory
7. not referencing `default.nix` (since it's changed to `package.nix`)
8. `outPath` doesn't change after migration

The tool is here: https://github.com/Aleksanaa/by-name-migrate.
2024-11-09 20:04:51 +08:00

46 lines
1.2 KiB
Nix

{ lib
, fetchFromGitHub
, stdenvNoCC
, nix-update-script
}:
stdenvNoCC.mkDerivation rec {
pname = "material-design-icons";
version = "7.4.47";
src = fetchFromGitHub {
owner = "Templarian";
repo = "MaterialDesign-Webfont";
rev = "v${version}";
hash = "sha256-7t3i3nPJZ/tRslLBfY+9kXH8TR145GC2hPFYJeMHRL8=";
sparseCheckout = [ "fonts" ];
};
installPhase = ''
runHook preInstall
mkdir -p "$out/share/fonts/"{eot,truetype,woff,woff2}
cp fonts/*.eot "$out/share/fonts/eot/"
cp fonts/*.ttf "$out/share/fonts/truetype/"
cp fonts/*.woff "$out/share/fonts/woff/"
cp fonts/*.woff2 "$out/share/fonts/woff2/"
runHook postInstall
'';
passthru.updateScript = nix-update-script { };
meta = with lib; {
description = "7000+ Material Design Icons from the Community";
longDescription = ''
Material Design Icons' growing icon collection allows designers and
developers targeting various platforms to download icons in the format,
color and size they need for any project.
'';
homepage = "https://materialdesignicons.com";
license = licenses.asl20;
platforms = platforms.all;
maintainers = with maintainers; [ vlaci dixslyf ];
};
}