-
Notifications
You must be signed in to change notification settings - Fork 25
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Introduce own nix files for each demo tool under scripts/. This change allows clearly stating dependencies for each tool. This change is also necessary in case we later decide to move some of the tools now under `scripts/` directory to their own repositories. - From now on, the default.nix in the root of this repository is only for `sbomnix` and `nixgraph` which are the main tools currently maintained in this repository. Other tools under `scripts/` can still be used via the flakes.nix or the shell.nix. - Add flake output targets for `repology_cli` and `nix_outdated` apps. - Introduce basic tests for `repology_cli` and `nix_outdated`. - Get rid of the `use_scm_version=True` in setup.py and read the version number from VERSION file instead. With this change, we can also remove the postPatch hack from default.nix. - Remove travis.yml as it's no longer used. - Update nix flake lock file. - Bump sbomnix version to v1.4.5. Signed-off-by: Henri Rosten <[email protected]>
- Loading branch information
1 parent
1946007
commit 0cf311a
Showing
22 changed files
with
385 additions
and
95 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
1.4.5 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
# SPDX-FileCopyrightText: 2023 Technology Innovation Institute (TII) | ||
# | ||
# SPDX-License-Identifier: Apache-2.0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
# SPDX-FileCopyrightText: 2023 Technology Innovation Institute (TII) | ||
# | ||
# SPDX-License-Identifier: Apache-2.0 | ||
{ | ||
pkgs ? import <nixpkgs> {}, | ||
}: | ||
|
||
pkgs.stdenv.mkDerivation rec { | ||
doCheck = true; | ||
pname = "update-cpedict.sh"; | ||
version = pkgs.lib.removeSuffix "\n" (builtins.readFile ../../VERSION); | ||
src = ./update-cpedict.sh; | ||
|
||
path = pkgs.lib.makeBinPath ([ | ||
pkgs.coreutils | ||
pkgs.curl | ||
pkgs.gnugrep | ||
pkgs.gnused | ||
pkgs.gzip | ||
]); | ||
|
||
checkInputs = [ pkgs.shellcheck ]; | ||
buildInputs = [ pkgs.bash ]; | ||
unpackPhase = '' | ||
cp ${src} ${pname} | ||
''; | ||
checkPhase = '' | ||
shellcheck ${pname} | ||
''; | ||
installPhase = '' | ||
mkdir -p $out/bin | ||
cp ${pname} $out/bin/${pname} | ||
chmod +x $out/bin/${pname} | ||
''; | ||
} |
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
# SPDX-FileCopyrightText: 2023 Technology Innovation Institute (TII) | ||
# | ||
# SPDX-License-Identifier: Apache-2.0 | ||
{ | ||
pkgs ? import <nixpkgs> {}, | ||
pythonPackages ? pkgs.python3Packages, | ||
}: | ||
|
||
pythonPackages.buildPythonPackage rec { | ||
pname = "nix_outdated"; | ||
version = pkgs.lib.removeSuffix "\n" (builtins.readFile ../../VERSION); | ||
format = "setuptools"; | ||
|
||
src = ../../.; | ||
sbomnix = import ../../default.nix { pkgs=pkgs; }; | ||
repology_cli = import ../repology/repology_cli.nix { pkgs=pkgs; }; | ||
nix_visualize = import ../nixupdate/nix-visualize.nix { pkgs=pkgs; }; | ||
makeWrapperArgs = [ | ||
"--prefix PATH : ${pkgs.lib.makeBinPath [ sbomnix repology_cli nix_visualize ]}" | ||
]; | ||
|
||
propagatedBuildInputs = [ | ||
sbomnix | ||
]; | ||
|
||
postInstall = '' | ||
install -vD scripts/nixupdate/nix_outdated.py $out/bin/nix_outdated.py | ||
''; | ||
|
||
pythonImportsCheck = [ "sbomnix" ]; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
# SPDX-FileCopyrightText: 2023 Technology Innovation Institute (TII) | ||
# | ||
# SPDX-License-Identifier: Apache-2.0 | ||
|
||
# TODO: this should be in nixpkgs | ||
|
||
{ nixpkgs ? <nixpkgs> | ||
, pkgs ? import nixpkgs {} | ||
, pythonPackages ? pkgs.python3Packages | ||
, lib ? pkgs.lib | ||
}: | ||
|
||
pythonPackages.buildPythonPackage rec { | ||
version = "2.10.0"; | ||
pname = "pyrate-limiter"; | ||
format = "pyproject"; | ||
|
||
src = pkgs.fetchFromGitHub { | ||
owner = "vutran1710"; | ||
repo = "PyrateLimiter"; | ||
rev = "v${version}"; | ||
hash = "sha256-CPusPeyTS+QyWiMHsU0ii9ZxPuizsqv0wQy3uicrDw0="; | ||
}; | ||
|
||
propagatedBuildInputs = with pythonPackages; [ | ||
poetry-core | ||
]; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
# SPDX-FileCopyrightText: 2023 Technology Innovation Institute (TII) | ||
# | ||
# SPDX-License-Identifier: Apache-2.0 | ||
{ | ||
pkgs ? import <nixpkgs> {}, | ||
pythonPackages ? pkgs.python3Packages, | ||
}: | ||
|
||
pythonPackages.buildPythonPackage rec { | ||
pname = "repology_cli"; | ||
version = pkgs.lib.removeSuffix "\n" (builtins.readFile ../../VERSION); | ||
format = "setuptools"; | ||
|
||
src = ../../.; | ||
sbomnix = import ../../default.nix { pkgs=pkgs; }; | ||
makeWrapperArgs = [ | ||
"--prefix PATH : ${pkgs.lib.makeBinPath [ sbomnix ]}" | ||
]; | ||
|
||
requests-ratelimiter = import ./requests-ratelimiter.nix { pkgs=pkgs; }; | ||
|
||
propagatedBuildInputs = [ | ||
sbomnix | ||
requests-ratelimiter | ||
pythonPackages.beautifulsoup4 | ||
pythonPackages.requests | ||
pythonPackages.requests-cache | ||
pythonPackages.packaging | ||
]; | ||
|
||
postInstall = '' | ||
install -vD scripts/repology/repology_cli.py $out/bin/repology_cli.py | ||
''; | ||
|
||
pythonImportsCheck = [ "sbomnix" ]; | ||
} |
Oops, something went wrong.