11 stdenv.mkDerivation (finalAttrs: {
12 pname = "postlight-parser";
15 src = fetchFromGitHub {
18 rev = "v${finalAttrs.version}";
19 hash = "sha256-k6m95FHeJ+iiWSeY++1zds/bo1RtNXbnv2spaY/M+L0=";
22 offlineCache = fetchYarnDeps {
23 yarnLock = "${finalAttrs.src}/yarn.lock";
24 hash = "sha256-Vs8bfkhEbPv33ew//HBeDnpQcyWveByHi1gUsdl2CNI=";
31 npmHooks.npmInstallHook
33 # Upstream doesn't include a script in package.json that only builds without
34 # testing, and tests fail because they need to access online websites. Hence
35 # we use the builtin interface of yarnBuildHook to lint, and in `postBuild`
36 # we run the rest of commands needed to create the js files eventually
37 # distributed and wrapped by npmHooks.npmInstallHook
38 yarnBuildScript = "lint";
40 yarn --offline run rollup -c
42 # Tries to download stuff from the internet in this phase.
46 changelog = "https://github.com/postlight/parser/blob/${finalAttrs.src.rev}/CHANGELOG.md";
47 homepage = "https://reader.postlight.com";
48 description = "Extracts the bits that humans care about from any URL you give it";
49 license = lib.licenses.mit;
50 maintainers = with lib.maintainers; [ viraptor ];
51 mainProgram = "postlight-parser";