Commit f71d6780 authored by Weijia Wang's avatar Weijia Wang
Browse files

treewide: convert 26 fonts to stdenvNoCC.mkDerivation

parent 3dd3562f
Loading
Loading
Loading
Loading
+17 −15
Original line number Diff line number Diff line
# when changing this expression convert it from 'fetchzip' to 'stdenvNoCC.mkDerivation'
{ lib, fetchzip }:
let
{ lib, stdenvNoCC, fetchzip }:

stdenvNoCC.mkDerivation rec {
  pname = "fraunces";
  version = "1.000";
in
(fetchzip {
  name = "fraunces-${version}";

  src = fetchzip {
    url = "https://github.com/undercasetype/Fraunces/releases/download/${version}/UnderCaseType_Fraunces_${version}.zip";
    hash = "sha256-hu2G4Fs2I3TMEy/EBFnc88Pv3c8Mpc5rm3OwVvol7gQ=";
  };

  installPhase = ''
    runHook preInstall

  sha256 = "0qgl140qkn9p87x7pk60fd3lj206y5h0fq2xkcj2qiv3sxbqxwqb";
    install -Dm644 *Desktop/static/otf/*.otf -t $out/share/fonts/opentype
    install -Dm644 *Desktop/static/ttf/*.ttf *Desktop/*.ttf -t $out/share/fonts/truetype

    runHook postInstall
  '';

  meta = with lib; {
    description = "A display, “Old Style” soft-serif typeface inspired by early 20th century typefaces";
@@ -17,10 +25,4 @@ in
    maintainers = [ maintainers.marsam ];
    platforms = platforms.all;
  };
}).overrideAttrs (_: {
  postFetch = ''
    mkdir -p $out/share/fonts/
    unzip -j $downloadedFile \*.otf -d $out/share/fonts/opentype
    unzip -j $downloadedFile \*.ttf -d $out/share/fonts/truetype
  '';
})
}
+24 −24
Original line number Diff line number Diff line
# when changing this expression convert it from 'fetchzip' to 'stdenvNoCC.mkDerivation'
{ lib, fetchzip }:
{ lib, stdenvNoCC, fetchzip }:

let
stdenvNoCC.mkDerivation rec {
  pname = "galatia-sil";
  version = "2.1";
  name = "galatia-sil-${version}";
in
  (fetchzip rec {
    inherit name;

  src = fetchzip {
    url = "https://software.sil.org/downloads/r/galatia/GalatiaSIL-${version}.zip";
    hash = "sha256-7kXnTC5vpUOjcT40oNW6e32zFGejlWJq1J+p+5DiAos=";
  };

  installPhase = ''
    runHook preInstall

    sha256 = "sha256-zLL/7LMcJul2LilhEafpvm+tiYlgv1y1jj85VvG+wiI=";
    install -Dm644 $downloadedFile *.ttf -t $out/share/fonts/truetype
    install -Dm644 $downloadedFile OFL.txt OFL-FAQ.txt FONTLOG.txt -t $out/share/doc/${pname}-${version}

    runHook postInstall
  '';

  meta = with lib; {
    homepage = "https://software.sil.org/galatia";
@@ -22,10 +28,4 @@ in
    platforms = platforms.all;
    maintainers = [ maintainers.kmein ];
  };
  }).overrideAttrs (_: {
    postFetch = ''
      mkdir -p $out/share/{doc,fonts}
      unzip -j $downloadedFile \*.ttf -d $out/share/fonts/truetype
      unzip -j $downloadedFile \*OFL.txt \*OFL-FAQ.txt \*FONTLOG.txt -d "$out/share/doc/${name}"
    '';
  })
}
+18 −18
Original line number Diff line number Diff line
# when changing this expression convert it from 'fetchzip' to 'stdenvNoCC.mkDerivation'
{ lib, fetchzip }:
{ lib, stdenvNoCC, fetchzip }:

let
  major = "1";
  minor = "102";
  version = "${major}.${minor}";
  name = "gentium-book-basic-${version}";
in (fetchzip rec {
  inherit name;
stdenvNoCC.mkDerivation rec {
  pname = "gentium-book-basic";
  version = "1.102";

  url = "http://software.sil.org/downloads/r/gentium/GentiumBasic_${major}${minor}.zip";
  src = fetchzip {
    url = "http://software.sil.org/downloads/r/gentium/GentiumBasic_${lib.versions.major version}${lib.versions.minor version}.zip";
    hash = "sha256-oCmpl95MJRfCV25cg/4cf8AwQWnoymXasSss1ziOPoE=";
  };

  installPhase = ''
    runHook preInstall

  sha256 = "0598zr5f7d6ll48pbfbmmkrybhhdks9b2g3m2g67wm40070ffzmd";
    mkdir -p $out/share/{doc,fonts}
    install -Dm644 *.ttf                       -t $out/share/fonts/truetype
    install -Dm644 FONTLOG.txt GENTIUM-FAQ.txt -t $out/share/doc/${pname}-${version}

    runHook postInstall
  '';

  meta = with lib; {
    homepage = "https://software.sil.org/gentium/";
@@ -20,10 +26,4 @@ in (fetchzip rec {
    license = licenses.ofl;
    platforms = platforms.all;
  };
}).overrideAttrs (_: {
  postFetch = ''
    mkdir -p $out/share/{doc,fonts}
    unzip -j $downloadedFile \*.ttf                            -d $out/share/fonts/truetype
    unzip -j $downloadedFile \*/FONTLOG.txt \*/GENTIUM-FAQ.txt -d $out/share/doc/${name}
  '';
})
}
+17 −25
Original line number Diff line number Diff line
# when changing this expression convert it from 'fetchzip' to 'stdenvNoCC.mkDerivation'
{ lib, fetchzip }:
{ lib, stdenvNoCC, fetchzip }:

