font-jis-misc: refactor, move to pkgs/by-name and rename from xorg.fontjismisc
the output doesn't change
This commit is contained in:
@@ -0,0 +1,53 @@
|
||||
{
|
||||
lib,
|
||||
stdenv,
|
||||
fetchurl,
|
||||
pkg-config,
|
||||
fontutil,
|
||||
bdftopcf,
|
||||
mkfontscale,
|
||||
writeScript,
|
||||
}:
|
||||
stdenv.mkDerivation (finalAttrs: {
|
||||
pname = "font-jis-misc";
|
||||
version = "1.0.4";
|
||||
|
||||
src = fetchurl {
|
||||
url = "mirror://xorg/individual/font/font-jis-misc-${finalAttrs.version}.tar.xz";
|
||||
hash = "sha256-eNHv9sRx96poAqJtYszPUdjlGFWGQG2bbh7mkbC/+tA=";
|
||||
};
|
||||
|
||||
strictDeps = true;
|
||||
|
||||
nativeBuildInputs = [
|
||||
pkg-config
|
||||
bdftopcf
|
||||
mkfontscale
|
||||
];
|
||||
|
||||
buildInputs = [ fontutil ];
|
||||
|
||||
configureFlags = [ "--with-fontrootdir=$(out)/lib/X11/fonts" ];
|
||||
|
||||
passthru = {
|
||||
updateScript = writeScript "update-${finalAttrs.pname}" ''
|
||||
#!/usr/bin/env nix-shell
|
||||
#!nix-shell -i bash -p common-updater-scripts
|
||||
version="$(list-directory-versions --pname ${finalAttrs.pname} \
|
||||
--url https://xorg.freedesktop.org/releases/individual/font/ \
|
||||
| sort -V | tail -n1)"
|
||||
update-source-version ${finalAttrs.pname} "$version"
|
||||
'';
|
||||
};
|
||||
|
||||
meta = {
|
||||
description = "JIS X 9051: 1984 pcf font";
|
||||
homepage = "https://gitlab.freedesktop.org/xorg/font/jis-misc";
|
||||
# licensing is unclear:
|
||||
# - COPYING just says "permission to use"
|
||||
# - The industial standard (JIS X 9051: 1984) this is from, is paid.
|
||||
license = lib.licenses.unfree;
|
||||
maintainers = [ ];
|
||||
platforms = lib.platforms.unix;
|
||||
};
|
||||
})
|
||||
@@ -26,6 +26,7 @@
|
||||
font-encodings,
|
||||
font-ibm-type1,
|
||||
font-isas-misc,
|
||||
font-jis-misc,
|
||||
font-micro-misc,
|
||||
font-misc-cyrillic,
|
||||
font-misc-ethiopic,
|
||||
@@ -234,6 +235,7 @@ self: with self; {
|
||||
fontdecmisc = font-dec-misc;
|
||||
fontibmtype1 = font-ibm-type1;
|
||||
fontisasmisc = font-isas-misc;
|
||||
fontjismisc = font-jis-misc;
|
||||
fontmicromisc = font-micro-misc;
|
||||
fontmisccyrillic = font-misc-cyrillic;
|
||||
fontmiscethiopic = font-misc-ethiopic;
|
||||
@@ -392,46 +394,6 @@ self: with self; {
|
||||
})
|
||||
) { };
|
||||
|
||||
# THIS IS A GENERATED FILE. DO NOT EDIT!
|
||||
fontjismisc = callPackage (
|
||||
{
|
||||
stdenv,
|
||||
pkg-config,
|
||||
fetchurl,
|
||||
fontutil,
|
||||
bdftopcf,
|
||||
mkfontscale,
|
||||
testers,
|
||||
}:
|
||||
stdenv.mkDerivation (finalAttrs: {
|
||||
pname = "font-jis-misc";
|
||||
version = "1.0.4";
|
||||
builder = ./builder.sh;
|
||||
src = fetchurl {
|
||||
url = "mirror://xorg/individual/font/font-jis-misc-1.0.4.tar.xz";
|
||||
sha256 = "1l7spyq93rhydsdnsh46alcfbn2irz664vd209lamxviqkvfzlbq";
|
||||
};
|
||||
hardeningDisable = [
|
||||
"bindnow"
|
||||
"relro"
|
||||
];
|
||||
strictDeps = true;
|
||||
nativeBuildInputs = [
|
||||
pkg-config
|
||||
bdftopcf
|
||||
mkfontscale
|
||||
];
|
||||
buildInputs = [ fontutil ];
|
||||
configureFlags = [ "--with-fontrootdir=$(out)/lib/X11/fonts" ];
|
||||
postPatch = ''substituteInPlace configure --replace 'MAPFILES_PATH=`pkg-config' 'MAPFILES_PATH=`$PKG_CONFIG' '';
|
||||
passthru.tests.pkg-config = testers.testMetaPkgConfig finalAttrs.finalPackage;
|
||||
meta = {
|
||||
pkgConfigModules = [ ];
|
||||
platforms = lib.platforms.unix;
|
||||
};
|
||||
})
|
||||
) { };
|
||||
|
||||
# THIS IS A GENERATED FILE. DO NOT EDIT!
|
||||
fontmiscmeltho = callPackage (
|
||||
{
|
||||
|
||||
@@ -357,6 +357,7 @@ print OUT <<EOF;
|
||||
font-encodings,
|
||||
font-ibm-type1,
|
||||
font-isas-misc,
|
||||
font-jis-misc,
|
||||
font-micro-misc,
|
||||
font-misc-cyrillic,
|
||||
font-misc-ethiopic,
|
||||
@@ -565,6 +566,7 @@ self: with self; {
|
||||
fontdecmisc = font-dec-misc;
|
||||
fontibmtype1 = font-ibm-type1;
|
||||
fontisasmisc = font-isas-misc;
|
||||
fontjismisc = font-jis-misc;
|
||||
fontmicromisc = font-micro-misc;
|
||||
fontmisccyrillic = font-misc-cyrillic;
|
||||
fontmiscethiopic = font-misc-ethiopic;
|
||||
|
||||
@@ -790,29 +790,6 @@ self: super:
|
||||
xwd = addMainProgram super.xwd { };
|
||||
}
|
||||
|
||||
# mark some packages as unfree
|
||||
// (
|
||||
let
|
||||
# unfree, possibly not redistributable
|
||||
unfree = [
|
||||
# unclear license, "permission to use"?
|
||||
"fontjismisc"
|
||||
];
|
||||
|
||||
setLicense =
|
||||
license: name:
|
||||
super.${name}.overrideAttrs (attrs: {
|
||||
meta = attrs.meta // {
|
||||
inherit license;
|
||||
};
|
||||
});
|
||||
mapNamesToAttrs =
|
||||
f: names: lib.listToAttrs (lib.zipListsWith lib.nameValuePair names (map f names));
|
||||
|
||||
in
|
||||
mapNamesToAttrs (setLicense lib.licenses.unfree) unfree
|
||||
)
|
||||
|
||||
# deprecate some packages
|
||||
// lib.optionalAttrs config.allowAliases {
|
||||
fontbitstreamspeedo = throw "Bitstream Speedo is an obsolete font format that hasn't been supported by Xorg since 2005"; # added 2025-09-24
|
||||
|
||||
@@ -68,7 +68,6 @@ mirror://xorg/individual/driver/xf86-video-vesa-2.6.0.tar.xz
|
||||
mirror://xorg/individual/driver/xf86-video-vmware-13.4.0.tar.xz
|
||||
mirror://xorg/individual/driver/xf86-video-voodoo-1.2.6.tar.xz
|
||||
mirror://xorg/individual/driver/xf86-video-wsfb-0.4.0.tar.bz2
|
||||
mirror://xorg/individual/font/font-jis-misc-1.0.4.tar.xz
|
||||
mirror://xorg/individual/font/font-misc-meltho-1.0.4.tar.xz
|
||||
mirror://xorg/individual/font/font-misc-misc-1.1.3.tar.xz
|
||||
mirror://xorg/individual/lib/libXTrap-1.0.1.tar.bz2
|
||||
|
||||
Reference in New Issue
Block a user