criticality-score: migrate from python3Packages; 1.0.8 -> 2.0.4 (#369711)

This commit is contained in:
OTABI Tomoya
2025-01-10 10:03:16 +09:00
committed by GitHub
4 changed files with 55 additions and 37 deletions
@@ -0,0 +1,54 @@
{
lib,
buildGoModule,
fetchFromGitHub,
versionCheckHook,
}:
buildGoModule rec {
pname = "criticality-score";
version = "2.0.4";
src = fetchFromGitHub {
owner = "ossf";
repo = "criticality_score";
tag = "v${version}";
hash = "sha256-p2ZXNpPFwIKPWDKCdEUZQvt/hvLQS9xjZaaquNTaUB0=";
};
proxyVendor = true;
vendorHash = "sha256-mKCwyAE/fI9ateKcrTLDAdULbT6pUpV0cMZ0X5bqT1M=";
ldflags = [
"-s"
"-w"
"-X=main.version=${version}"
"-X=main.commit=${src.tag}"
"-X=main.date=1970-01-01T00:00:00Z"
];
subPackages = [
"cmd/collect_signals"
"cmd/criticality_score"
"cmd/csv_transfer"
"cmd/enumerate_github"
"cmd/scorer"
];
doInstallCheck = true;
nativeInstallCheckInputs = [ versionCheckHook ];
versionCheckProgram = "${placeholder "out"}/bin/${meta.mainProgram}";
versionCheckProgramArg = [ "--version" ];
meta = {
description = "Gives criticality score for an open source project";
homepage = "https://github.com/ossf/criticality_score";
changelog = "https://github.com/ossf/criticality_score/releases/tag/v${version}";
license = lib.licenses.asl20;
maintainers = with lib.maintainers; [ wamserma ];
mainProgram = "criticality_score";
};
}
@@ -1,35 +0,0 @@
{
lib,
buildPythonPackage,
fetchPypi,
pygithub,
python-gitlab,
}:
buildPythonPackage rec {
pname = "criticality_score";
version = "1.0.8";
src = fetchPypi {
inherit pname version;
hash = "sha256-5XkVT0blnLG158a01jDfQl1Rx9U1LMsqaMjTdN7Q4QQ=";
};
propagatedBuildInputs = [
pygithub
python-gitlab
];
doCheck = false;
pythonImportsCheck = [ "criticality_score" ];
meta = with lib; {
description = "Python tool for computing the Open Source Project Criticality Score";
mainProgram = "criticality_score";
homepage = "https://github.com/ossf/criticality_score";
changelog = "https://github.com/ossf/criticality_score/releases/tag/v${version}";
license = licenses.asl20;
maintainers = with maintainers; [ wamserma ];
};
}
+1
View File
@@ -132,6 +132,7 @@ mapAliases ({
covCore = throw "covCore was renamed to cov-core and subsequently removed since it has ben unmaintained since 2014"; # added 2024-05-20
cov-core = throw "cov-core has been removed, it was archived and unmaintained since 2014"; # added 2024-05-21
cozy = throw "cozy was removed because it was not actually https://pypi.org/project/Cozy/."; # added 2022-01-14
criticality-score = throw "use pkgs.criticality-score instead"; # added 2024-12-31
cryptacular = throw "cryptacular was removed, because it was disabled on all python version since 3.6 and last updated in 2021"; # Added 2024-05-13
cryptography_vectors = "cryptography_vectors is no longer exposed in python*Packages because it is used for testing cryptography only."; # Added 2022-03-23
cx_Freeze = cx-freeze; # added 2023-08-02
-2
View File
@@ -2728,8 +2728,6 @@ self: super: with self; {
credstash = callPackage ../development/python-modules/credstash { };
criticality-score = callPackage ../development/python-modules/criticality-score { };
crocoddyl = toPythonModule (pkgs.crocoddyl.override {
pythonSupport = true;
python3Packages = self;