let
stdenvNoCC.mkDerivation rec {
  pname = "gentium";
  version = "6.101";
  name = "gentium-${version}";
in (fetchzip rec {
  inherit name;

  src = fetchzip {
    url = "http://software.sil.org/downloads/r/gentium/GentiumPlus-${version}.zip";
    hash = "sha256-iKD1Q7/lsbZCuJQoJqySQHwplrHv8yzmph+QwKpYgMU=";
  };

  installPhase = ''
    runHook preInstall

  sha256 = "sha256-+T5aUlqQYDWRp4/4AZzsREHgjAnOeUB6qn1GAI0A5hE=";
    install -Dm644 *.ttf -t $out/share/fonts/truetype
    install -Dm644 FONTLOG.txt README.txt -t $out/share/doc/${pname}-${version}
    cp -r documentation $out/share/doc/${pname}-${version}

    runHook postInstall
  '';

  meta = with lib; {
    homepage = "https://software.sil.org/gentium/";
@@ -34,20 +42,4 @@ in (fetchzip rec {
    license = licenses.ofl;
    platforms = platforms.all;
  };
}).overrideAttrs (_: {
  postFetch = ''
    mkdir -p $out/share/{doc,fonts}
    unzip -l $downloadedFile
    unzip -j $downloadedFile \*.ttf \
      -d $out/share/fonts/truetype
    unzip -j $downloadedFile \
      \*/FONTLOG.txt \
      \*/README.txt \
      -d $out/share/doc/${name}
    unzip -j $downloadedFile \
      \*/documentation/\*.html \
      \*/documentation/\*.txt \
      -x \*/documentation/source/\* \
      -d $out/share/doc/${name}/documentation
  '';
})
}
+16 −14
Original line number Diff line number Diff line
# when changing this expression convert it from 'fetchzip' to 'stdenvNoCC.mkDerivation'
{ lib, fetchzip }:
{ lib, stdenvNoCC, fetchzip }:

let
stdenvNoCC.mkDerivation rec {
  pname = "hack-font";
  version = "3.003";
in (fetchzip {
  name = "hack-font-${version}";

  src = fetchzip {
    url = "https://github.com/chrissimpkins/Hack/releases/download/v${version}/Hack-v${version}-ttf.zip";
    hash = "sha256-SxF4kYp9aL/9L9EUniquFadzWt/+PcvhUQOIOvCrFRM=";
  };

  installPhase = ''
    runHook preInstall

  sha256 = "1l6ih6v7dqali5c7zh6z2xnbf9h2wz0ag6fdgszmqd5lnhw39v6s";
    install -Dm644 *.ttf -t $out/share/fonts/hack

    runHook postInstall
  '';

  meta = with lib; {
    description = "A typeface designed for source code";
@@ -33,9 +40,4 @@ in (fetchzip {
    maintainers = with maintainers; [ dywedir ];
    platforms = platforms.all;
  };
}).overrideAttrs (_: {
  postFetch = ''
    mkdir -p $out/share/fonts
    unzip -j $downloadedFile \*.ttf -d $out/share/fonts/hack
  '';
})
}
Loading