pana: init at 0.23.10 (#491086)
This commit is contained in:
@@ -0,0 +1,80 @@
|
||||
{
|
||||
lib,
|
||||
buildDartApplication,
|
||||
fetchFromGitHub,
|
||||
callPackage,
|
||||
makeWrapper,
|
||||
flutter,
|
||||
dart,
|
||||
}:
|
||||
buildDartApplication rec {
|
||||
pname = "pana";
|
||||
version = "0.23.10";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "dart-lang";
|
||||
repo = "pana";
|
||||
tag = version;
|
||||
hash = "sha256-opkHUmfFbFHD1Gfx055YGNnxMoFFsTZvd/8VRN90HGA=";
|
||||
};
|
||||
|
||||
dartEntryPoints = {
|
||||
"bin/pana" = "bin/pana.dart";
|
||||
};
|
||||
|
||||
pubspecLock = lib.importJSON ./pubspec.lock.json;
|
||||
|
||||
nativeBuildInputs = [ makeWrapper ];
|
||||
|
||||
postInstall = ''
|
||||
# 1. Create a directory in the store to hold the license text files
|
||||
mkdir -p $out/share/pana/spdx-licenses
|
||||
|
||||
# 2. Copy the .txt files from the source tree into the store
|
||||
# These are the files pana needs to perform license detection
|
||||
cp lib/src/third_party/spdx/licenses/*.txt $out/share/pana/spdx-licenses/
|
||||
|
||||
# 3. Wrap the binary to always know where its data is and
|
||||
# where the dart-sdk and flutter-sdk are
|
||||
wrapProgram $out/bin/pana \
|
||||
--set FLUTTER_ROOT "${flutter}" \
|
||||
--prefix PATH : "${
|
||||
lib.makeBinPath [
|
||||
dart
|
||||
flutter
|
||||
]
|
||||
}" \
|
||||
--add-flags "--dart-sdk ${dart} --flutter-sdk ${flutter} --license-data $out/share/pana/spdx-licenses"
|
||||
'';
|
||||
|
||||
passthru = {
|
||||
updateScript = lib.getExe (callPackage ./update.nix { });
|
||||
tests = callPackage ./tests.nix { };
|
||||
};
|
||||
|
||||
meta = {
|
||||
mainProgram = "pana";
|
||||
homepage = "https://pub.dev/packages/pana";
|
||||
description = "Package ANAlysis for Dart";
|
||||
longDescription = ''
|
||||
Package ANAlyzer - produce a report summarizing the health and quality of a Dart package.
|
||||
'';
|
||||
changelog = "https://pub.dev/packages/pana/changelog#${lib.replaceStrings [ "." ] [ "" ] version}";
|
||||
license = lib.licenses.bsd3;
|
||||
sourceProvenance = with lib.sourceTypes; [ fromSource ];
|
||||
identifiers.cpeParts =
|
||||
let
|
||||
versionSplit = lib.split "\\+" version;
|
||||
versionPart = lib.elemAt versionSplit 0;
|
||||
updatePart =
|
||||
if lib.count (x: lib.isList x) versionSplit > 0 then lib.elemAt versionSplit 2 else "*";
|
||||
in
|
||||
{
|
||||
vendor = "dart-lang";
|
||||
product = "pana";
|
||||
version = versionPart;
|
||||
update = updatePart;
|
||||
};
|
||||
maintainers = with lib.maintainers; [ KristijanZic ];
|
||||
};
|
||||
}
|
||||
@@ -0,0 +1,787 @@
|
||||
{
|
||||
"packages": {
|
||||
"_fe_analyzer_shared": {
|
||||
"dependency": "transitive",
|
||||
"description": {
|
||||
"name": "_fe_analyzer_shared",
|
||||
"sha256": "3b19a47f6ea7c2632760777c78174f47f6aec1e05f0cd611380d4593b8af1dbc",
|
||||
"url": "https://pub.dev"
|
||||
},
|
||||
"source": "hosted",
|
||||
"version": "96.0.0"
|
||||
},
|
||||
"analyzer": {
|
||||
"dependency": "direct main",
|
||||
"description": {
|
||||
"name": "analyzer",
|
||||
"sha256": "0c516bc4ad36a1a75759e54d5047cb9d15cded4459df01aa35a0b5ec7db2c2a0",
|
||||
"url": "https://pub.dev"
|
||||
},
|
||||
"source": "hosted",
|
||||
"version": "10.2.0"
|
||||
},
|
||||
"args": {
|
||||
"dependency": "direct main",
|
||||
"description": {
|
||||
"name": "args",
|
||||
"sha256": "d0481093c50b1da8910eb0bb301626d4d8eb7284aa739614d2b394ee09e3ea04",
|
||||
"url": "https://pub.dev"
|
||||
},
|
||||
"source": "hosted",
|
||||
"version": "2.7.0"
|
||||
},
|
||||
"async": {
|
||||
"dependency": "direct main",
|
||||
"description": {
|
||||
"name": "async",
|
||||
"sha256": "758e6d74e971c3e5aceb4110bfd6698efc7f501675bcfe0c775459a8140750eb",
|
||||
"url": "https://pub.dev"
|
||||
},
|
||||
"source": "hosted",
|
||||
"version": "2.13.0"
|
||||
},
|
||||
"boolean_selector": {
|
||||
"dependency": "transitive",
|
||||
"description": {
|
||||
"name": "boolean_selector",
|
||||
"sha256": "8aab1771e1243a5063b8b0ff68042d67334e3feab9e95b9490f9a6ebf73b42ea",
|
||||
"url": "https://pub.dev"
|
||||
},
|
||||
"source": "hosted",
|
||||
"version": "2.1.2"
|
||||
},
|
||||
"build": {
|
||||
"dependency": "direct dev",
|
||||
"description": {
|
||||
"name": "build",
|
||||
"sha256": "275bf6bb2a00a9852c28d4e0b410da1d833a734d57d39d44f94bfc895a484ec3",
|
||||
"url": "https://pub.dev"
|
||||
},
|
||||
"source": "hosted",
|
||||
"version": "4.0.4"
|
||||
},
|
||||
"build_config": {
|
||||
"dependency": "direct dev",
|
||||
"description": {
|
||||
"name": "build_config",
|
||||
"sha256": "4f64382b97504dc2fcdf487d5aae33418e08b4703fc21249e4db6d804a4d0187",
|
||||
"url": "https://pub.dev"
|
||||
},
|
||||
"source": "hosted",
|
||||
"version": "1.2.0"
|
||||
},
|
||||
"build_daemon": {
|
||||
"dependency": "transitive",
|
||||
"description": {
|
||||
"name": "build_daemon",
|
||||
"sha256": "bf05f6e12cfea92d3c09308d7bcdab1906cd8a179b023269eed00c071004b957",
|
||||
"url": "https://pub.dev"
|
||||
},
|
||||
"source": "hosted",
|
||||
"version": "4.1.1"
|
||||
},
|
||||
"build_runner": {
|
||||
"dependency": "direct dev",
|
||||
"description": {
|
||||
"name": "build_runner",
|
||||
"sha256": "39ad4ca8a2876779737c60e4228b4bcd35d4352ef7e14e47514093edc012c734",
|
||||
"url": "https://pub.dev"
|
||||
},
|
||||
"source": "hosted",
|
||||
"version": "2.11.1"
|
||||
},
|
||||
"build_verify": {
|
||||
"dependency": "direct dev",
|
||||
"description": {
|
||||
"name": "build_verify",
|
||||
"sha256": "3b17b59b6d66f9d3e6014996f089902d56cec5760e051c353cc387b9da577652",
|
||||
"url": "https://pub.dev"
|
||||
},
|
||||
"source": "hosted",
|
||||
"version": "3.1.1"
|
||||
},
|
||||
"build_version": {
|
||||
"dependency": "direct dev",
|
||||
"description": {
|
||||
"name": "build_version",
|
||||
"sha256": "1063066ec338c18f0629d01077c9315f92fae3e7e0e06d0dc10e8aa3145d44f5",
|
||||
"url": "https://pub.dev"
|
||||
},
|
||||
"source": "hosted",
|
||||
"version": "2.1.3"
|
||||
},
|
||||
"built_collection": {
|
||||
"dependency": "transitive",
|
||||
"description": {
|
||||
"name": "built_collection",
|
||||
"sha256": "376e3dd27b51ea877c28d525560790aee2e6fbb5f20e2f85d5081027d94e2100",
|
||||
"url": "https://pub.dev"
|
||||
},
|
||||
"source": "hosted",
|
||||
"version": "5.1.1"
|
||||
},
|
||||
"built_value": {
|
||||
"dependency": "transitive",
|
||||
"description": {
|
||||
"name": "built_value",
|
||||
"sha256": "6ae8a6435a8c6520c7077b107e77f1fb4ba7009633259a4d49a8afd8e7efc5e9",
|
||||
"url": "https://pub.dev"
|
||||
},
|
||||
"source": "hosted",
|
||||
"version": "8.12.4"
|
||||
},
|
||||
"checked_yaml": {
|
||||
"dependency": "transitive",
|
||||
"description": {
|
||||
"name": "checked_yaml",
|
||||
"sha256": "959525d3162f249993882720d52b7e0c833978df229be20702b33d48d91de70f",
|
||||
"url": "https://pub.dev"
|
||||
},
|
||||
"source": "hosted",
|
||||
"version": "2.0.4"
|
||||
},
|
||||
"cli_config": {
|
||||
"dependency": "transitive",
|
||||
"description": {
|
||||
"name": "cli_config",
|
||||
"sha256": "ac20a183a07002b700f0c25e61b7ee46b23c309d76ab7b7640a028f18e4d99ec",
|
||||
"url": "https://pub.dev"
|
||||
},
|
||||
"source": "hosted",
|
||||
"version": "0.2.0"
|
||||
},
|
||||
"cli_util": {
|
||||
"dependency": "direct main",
|
||||
"description": {
|
||||
"name": "cli_util",
|
||||
"sha256": "ff6785f7e9e3c38ac98b2fb035701789de90154024a75b6cb926445e83197d1c",
|
||||
"url": "https://pub.dev"
|
||||
},
|
||||
"source": "hosted",
|
||||
"version": "0.4.2"
|
||||
},
|
||||
"code_builder": {
|
||||
"dependency": "transitive",
|
||||
"description": {
|
||||
"name": "code_builder",
|
||||
"sha256": "6a6cab2ba4680d6423f34a9b972a4c9a94ebe1b62ecec4e1a1f2cba91fd1319d",
|
||||
"url": "https://pub.dev"
|
||||
},
|
||||
"source": "hosted",
|
||||
"version": "4.11.1"
|
||||
},
|
||||
"collection": {
|
||||
"dependency": "direct main",
|
||||
"description": {
|
||||
"name": "collection",
|
||||
"sha256": "2f5709ae4d3d59dd8f7cd309b4e023046b57d8a6c82130785d2b0e5868084e76",
|
||||
"url": "https://pub.dev"
|
||||
},
|
||||
"source": "hosted",
|
||||
"version": "1.19.1"
|
||||
},
|
||||
"convert": {
|
||||
"dependency": "transitive",
|
||||
"description": {
|
||||
"name": "convert",
|
||||
"sha256": "b30acd5944035672bc15c6b7a8b47d773e41e2f17de064350988c5d02adb1c68",
|
||||
"url": "https://pub.dev"
|
||||
},
|
||||
"source": "hosted",
|
||||
"version": "3.1.2"
|
||||
},
|
||||
"coverage": {
|
||||
"dependency": "transitive",
|
||||
"description": {
|
||||
"name": "coverage",
|
||||
"sha256": "5da775aa218eaf2151c721b16c01c7676fbfdd99cebba2bf64e8b807a28ff94d",
|
||||
"url": "https://pub.dev"
|
||||
},
|
||||
"source": "hosted",
|
||||
"version": "1.15.0"
|
||||
},
|
||||
"crypto": {
|
||||
"dependency": "direct main",
|
||||
"description": {
|
||||
"name": "crypto",
|
||||
"sha256": "c8ea0233063ba03258fbcf2ca4d6dadfefe14f02fab57702265467a19f27fadf",
|
||||
"url": "https://pub.dev"
|
||||
},
|
||||
"source": "hosted",
|
||||
"version": "3.0.7"
|
||||
},
|
||||
"csslib": {
|
||||
"dependency": "transitive",
|
||||
"description": {
|
||||
"name": "csslib",
|
||||
"sha256": "09bad715f418841f976c77db72d5398dc1253c21fb9c0c7f0b0b985860b2d58e",
|
||||
"url": "https://pub.dev"
|
||||
},
|
||||
"source": "hosted",
|
||||
"version": "1.0.2"
|
||||
},
|
||||
"dart_flutter_team_lints": {
|
||||
"dependency": "direct dev",
|
||||
"description": {
|
||||
"name": "dart_flutter_team_lints",
|
||||
"sha256": "ce0f23e2cf95cbd21766d17a7cf88584758b67fd77338d61f2ce77e3cf6d763c",
|
||||
"url": "https://pub.dev"
|
||||
},
|
||||
"source": "hosted",
|
||||
"version": "3.5.2"
|
||||
},
|
||||
"dart_style": {
|
||||
"dependency": "transitive",
|
||||
"description": {
|
||||
"name": "dart_style",
|
||||
"sha256": "6f6b30cba0301e7b38f32bdc9a6bdae6f5921a55f0a1eb9450e1e6515645dbb2",
|
||||
"url": "https://pub.dev"
|
||||
},
|
||||
"source": "hosted",
|
||||
"version": "3.1.6"
|
||||
},
|
||||
"file": {
|
||||
"dependency": "transitive",
|
||||
"description": {
|
||||
"name": "file",
|
||||
"sha256": "a3b4f84adafef897088c160faf7dfffb7696046cb13ae90b508c2cbc95d3b8d4",
|
||||
"url": "https://pub.dev"
|
||||
},
|
||||
"source": "hosted",
|
||||
"version": "7.0.1"
|
||||
},
|
||||
"fixnum": {
|
||||
"dependency": "transitive",
|
||||
"description": {
|
||||
"name": "fixnum",
|
||||
"sha256": "b6dc7065e46c974bc7c5f143080a6764ec7a4be6da1285ececdc37be96de53be",
|
||||
"url": "https://pub.dev"
|
||||
},
|
||||
"source": "hosted",
|
||||
"version": "1.1.1"
|
||||
},
|
||||
"frontend_server_client": {
|
||||
"dependency": "transitive",
|
||||
"description": {
|
||||
"name": "frontend_server_client",
|
||||
"sha256": "f64a0333a82f30b0cca061bc3d143813a486dc086b574bfb233b7c1372427694",
|
||||
"url": "https://pub.dev"
|
||||
},
|
||||
"source": "hosted",
|
||||
"version": "4.0.0"
|
||||
},
|
||||
"glob": {
|
||||
"dependency": "transitive",
|
||||
"description": {
|
||||
"name": "glob",
|
||||
"sha256": "c3f1ee72c96f8f78935e18aa8cecced9ab132419e8625dc187e1c2408efc20de",
|
||||
"url": "https://pub.dev"
|
||||
},
|
||||
"source": "hosted",
|
||||
"version": "2.1.3"
|
||||
},
|
||||
"graphs": {
|
||||
"dependency": "transitive",
|
||||
"description": {
|
||||
"name": "graphs",
|
||||
"sha256": "741bbf84165310a68ff28fe9e727332eef1407342fca52759cb21ad8177bb8d0",
|
||||
"url": "https://pub.dev"
|
||||
},
|
||||
"source": "hosted",
|
||||
"version": "2.3.2"
|
||||
},
|
||||
"html": {
|
||||
"dependency": "direct main",
|
||||
"description": {
|
||||
"name": "html",
|
||||
"sha256": "6d1264f2dffa1b1101c25a91dff0dc2daee4c18e87cd8538729773c073dbf602",
|
||||
"url": "https://pub.dev"
|
||||
},
|
||||
"source": "hosted",
|
||||
"version": "0.15.6"
|
||||
},
|
||||
"http": {
|
||||
"dependency": "direct main",
|
||||
"description": {
|
||||
"name": "http",
|
||||
"sha256": "87721a4a50b19c7f1d49001e51409bddc46303966ce89a65af4f4e6004896412",
|
||||
"url": "https://pub.dev"
|
||||
},
|
||||
"source": "hosted",
|
||||
"version": "1.6.0"
|
||||
},
|
||||
"http_multi_server": {
|
||||
"dependency": "transitive",
|
||||
"description": {
|
||||
"name": "http_multi_server",
|
||||
"sha256": "aa6199f908078bb1c5efb8d8638d4ae191aac11b311132c3ef48ce352fb52ef8",
|
||||
"url": "https://pub.dev"
|
||||
},
|
||||
"source": "hosted",
|
||||
"version": "3.2.2"
|
||||
},
|
||||
"http_parser": {
|
||||
"dependency": "transitive",
|
||||
"description": {
|
||||
"name": "http_parser",
|
||||
"sha256": "178d74305e7866013777bab2c3d8726205dc5a4dd935297175b19a23a2e66571",
|
||||
"url": "https://pub.dev"
|
||||
},
|
||||
"source": "hosted",
|
||||
"version": "4.1.2"
|
||||
},
|
||||
"io": {
|
||||
"dependency": "direct main",
|
||||
"description": {
|
||||
"name": "io",
|
||||
"sha256": "dfd5a80599cf0165756e3181807ed3e77daf6dd4137caaad72d0b7931597650b",
|
||||
"url": "https://pub.dev"
|
||||
},
|
||||
"source": "hosted",
|
||||
"version": "1.0.5"
|
||||
},
|
||||
"json_annotation": {
|
||||
"dependency": "direct main",
|
||||
"description": {
|
||||
"name": "json_annotation",
|
||||
"sha256": "cb09e7dac6210041fad964ed7fbee004f14258b4eca4040f72d1234062ace4c8",
|
||||
"url": "https://pub.dev"
|
||||
},
|
||||
"source": "hosted",
|
||||
"version": "4.11.0"
|
||||
},
|
||||
"json_serializable": {
|
||||
"dependency": "direct dev",
|
||||
"description": {
|
||||
"name": "json_serializable",
|
||||
"sha256": "44729f5c45748e6748f6b9a57ab8f7e4336edc8ae41fc295070e3814e616a6c0",
|
||||
"url": "https://pub.dev"
|
||||
},
|
||||
"source": "hosted",
|
||||
"version": "6.13.0"
|
||||
},
|
||||
"lints": {
|
||||
"dependency": "direct main",
|
||||
"description": {
|
||||
"name": "lints",
|
||||
"sha256": "12f842a479589fea194fe5c5a3095abc7be0c1f2ddfa9a0e76aed1dbd26a87df",
|
||||
"url": "https://pub.dev"
|
||||
},
|
||||
"source": "hosted",
|
||||
"version": "6.1.0"
|
||||
},
|
||||
"logging": {
|
||||
"dependency": "direct main",
|
||||
"description": {
|
||||
"name": "logging",
|
||||
"sha256": "c8245ada5f1717ed44271ed1c26b8ce85ca3228fd2ffdb75468ab01979309d61",
|
||||
"url": "https://pub.dev"
|
||||
},
|
||||
"source": "hosted",
|
||||
"version": "1.3.0"
|
||||
},
|
||||
"markdown": {
|
||||
"dependency": "direct main",
|
||||
"description": {
|
||||
"name": "markdown",
|
||||
"sha256": "935e23e1ff3bc02d390bad4d4be001208ee92cc217cb5b5a6c19bc14aaa318c1",
|
||||
"url": "https://pub.dev"
|
||||
},
|
||||
"source": "hosted",
|
||||
"version": "7.3.0"
|
||||
},
|
||||
"matcher": {
|
||||
"dependency": "transitive",
|
||||
"description": {
|
||||
"name": "matcher",
|
||||
"sha256": "dc0b7dc7651697ea4ff3e69ef44b0407ea32c487a39fff6a4004fa585e901861",
|
||||
"url": "https://pub.dev"
|
||||
},
|
||||
"source": "hosted",
|
||||
"version": "0.12.19"
|
||||
},
|
||||
"meta": {
|
||||
"dependency": "direct main",
|
||||
"description": {
|
||||
"name": "meta",
|
||||
"sha256": "9f29b9bcc8ee287b1a31e0d01be0eae99a930dbffdaecf04b3f3d82a969f296f",
|
||||
"url": "https://pub.dev"
|
||||
},
|
||||
"source": "hosted",
|
||||
"version": "1.18.1"
|
||||
},
|
||||
"mime": {
|
||||
"dependency": "transitive",
|
||||
"description": {
|
||||
"name": "mime",
|
||||
"sha256": "41a20518f0cb1256669420fdba0cd90d21561e560ac240f26ef8322e45bb7ed6",
|
||||
"url": "https://pub.dev"
|
||||
},
|
||||
"source": "hosted",
|
||||
"version": "2.0.0"
|
||||
},
|
||||
"node_preamble": {
|
||||
"dependency": "transitive",
|
||||
"description": {
|
||||
"name": "node_preamble",
|
||||
"sha256": "6e7eac89047ab8a8d26cf16127b5ed26de65209847630400f9aefd7cd5c730db",
|
||||
"url": "https://pub.dev"
|
||||
},
|
||||
"source": "hosted",
|
||||
"version": "2.0.2"
|
||||
},
|
||||
"package_config": {
|
||||
"dependency": "transitive",
|
||||
"description": {
|
||||
"name": "package_config",
|
||||
"sha256": "f096c55ebb7deb7e384101542bfba8c52696c1b56fca2eb62827989ef2353bbc",
|
||||
"url": "https://pub.dev"
|
||||
},
|
||||
"source": "hosted",
|
||||
"version": "2.2.0"
|
||||
},
|
||||
"path": {
|
||||
"dependency": "direct main",
|
||||
"description": {
|
||||
"name": "path",
|
||||
"sha256": "75cca69d1490965be98c73ceaea117e8a04dd21217b37b292c9ddbec0d955bc5",
|
||||
"url": "https://pub.dev"
|
||||
},
|
||||
"source": "hosted",
|
||||
"version": "1.9.1"
|
||||
},
|
||||
"pool": {
|
||||
"dependency": "transitive",
|
||||
"description": {
|
||||
"name": "pool",
|
||||
"sha256": "978783255c543aa3586a1b3c21f6e9d720eb315376a915872c61ef8b5c20177d",
|
||||
"url": "https://pub.dev"
|
||||
},
|
||||
"source": "hosted",
|
||||
"version": "1.5.2"
|
||||
},
|
||||
"pub_semver": {
|
||||
"dependency": "direct main",
|
||||
"description": {
|
||||
"name": "pub_semver",
|
||||
"sha256": "5bfcf68ca79ef689f8990d1160781b4bad40a3bd5e5218ad4076ddb7f4081585",
|
||||
"url": "https://pub.dev"
|
||||
},
|
||||
"source": "hosted",
|
||||
"version": "2.2.0"
|
||||
},
|
||||
"pubspec_parse": {
|
||||
"dependency": "direct main",
|
||||
"description": {
|
||||
"name": "pubspec_parse",
|
||||
"sha256": "0560ba233314abbed0a48a2956f7f022cce7c3e1e73df540277da7544cad4082",
|
||||
"url": "https://pub.dev"
|
||||
},
|
||||
"source": "hosted",
|
||||
"version": "1.5.0"
|
||||
},
|
||||
"retry": {
|
||||
"dependency": "direct main",
|
||||
"description": {
|
||||
"name": "retry",
|
||||
"sha256": "822e118d5b3aafed083109c72d5f484c6dc66707885e07c0fbcb8b986bba7efc",
|
||||
"url": "https://pub.dev"
|
||||
},
|
||||
"source": "hosted",
|
||||
"version": "3.1.2"
|
||||
},
|
||||
"safe_url_check": {
|
||||
"dependency": "direct main",
|
||||
"description": {
|
||||
"name": "safe_url_check",
|
||||
"sha256": "49a3e060a7869cbafc8f4845ca1ecbbaaa53179980a32f4fdfeab1607e90f41d",
|
||||
"url": "https://pub.dev"
|
||||
},
|
||||
"source": "hosted",
|
||||
"version": "1.1.2"
|
||||
},
|
||||
"shelf": {
|
||||
"dependency": "direct dev",
|
||||
"description": {
|
||||
"name": "shelf",
|
||||
"sha256": "e7dd780a7ffb623c57850b33f43309312fc863fb6aa3d276a754bb299839ef12",
|
||||
"url": "https://pub.dev"
|
||||
},
|
||||
"source": "hosted",
|
||||
"version": "1.4.2"
|
||||
},
|
||||
"shelf_packages_handler": {
|
||||
"dependency": "transitive",
|
||||
"description": {
|
||||
"name": "shelf_packages_handler",
|
||||
"sha256": "89f967eca29607c933ba9571d838be31d67f53f6e4ee15147d5dc2934fee1b1e",
|
||||
"url": "https://pub.dev"
|
||||
},
|
||||
"source": "hosted",
|
||||
"version": "3.0.2"
|
||||
},
|
||||
"shelf_static": {
|
||||
"dependency": "transitive",
|
||||
"description": {
|
||||
"name": "shelf_static",
|
||||
"sha256": "c87c3875f91262785dade62d135760c2c69cb217ac759485334c5857ad89f6e3",
|
||||
"url": "https://pub.dev"
|
||||
},
|
||||
"source": "hosted",
|
||||
"version": "1.1.3"
|
||||
},
|
||||
"shelf_web_socket": {
|
||||
"dependency": "transitive",
|
||||
"description": {
|
||||
"name": "shelf_web_socket",
|
||||
"sha256": "3632775c8e90d6c9712f883e633716432a27758216dfb61bd86a8321c0580925",
|
||||
"url": "https://pub.dev"
|
||||
},
|
||||
"source": "hosted",
|
||||
"version": "3.0.0"
|
||||
},
|
||||
"source_gen": {
|
||||
"dependency": "direct dev",
|
||||
"description": {
|
||||
"name": "source_gen",
|
||||
"sha256": "1d562a3c1f713904ebbed50d2760217fd8a51ca170ac4b05b0db490699dbac17",
|
||||
"url": "https://pub.dev"
|
||||
},
|
||||
"source": "hosted",
|
||||
"version": "4.2.0"
|
||||
},
|
||||
"source_helper": {
|
||||
"dependency": "transitive",
|
||||
"description": {
|
||||
"name": "source_helper",
|
||||
"sha256": "4a85e90b50694e652075cbe4575665539d253e6ec10e46e76b45368ab5e3caae",
|
||||
"url": "https://pub.dev"
|
||||
},
|
||||
"source": "hosted",
|
||||
"version": "1.3.10"
|
||||
},
|
||||
"source_map_stack_trace": {
|
||||
"dependency": "transitive",
|
||||
"description": {
|
||||
"name": "source_map_stack_trace",
|
||||
"sha256": "c0713a43e323c3302c2abe2a1cc89aa057a387101ebd280371d6a6c9fa68516b",
|
||||
"url": "https://pub.dev"
|
||||
},
|
||||
"source": "hosted",
|
||||
"version": "2.1.2"
|
||||
},
|
||||
"source_maps": {
|
||||
"dependency": "transitive",
|
||||
"description": {
|
||||
"name": "source_maps",
|
||||
"sha256": "190222579a448b03896e0ca6eca5998fa810fda630c1d65e2f78b3f638f54812",
|
||||
"url": "https://pub.dev"
|
||||
},
|
||||
"source": "hosted",
|
||||
"version": "0.10.13"
|
||||
},
|
||||
"source_span": {
|
||||
"dependency": "direct main",
|
||||
"description": {
|
||||
"name": "source_span",
|
||||
"sha256": "56a02f1f4cd1a2d96303c0144c93bd6d909eea6bee6bf5a0e0b685edbd4c47ab",
|
||||
"url": "https://pub.dev"
|
||||
},
|
||||
"source": "hosted",
|
||||
"version": "1.10.2"
|
||||
},
|
||||
"stack_trace": {
|
||||
"dependency": "transitive",
|
||||
"description": {
|
||||
"name": "stack_trace",
|
||||
"sha256": "8b27215b45d22309b5cddda1aa2b19bdfec9df0e765f2de506401c071d38d1b1",
|
||||
"url": "https://pub.dev"
|
||||
},
|
||||
"source": "hosted",
|
||||
"version": "1.12.1"
|
||||
},
|
||||
"stream_channel": {
|
||||
"dependency": "transitive",
|
||||
"description": {
|
||||
"name": "stream_channel",
|
||||
"sha256": "969e04c80b8bcdf826f8f16579c7b14d780458bd97f56d107d3950fdbeef059d",
|
||||
"url": "https://pub.dev"
|
||||
},
|
||||
"source": "hosted",
|
||||
"version": "2.1.4"
|
||||
},
|
||||
"stream_transform": {
|
||||
"dependency": "transitive",
|
||||
"description": {
|
||||
"name": "stream_transform",
|
||||
"sha256": "ad47125e588cfd37a9a7f86c7d6356dde8dfe89d071d293f80ca9e9273a33871",
|
||||
"url": "https://pub.dev"
|
||||
},
|
||||
"source": "hosted",
|
||||
"version": "2.1.1"
|
||||
},
|
||||
"string_scanner": {
|
||||
"dependency": "direct main",
|
||||
"description": {
|
||||
"name": "string_scanner",
|
||||
"sha256": "921cd31725b72fe181906c6a94d987c78e3b98c2e205b397ea399d4054872b43",
|
||||
"url": "https://pub.dev"
|
||||
},
|
||||
"source": "hosted",
|
||||
"version": "1.4.1"
|
||||
},
|
||||
"tar": {
|
||||
"dependency": "direct dev",
|
||||
"description": {
|
||||
"name": "tar",
|
||||
"sha256": "b338bacfd24dae6cf527acb4242003a71fc88ce183a9002376fabbc4ebda30c9",
|
||||
"url": "https://pub.dev"
|
||||
},
|
||||
"source": "hosted",
|
||||
"version": "2.0.2"
|
||||
},
|
||||
"term_glyph": {
|
||||
"dependency": "transitive",
|
||||
"description": {
|
||||
"name": "term_glyph",
|
||||
"sha256": "7f554798625ea768a7518313e58f83891c7f5024f88e46e7182a4558850a4b8e",
|
||||
"url": "https://pub.dev"
|
||||
},
|
||||
"source": "hosted",
|
||||
"version": "1.2.2"
|
||||
},
|
||||
"test": {
|
||||
"dependency": "direct main",
|
||||
"description": {
|
||||
"name": "test",
|
||||
"sha256": "280d6d890011ca966ad08df7e8a4ddfab0fb3aa49f96ed6de56e3521347a9ae7",
|
||||
"url": "https://pub.dev"
|
||||
},
|
||||
"source": "hosted",
|
||||
"version": "1.30.0"
|
||||
},
|
||||
"test_api": {
|
||||
"dependency": "transitive",
|
||||
"description": {
|
||||
"name": "test_api",
|
||||
"sha256": "8161c84903fd860b26bfdefb7963b3f0b68fee7adea0f59ef805ecca346f0c7a",
|
||||
"url": "https://pub.dev"
|
||||
},
|
||||
"source": "hosted",
|
||||
"version": "0.7.10"
|
||||
},
|
||||
"test_core": {
|
||||
"dependency": "transitive",
|
||||
"description": {
|
||||
"name": "test_core",
|
||||
"sha256": "0381bd1585d1a924763c308100f2138205252fb90c9d4eeaf28489ee65ccde51",
|
||||
"url": "https://pub.dev"
|
||||
},
|
||||
"source": "hosted",
|
||||
"version": "0.6.16"
|
||||
},
|
||||
"test_descriptor": {
|
||||
"dependency": "direct dev",
|
||||
"description": {
|
||||
"name": "test_descriptor",
|
||||
"sha256": "9ce468c97ae396e8440d26bb43763f84e2a2a5331813ee5a397cb4da481aaf9a",
|
||||
"url": "https://pub.dev"
|
||||
},
|
||||
"source": "hosted",
|
||||
"version": "2.0.2"
|
||||
},
|
||||
"test_process": {
|
||||
"dependency": "direct dev",
|
||||
"description": {
|
||||
"name": "test_process",
|
||||
"sha256": "ea79c090deffc87d8276a5d28bb498d080a9873be6b1074d9dcfb82eb87e138e",
|
||||
"url": "https://pub.dev"
|
||||
},
|
||||
"source": "hosted",
|
||||
"version": "2.1.1"
|
||||
},
|
||||
"typed_data": {
|
||||
"dependency": "transitive",
|
||||
"description": {
|
||||
"name": "typed_data",
|
||||
"sha256": "f9049c039ebfeb4cf7a7104a675823cd72dba8297f264b6637062516699fa006",
|
||||
"url": "https://pub.dev"
|
||||
},
|
||||
"source": "hosted",
|
||||
"version": "1.4.0"
|
||||
},
|
||||
"vm_service": {
|
||||
"dependency": "transitive",
|
||||
"description": {
|
||||
"name": "vm_service",
|
||||
"sha256": "45caa6c5917fa127b5dbcfbd1fa60b14e583afdc08bfc96dda38886ca252eb60",
|
||||
"url": "https://pub.dev"
|
||||
},
|
||||
"source": "hosted",
|
||||
"version": "15.0.2"
|
||||
},
|
||||
"watcher": {
|
||||
"dependency": "transitive",
|
||||
"description": {
|
||||
"name": "watcher",
|
||||
"sha256": "1398c9f081a753f9226febe8900fce8f7d0a67163334e1c94a2438339d79d635",
|
||||
"url": "https://pub.dev"
|
||||
},
|
||||
"source": "hosted",
|
||||
"version": "1.2.1"
|
||||
},
|
||||
"web": {
|
||||
"dependency": "transitive",
|
||||
"description": {
|
||||
"name": "web",
|
||||
"sha256": "868d88a33d8a87b18ffc05f9f030ba328ffefba92d6c127917a2ba740f9cfe4a",
|
||||
"url": "https://pub.dev"
|
||||
},
|
||||
"source": "hosted",
|
||||
"version": "1.1.1"
|
||||
},
|
||||
"web_socket": {
|
||||
"dependency": "transitive",
|
||||
"description": {
|
||||
"name": "web_socket",
|
||||
"sha256": "34d64019aa8e36bf9842ac014bb5d2f5586ca73df5e4d9bf5c936975cae6982c",
|
||||
"url": "https://pub.dev"
|
||||
},
|
||||
"source": "hosted",
|
||||
"version": "1.0.1"
|
||||
},
|
||||
"web_socket_channel": {
|
||||
"dependency": "transitive",
|
||||
"description": {
|
||||
"name": "web_socket_channel",
|
||||
"sha256": "d645757fb0f4773d602444000a8131ff5d48c9e47adfe9772652dd1a4f2d45c8",
|
||||
"url": "https://pub.dev"
|
||||
},
|
||||
"source": "hosted",
|
||||
"version": "3.0.3"
|
||||
},
|
||||
"webkit_inspection_protocol": {
|
||||
"dependency": "transitive",
|
||||
"description": {
|
||||
"name": "webkit_inspection_protocol",
|
||||
"sha256": "87d3f2333bb240704cd3f1c6b5b7acd8a10e7f0bc28c28dcf14e782014f4a572",
|
||||
"url": "https://pub.dev"
|
||||
},
|
||||
"source": "hosted",
|
||||
"version": "1.2.1"
|
||||
},
|
||||
"yaml": {
|
||||
"dependency": "direct main",
|
||||
"description": {
|
||||
"name": "yaml",
|
||||
"sha256": "b9da305ac7c39faa3f030eccd175340f968459dae4af175130b3fc47e40d76ce",
|
||||
"url": "https://pub.dev"
|
||||
},
|
||||
"source": "hosted",
|
||||
"version": "3.1.3"
|
||||
}
|
||||
},
|
||||
"sdks": {
|
||||
"dart": ">=3.10.0 <4.0.0"
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,148 @@
|
||||
{
|
||||
testers,
|
||||
pana,
|
||||
git,
|
||||
jq,
|
||||
}:
|
||||
let
|
||||
testPkgName = "dummy_pkg";
|
||||
|
||||
testLicense = ''
|
||||
MIT License
|
||||
|
||||
Copyright (c) 2026 The Nixpkgs Authors
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all
|
||||
copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
SOFTWARE.
|
||||
'';
|
||||
in
|
||||
{
|
||||
usage = testers.runCommand {
|
||||
name = "pana-usage-test";
|
||||
buildInputs = [ pana ];
|
||||
script = ''
|
||||
export HOME=$TMPDIR
|
||||
pana > output.txt 2>&1 || true
|
||||
if grep -q "Usage: pana" output.txt; then
|
||||
touch $out
|
||||
else
|
||||
echo "Usage string not found in output."
|
||||
exit 1
|
||||
fi
|
||||
'';
|
||||
};
|
||||
|
||||
# Comprehensive behavioral test
|
||||
json-output = testers.runCommand {
|
||||
name = "pana-json-test";
|
||||
buildInputs = [
|
||||
pana
|
||||
git
|
||||
jq
|
||||
];
|
||||
|
||||
script = ''
|
||||
# Nix sandbox environment setup
|
||||
export HOME=$TMPDIR
|
||||
export PUB_HOSTED_URL="http://localhost:0"
|
||||
|
||||
init_package() {
|
||||
# Initialize a valid Dart package structure
|
||||
mkdir -p my_package/lib my_package/example
|
||||
cd my_package
|
||||
|
||||
git init -b main
|
||||
git config user.email "test@example.com"
|
||||
git config user.name "Nix-Tester"
|
||||
|
||||
cat > pubspec.yaml <<EOF
|
||||
name: ${testPkgName}
|
||||
version: 1.0.0
|
||||
description: >-
|
||||
A comprehensive test package for Nixpkgs validation that meets
|
||||
all the professional documentation requirements for pana scoring.
|
||||
repository: https://github.com/nixos/nixpkgs
|
||||
environment:
|
||||
sdk: '>=3.0.0 <4.0.0'
|
||||
EOF
|
||||
|
||||
cat > lib/${testPkgName}.dart <<EOF
|
||||
/// A simple function to say hello.
|
||||
void hello() => print('hi');
|
||||
EOF
|
||||
|
||||
cat > example/main.dart <<EOF
|
||||
import 'package:${testPkgName}/${testPkgName}.dart';
|
||||
void main() => hello();
|
||||
EOF
|
||||
|
||||
echo "# Dummy Pkg" > README.md
|
||||
echo "## 1.0.0" > CHANGELOG.md
|
||||
cat > LICENSE <<EOF
|
||||
${testLicense}
|
||||
EOF
|
||||
|
||||
git add . && git commit -m "feat: initial package"
|
||||
}
|
||||
|
||||
determine_marks() {
|
||||
PKG_NAME=$(jq -r '.packageName' report.json)
|
||||
# Extract the first license identifier found
|
||||
LICENSE_ID=$(jq -r '.result.licenses[0].spdxIdentifier' report.json)
|
||||
# Extract the status of the documentation section
|
||||
DOC_STATUS=$(jq -r '.report.sections[] | select(.id == "documentation") | .status' report.json)
|
||||
|
||||
PASS="✅"
|
||||
FAIL="❌"
|
||||
|
||||
# Determine marks
|
||||
[[ "$PKG_NAME" == "${testPkgName}" ]] && MARK_NAME="$PASS" || MARK_NAME="$FAIL"
|
||||
[[ "$LICENSE_ID" == "MIT" ]] && MARK_LIC="$PASS" || MARK_LIC="$FAIL"
|
||||
[[ "$DOC_STATUS" == "passed" ]] && MARK_DOC="$PASS" || MARK_DOC="$FAIL"
|
||||
|
||||
echo "---------------------------------------"
|
||||
printf "%-10s %-20s %s\n" "Package:" "$PKG_NAME" "$MARK_NAME"
|
||||
printf "%-10s %-20s %s\n" "License:" "$LICENSE_ID" "$MARK_LIC"
|
||||
printf "%-10s %-20s %s\n" "Docs:" "$DOC_STATUS" "$MARK_DOC"
|
||||
echo "---------------------------------------"
|
||||
}
|
||||
|
||||
check_marks() {
|
||||
if [[ "$MARK_NAME" == "$PASS" && "$MARK_LIC" == "$PASS" && "$MARK_DOC" == "$PASS" ]]; then
|
||||
echo "Integration test passed successfully! 🚀"
|
||||
touch $out
|
||||
else
|
||||
echo "Integration test failed metadata verification! ⚠️"
|
||||
# Print specifically why it failed to the log
|
||||
jq -r '.report.sections[] | select(.status == "failed") | "Section [\(.id)]: \(.summary)"' report.json
|
||||
exit 1
|
||||
fi
|
||||
}
|
||||
|
||||
main() {
|
||||
init_package
|
||||
echo "Running pana analysis...🔍"
|
||||
pana --json . > report.json
|
||||
determine_marks
|
||||
check_marks
|
||||
}
|
||||
|
||||
main
|
||||
'';
|
||||
};
|
||||
}
|
||||
@@ -0,0 +1,61 @@
|
||||
{
|
||||
writeShellApplication,
|
||||
common-updater-scripts,
|
||||
nix-update,
|
||||
yq-go,
|
||||
dart,
|
||||
nix,
|
||||
}:
|
||||
let
|
||||
name = "update-pana";
|
||||
packageName = "pana";
|
||||
packageDir = toString ./.;
|
||||
in
|
||||
writeShellApplication {
|
||||
inherit name;
|
||||
runtimeInputs = [
|
||||
common-updater-scripts
|
||||
nix-update
|
||||
yq-go
|
||||
dart
|
||||
nix
|
||||
];
|
||||
text = ''
|
||||
pname="''${UPDATE_NIX_PNAME:-${packageName}}"
|
||||
|
||||
main() {
|
||||
old_version="''${UPDATE_NIX_OLD_VERSION:-$(get_version)}"
|
||||
nix-update "$pname" --version stable
|
||||
new_version=$(get_version)
|
||||
if [[ "$new_version" == "$old_version" ]]; then
|
||||
exit 0
|
||||
fi
|
||||
generate_lockfile
|
||||
}
|
||||
|
||||
get_version() {
|
||||
nix-instantiate --raw --eval --strict -A "$pname.version"
|
||||
}
|
||||
|
||||
generate_lockfile() {
|
||||
tmp_dir=$(mktemp -d)
|
||||
trap 'rm -rf "$tmp_dir"' EXIT
|
||||
|
||||
src=$(nix-build --no-link . -A "$pname.src")
|
||||
|
||||
cp -r "$src/." "$tmp_dir/"
|
||||
chmod -R +w "$tmp_dir"
|
||||
cd "$tmp_dir"
|
||||
|
||||
# Generate lockfile because it's not included in the source
|
||||
if ! test -f pubspec.lock; then
|
||||
dart pub get
|
||||
fi
|
||||
|
||||
# Convert to JSON
|
||||
yq -o=json . pubspec.lock > "${packageDir}/pubspec.lock.json"
|
||||
}
|
||||
|
||||
main
|
||||
'';
|
||||
}
|
||||
Reference in New Issue
Block a user