nixpkgs mirror (for testing) github.com/NixOS/nixpkgs
nix
at python-updates 52 lines 1.4 kB view raw
1{ 2 lib, 3 buildNpmPackage, 4 fetchFromGitHub, 5 markdownlint-cli2, 6 nix-update-script, 7 runCommand, 8}: 9 10buildNpmPackage rec { 11 pname = "markdownlint-cli2"; 12 version = "0.20.0"; 13 14 src = fetchFromGitHub { 15 owner = "DavidAnson"; 16 repo = "markdownlint-cli2"; 17 tag = "v${version}"; 18 hash = "sha256-wZfLTk7F9HZaRFvYEo5rT+k/ivNk0fU+p844LMO06ek="; 19 }; 20 21 npmDepsHash = "sha256-tWvweCpzopItgfhpiBHUcpBvrJYCiq588WXzF9hvFfs="; 22 23 postPatch = '' 24 rm -f .npmrc 25 ln -s ${./package-lock.json} package-lock.json 26 ''; 27 28 dontNpmBuild = true; 29 30 passthru = { 31 tests = { 32 smoke = runCommand "${pname}-test" { nativeBuildInputs = [ markdownlint-cli2 ]; } '' 33 markdownlint-cli2 ${markdownlint-cli2}/lib/node_modules/markdownlint-cli2/CHANGELOG.md > $out 34 ''; 35 }; 36 updateScript = nix-update-script { 37 extraArgs = [ "--generate-lockfile" ]; 38 }; 39 }; 40 41 meta = { 42 changelog = "https://github.com/DavidAnson/markdownlint-cli2/blob/v${version}/CHANGELOG.md"; 43 description = "Fast, flexible, configuration-based command-line interface for linting Markdown/CommonMark files with the markdownlint library"; 44 homepage = "https://github.com/DavidAnson/markdownlint-cli2"; 45 license = lib.licenses.mit; 46 maintainers = with lib.maintainers; [ 47 anthonyroussel 48 natsukium 49 ]; 50 mainProgram = "markdownlint-cli2"; 51 }; 52}