571c71e6f7
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.
44 lines
1.4 KiB
Nix
44 lines
1.4 KiB
Nix
{ lib, stdenvNoCC, fetchzip }:
|
||
|
||
stdenvNoCC.mkDerivation rec {
|
||
pname = "u001";
|
||
version = "unstable-2016-08-01"; # date in the zip file, actual creation date unknown
|
||
|
||
src = fetchzip {
|
||
urls = [
|
||
"https://fontlibrary.org/assets/downloads/u001/3ea00b3c0c8fa6ce4373e5766fafd651/u001.zip"
|
||
"https://web.archive.org/web/20220830085803/https://fontlibrary.org/assets/downloads/u001/3ea00b3c0c8fa6ce4373e5766fafd651/u001.zip"
|
||
];
|
||
hash = "sha256-7H32pfr0g68XP5B48VUY99e6fbd7rhH6fEnCKNXWEkU=";
|
||
stripRoot = false;
|
||
};
|
||
|
||
installPhase = ''
|
||
runHook preInstall
|
||
|
||
TTF_DIR=$out/share/fonts/truetype
|
||
|
||
mkdir -p $TTF_DIR
|
||
|
||
# We’ll adjust the nonstandard naming convention here
|
||
cp u001-reg.ttf $TTF_DIR/U001-Regular.ttf
|
||
cp u001-ita.ttf $TTF_DIR/U001-Italic.ttf
|
||
cp u001-bol.ttf $TTF_DIR/U001-Bold.ttf
|
||
cp u001-bolita.ttf $TTF_DIR/U001-BoldItalic.ttf
|
||
cp u001con-reg.ttf $TTF_DIR/U001Condensed-Regular.ttf
|
||
cp u001con-ita.ttf $TTF_DIR/U001Condensed-Italic.ttf
|
||
cp u001con-bol.ttf $TTF_DIR/U001Condensed-Bold.ttf
|
||
cp u001con-bolita.ttf $TTF_DIR/U001Condensed-BoldItalic.ttf
|
||
|
||
runHook postInstall
|
||
'';
|
||
|
||
meta = with lib; {
|
||
description = "Univers-like typeface that comes with GhostPDL made by URW++";
|
||
homepage = "https://fontlibrary.org/en/font/u001";
|
||
license = licenses.aladdin;
|
||
platforms = platforms.all;
|
||
maintainers = with maintainers; [ toastal ];
|
||
};
|
||
}
|