Skip to content

Commit

Permalink
criticality-score: migrate from python3Packages; 1.0.8 -> 2.0.4 (NixO…
Browse files Browse the repository at this point in the history
  • Loading branch information
natsukium authored Jan 10, 2025
2 parents 9f12943 + e617905 commit af83783
Show file tree
Hide file tree
Showing 4 changed files with 55 additions and 37 deletions.
54 changes: 54 additions & 0 deletions pkgs/by-name/cr/criticality-score/package.nix
Original file line number Diff line number Diff line change
@@ -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";
};
}
35 changes: 0 additions & 35 deletions pkgs/development/python-modules/criticality-score/default.nix

This file was deleted.

1 change: 1 addition & 0 deletions pkgs/top-level/python-aliases.nix
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 0 additions & 2 deletions pkgs/top-level/python-packages.nix
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit af83783

Please sign in to comment.