Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

culmus: add .otf, .pfa and .afm files #53638

Merged
merged 4 commits into from Jan 11, 2019
Merged
Changes from 1 commit
Commits
File filter...
Filter file types
Jump to…
Jump to file or symbol
Failed to load files and symbols.

Always

Just for now

@@ -3,17 +3,24 @@
let
version = "0.133";
in fetchzip {
name = "culmus-${version}";
name = "culmus-${version}-1";
This conversation was marked as resolved by markuskowa

This comment has been minimized.

Copy link
@markuskowa

markuskowa Jan 10, 2019

Member

This PR is a bugfix. No need to append the version.

This comment has been minimized.

Copy link
@yochai

yochai Jan 11, 2019

Author Contributor

sorry, changed it so it will rebuild locally, need to be squashed ?

This comment has been minimized.

Copy link
@markuskowa

markuskowa Jan 11, 2019

Member

I can squash everything for the merge in the end.

This comment has been minimized.

Copy link
@yochai

yochai Jan 11, 2019

Author Contributor

Done


url = "mirror://sourceforge/culmus/culmus/${version}/culmus-${version}.tar.gz";

postFetch = ''
tar -xzvf $downloadedFile --strip-components=1
mkdir -p $out/share/fonts/truetype
mkdir -p $out/share/fonts/{truetype,type1}
cp -v *.pfa $out/share/fonts/type1/
cp -v *.afm $out/share/fonts/type1/
cp -v fonts.scale-type1 $out/share/fonts/type1/fonts.scale
cp -v *.ttf $out/share/fonts/truetype/
cp -v *.otf $out/share/fonts/truetype/
cp -v fonts.scale-ttf $out/share/fonts/truetype/fonts.scale
mkdir -p $out/etc/fonts/conf.d
This conversation was marked as resolved by markuskowa

This comment has been minimized.

Copy link
@markuskowa

markuskowa Jan 10, 2019

Member

In NixOS the etc dir of package has no effect. Is this really needed?

This comment has been minimized.

Copy link
@yochai

yochai Jan 11, 2019

Author Contributor

No, I just translated the installation script.

cp -v culmus.conf $out/etc/fonts/conf.d/39-culmus.conf
'';

sha256 = "1jxg2wf4kwasp5cia00nki2lrcdnhsyh4yy7d05l0a9bim5hq2lr";
sha256 = "1lvwv15lpk4cqarh2ncl83c43fmqxnzqaqzfm251zkx6svi1l0is";
This conversation was marked as resolved by markuskowa

This comment has been minimized.

Copy link
@markuskowa

markuskowa Jan 10, 2019

Member

Something strange is going on here with the hash. It already changed during the last update: #50759

This comment has been minimized.

Copy link
@yochai

yochai Jan 11, 2019

Author Contributor

Followed nix complaint about a bad hash

This comment has been minimized.

Copy link
@markuskowa

markuskowa Jan 11, 2019

Member

I think I have an idea what is going here. Instead of using mkDerivation the whole thing just uses fetchzip. The hash is formed after the fetch is finished. So everytime something in the script postFetch is changed, the hash changes. The hash is not formed anymore for the downloaded source.
Would you mind rewriting it as a derivation? The whole thing should look something like this (schematically):

in stdenv.mkDerivation {
  name = ...

  src = fetchzip {
    url = ...
    sha256 = ...
  };

  installPhase = ''
   ...
  '';

  meta = ...
}

What is now in postFetch goes into installPhase of the derivation.

This comment has been minimized.

Copy link
@yochai

yochai Jan 11, 2019

Author Contributor

Thanks for the feedback, I will fix it


meta = {
description = "Culmus Hebrew fonts";
ProTip! Use n and p to navigate between commits in a pull request.
You can’t perform that action at this time.