plemoljp, plemoljp-{nf,hs}: refine updateScript
* Share `version` and `meta` in font variants
While fonts have fewer restrictions than executables,
the motivation is essentially the same as 900ebdb9e4.
There is no reason to update these packages individually.
* Add `updateScript`
Upstream used `-beta*` tags for the 2.0.0 release.
The script now only targets tags for stable versions.
* Prefer `finalAttrs` over `rec`'
I included this modernization in the same commit
because it relates to the version reference.
This commit is contained in:
@@ -1,15 +1,18 @@
|
|||||||
{
|
{
|
||||||
lib,
|
|
||||||
stdenvNoCC,
|
stdenvNoCC,
|
||||||
fetchzip,
|
fetchzip,
|
||||||
|
plemoljp,
|
||||||
}:
|
}:
|
||||||
|
|
||||||
stdenvNoCC.mkDerivation rec {
|
stdenvNoCC.mkDerivation (finalAttrs: {
|
||||||
pname = "plemoljp-hs";
|
pname = "plemoljp-hs";
|
||||||
version = "3.0.0";
|
|
||||||
|
# plemoljp's updateScript also updates this version.
|
||||||
|
# nixpkgs-update: no auto update
|
||||||
|
inherit (plemoljp) version;
|
||||||
|
|
||||||
src = fetchzip {
|
src = fetchzip {
|
||||||
url = "https://github.com/yuru7/PlemolJP/releases/download/v${version}/PlemolJP_HS_v${version}.zip";
|
url = "https://github.com/yuru7/PlemolJP/releases/download/v${finalAttrs.version}/PlemolJP_HS_v${finalAttrs.version}.zip";
|
||||||
hash = "sha256-V21T8ktNZE4nq3SH6aN9iIJHmGTkZuMsvT84yHbwSqI=";
|
hash = "sha256-V21T8ktNZE4nq3SH6aN9iIJHmGTkZuMsvT84yHbwSqI=";
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -24,11 +27,7 @@ stdenvNoCC.mkDerivation rec {
|
|||||||
runHook postInstall
|
runHook postInstall
|
||||||
'';
|
'';
|
||||||
|
|
||||||
meta = {
|
meta = plemoljp.meta // {
|
||||||
description = "Composite font of IBM Plex Mono, IBM Plex Sans JP and hidden full-width space";
|
description = "Composite font of IBM Plex Mono, IBM Plex Sans JP and hidden full-width space";
|
||||||
homepage = "https://github.com/yuru7/PlemolJP";
|
|
||||||
license = lib.licenses.ofl;
|
|
||||||
platforms = lib.platforms.all;
|
|
||||||
maintainers = with lib.maintainers; [ kachick ];
|
|
||||||
};
|
};
|
||||||
}
|
})
|
||||||
|
|||||||
@@ -1,15 +1,18 @@
|
|||||||
{
|
{
|
||||||
lib,
|
|
||||||
stdenvNoCC,
|
stdenvNoCC,
|
||||||
fetchzip,
|
fetchzip,
|
||||||
|
plemoljp,
|
||||||
}:
|
}:
|
||||||
|
|
||||||
stdenvNoCC.mkDerivation rec {
|
stdenvNoCC.mkDerivation (finalAttrs: {
|
||||||
pname = "plemoljp-nf";
|
pname = "plemoljp-nf";
|
||||||
version = "3.0.0";
|
|
||||||
|
# plemoljp's updateScript also updates this version.
|
||||||
|
# nixpkgs-update: no auto update
|
||||||
|
inherit (plemoljp) version;
|
||||||
|
|
||||||
src = fetchzip {
|
src = fetchzip {
|
||||||
url = "https://github.com/yuru7/PlemolJP/releases/download/v${version}/PlemolJP_NF_v${version}.zip";
|
url = "https://github.com/yuru7/PlemolJP/releases/download/v${finalAttrs.version}/PlemolJP_NF_v${finalAttrs.version}.zip";
|
||||||
hash = "sha256-m8zR9ySl88DnVzG4fKJtc9WjSLDMLU4YDX+KXhcP2WU=";
|
hash = "sha256-m8zR9ySl88DnVzG4fKJtc9WjSLDMLU4YDX+KXhcP2WU=";
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -22,11 +25,7 @@ stdenvNoCC.mkDerivation rec {
|
|||||||
runHook postInstall
|
runHook postInstall
|
||||||
'';
|
'';
|
||||||
|
|
||||||
meta = {
|
meta = plemoljp.meta // {
|
||||||
description = "Composite font of IBM Plex Mono, IBM Plex Sans JP and nerd-fonts";
|
description = "Composite font of IBM Plex Mono, IBM Plex Sans JP and nerd-fonts";
|
||||||
homepage = "https://github.com/yuru7/PlemolJP";
|
|
||||||
license = lib.licenses.ofl;
|
|
||||||
platforms = lib.platforms.all;
|
|
||||||
maintainers = with lib.maintainers; [ kachick ];
|
|
||||||
};
|
};
|
||||||
}
|
})
|
||||||
|
|||||||
@@ -2,14 +2,15 @@
|
|||||||
lib,
|
lib,
|
||||||
stdenvNoCC,
|
stdenvNoCC,
|
||||||
fetchzip,
|
fetchzip,
|
||||||
|
nix-update-script,
|
||||||
}:
|
}:
|
||||||
|
|
||||||
stdenvNoCC.mkDerivation rec {
|
stdenvNoCC.mkDerivation (finalAttrs: {
|
||||||
pname = "plemoljp";
|
pname = "plemoljp";
|
||||||
version = "3.0.0";
|
version = "3.0.0";
|
||||||
|
|
||||||
src = fetchzip {
|
src = fetchzip {
|
||||||
url = "https://github.com/yuru7/PlemolJP/releases/download/v${version}/PlemolJP_v${version}.zip";
|
url = "https://github.com/yuru7/PlemolJP/releases/download/v${finalAttrs.version}/PlemolJP_v${finalAttrs.version}.zip";
|
||||||
hash = "sha256-R4zC1pnM72FVqBQ5d03z8vyVccsM163BE15m2hdEnSA=";
|
hash = "sha256-R4zC1pnM72FVqBQ5d03z8vyVccsM163BE15m2hdEnSA=";
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -24,6 +25,12 @@ stdenvNoCC.mkDerivation rec {
|
|||||||
runHook postInstall
|
runHook postInstall
|
||||||
'';
|
'';
|
||||||
|
|
||||||
|
passthru = {
|
||||||
|
updateScript = nix-update-script {
|
||||||
|
extraArgs = [ "--version-regex=^v([0-9.]+)$" ];
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
meta = {
|
meta = {
|
||||||
description = "Composite font of IBM Plex Mono and IBM Plex Sans JP";
|
description = "Composite font of IBM Plex Mono and IBM Plex Sans JP";
|
||||||
homepage = "https://github.com/yuru7/PlemolJP";
|
homepage = "https://github.com/yuru7/PlemolJP";
|
||||||
@@ -31,4 +38,4 @@ stdenvNoCC.mkDerivation rec {
|
|||||||
platforms = lib.platforms.all;
|
platforms = lib.platforms.all;
|
||||||
maintainers = with lib.maintainers; [ kachick ];
|
maintainers = with lib.maintainers; [ kachick ];
|
||||||
};
|
};
|
||||||
}
|
})
|
||||||
|
|||||||
Reference in New Issue
Block a user