joypixels: run install hooks

Also clean up formatting.
This commit is contained in:
Jan Tojnar 2020-10-22 03:31:18 +02:00
parent 196c828153
commit 5902a08028
No known key found for this signature in database
GPG Key ID: 7FAB2A15F7A607A4

View File

@ -1,8 +1,11 @@
{ stdenv, fetchurl, config { stdenv
, fetchurl
, config
, acceptLicense ? config.joypixels.acceptLicense or false , acceptLicense ? config.joypixels.acceptLicense or false
}: }:
let inherit (stdenv.hostPlatform.parsed) kernel; let
inherit (stdenv.hostPlatform.parsed) kernel;
systemSpecific = { systemSpecific = {
darwin = rec { darwin = rec {
@ -69,7 +72,11 @@ stdenv.mkDerivation rec {
dontUnpack = true; dontUnpack = true;
installPhase = with systemSpecific; '' installPhase = with systemSpecific; ''
runHook preInstall
install -Dm644 $src $out/share/fonts/truetype/${fontFile} install -Dm644 $src $out/share/fonts/truetype/${fontFile}
runHook postInstall
''; '';
meta = with stdenv.lib; { meta = with stdenv.lib; {
@ -80,7 +87,9 @@ stdenv.mkDerivation rec {
of files ranging from png, svg, iconjar, sprites, and fonts. of files ranging from png, svg, iconjar, sprites, and fonts.
''; '';
homepage = "https://www.joypixels.com/fonts"; homepage = "https://www.joypixels.com/fonts";
license = let free-license = joypixels-free-license; license =
let
free-license = joypixels-free-license;
appendix = joypixels-license-appendix; appendix = joypixels-license-appendix;
in with systemSpecific; { in with systemSpecific; {
spdxId = "LicenseRef-JoyPixels-Free-6.0-with-${capitalized}-Appendix"; spdxId = "LicenseRef-JoyPixels-Free-6.0-with-${capitalized}-Appendix";