mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-16 06:45:16 +01:00
valeStyles: cleanup, format, refactor
Signed-off-by: Paul Meyer <49727155+katexochen@users.noreply.github.com>
This commit is contained in:
parent
53393cc14c
commit
df238ebe1d
1 changed files with 35 additions and 22 deletions
|
@ -1,34 +1,47 @@
|
|||
{ lib, stdenvNoCC, fetchFromGitHub, fetchzip, nix-update-script }:
|
||||
{
|
||||
lib,
|
||||
stdenvNoCC,
|
||||
fetchFromGitHub,
|
||||
nix-update-script,
|
||||
}:
|
||||
|
||||
let
|
||||
buildStyle =
|
||||
{ name
|
||||
, stylePath ? name
|
||||
, ...
|
||||
{
|
||||
name,
|
||||
stylePath ? name,
|
||||
...
|
||||
}@args:
|
||||
stdenvNoCC.mkDerivation ({
|
||||
pname = "vale-style-${lib.toLower name}";
|
||||
stdenvNoCC.mkDerivation (
|
||||
{
|
||||
pname = "vale-style-${lib.toLower name}";
|
||||
|
||||
dontConfigure = true;
|
||||
dontBuild = true;
|
||||
doCheck = false;
|
||||
dontFixup = true;
|
||||
dontConfigure = true;
|
||||
dontBuild = true;
|
||||
doCheck = false;
|
||||
dontFixup = true;
|
||||
|
||||
installPhase = ''
|
||||
runHook preInstall
|
||||
mkdir -p $out/share/vale/styles
|
||||
cp -R ${stylePath} "$out/share/vale/styles/${name}"
|
||||
runHook postInstall
|
||||
'';
|
||||
installPhase = ''
|
||||
runHook preInstall
|
||||
mkdir -p $out/share/vale/styles
|
||||
cp -R ${stylePath} "$out/share/vale/styles/${name}"
|
||||
runHook postInstall
|
||||
'';
|
||||
|
||||
passthru.updateScript = nix-update-script { };
|
||||
passthru.updateScript = nix-update-script { };
|
||||
|
||||
meta = {
|
||||
platforms = lib.platforms.all;
|
||||
maintainers = with lib.maintainers; [ katexochen ];
|
||||
} // (args.meta or { });
|
||||
} // removeAttrs args [ "meta" "name" ]);
|
||||
meta = {
|
||||
platforms = lib.platforms.all;
|
||||
maintainers = with lib.maintainers; [ katexochen ];
|
||||
} // (args.meta or { });
|
||||
}
|
||||
// removeAttrs args [
|
||||
"meta"
|
||||
"name"
|
||||
]
|
||||
);
|
||||
in
|
||||
|
||||
{
|
||||
alex = buildStyle rec {
|
||||
name = "alex";
|
||||
|
|
Loading…
Reference in a new issue