mirror of
https://github.com/NixOS/nixpkgs.git
synced 2026-10-03 13:30:36 +00:00
After final improvements to the official formatter implementation,
this commit now performs the first treewide reformat of Nix files using it.
This is part of the implementation of RFC 166.
Only "inactive" files are reformatted, meaning only files that
aren't being touched by any PR with activity in the past 2 months.
This is to avoid conflicts for PRs that might soon be merged.
Later we can do a full treewide reformat to get the rest,
which should not cause as many conflicts.
A CI check has already been running for some time to ensure that new and
already-formatted files are formatted, so the files being reformatted here
should also stay formatted.
This commit was automatically created and can be verified using
nix-build a08b3a4d19.tar.gz \
--argstr baseRev 57b193d8dd
result/bin/apply-formatting $NIXPKGS_PATH
53 lines
1.4 KiB
Nix
53 lines
1.4 KiB
Nix
{
|
|
lib,
|
|
stdenv,
|
|
fetchFromGitHub,
|
|
fetchYarnDeps,
|
|
yarnConfigHook,
|
|
yarnBuildHook,
|
|
yarnInstallHook,
|
|
nodejs,
|
|
}:
|
|
|
|
stdenv.mkDerivation (finalAttrs: {
|
|
pname = "postlight-parser";
|
|
version = "2.2.3";
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "postlight";
|
|
repo = "parser";
|
|
rev = "v${finalAttrs.version}";
|
|
hash = "sha256-k6m95FHeJ+iiWSeY++1zds/bo1RtNXbnv2spaY/M+L0=";
|
|
};
|
|
|
|
offlineCache = fetchYarnDeps {
|
|
yarnLock = "${finalAttrs.src}/yarn.lock";
|
|
hash = "sha256-Vs8bfkhEbPv33ew//HBeDnpQcyWveByHi1gUsdl2CNI=";
|
|
};
|
|
|
|
nativeBuildInputs = [
|
|
yarnConfigHook
|
|
yarnBuildHook
|
|
yarnInstallHook
|
|
nodejs
|
|
];
|
|
# Upstream doesn't include a script in package.json that only builds without
|
|
# testing, and tests fail because they need to access online websites. Hence
|
|
# we use the builtin interface of yarnBuildHook to lint, and in `postBuild`
|
|
# we run the rest of commands needed to create the js files eventually
|
|
# distributed and wrapped by npmHooks.npmInstallHook
|
|
yarnBuildScript = "lint";
|
|
postBuild = ''
|
|
yarn --offline run rollup -c
|
|
'';
|
|
|
|
meta = {
|
|
changelog = "https://github.com/postlight/parser/blob/${finalAttrs.src.rev}/CHANGELOG.md";
|
|
homepage = "https://reader.postlight.com";
|
|
description = "Extracts the bits that humans care about from any URL you give it";
|
|
license = lib.licenses.mit;
|
|
maintainers = with lib.maintainers; [ viraptor ];
|
|
mainProgram = "postlight-parser";
|
|
};
|
|
})
|