Skip to content

Commit

Permalink
changeme: init at 1.2.3
Browse files Browse the repository at this point in the history
  • Loading branch information
Tochiaha committed Jul 18, 2024
1 parent fcef8d5 commit 05dfa5b
Showing 1 changed file with 101 additions and 0 deletions.
101 changes: 101 additions & 0 deletions pkgs/by-name/ch/changeme/package.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,101 @@
{
lib,
stdenv,
fetchFromGitHub,
python3Packages,
makeWrapper,
installShellFiles,
}:

python3Packages.buildPythonApplication rec {
pname = "changeme";
version = "1.2.3";
format = "other";

src = fetchFromGitHub {
owner = "ztgrace";
repo = "changeme";
rev = version;
hash = "sha256-nVHod8xEW05r3ZKfB3OkN2EMGWjfCSA9vOgx+J2OrFI=";
};

propagatedBuildInputs = [
makeWrapper
installShellFiles
];

build-system = with python3Packages; [ setuptools ];

dependencies = with python3Packages; [
responses
cerberus
mock-ssh-server
jinja2
logutils
lxml
netaddr
nose
paramiko
psycopg2
pymongo
pyodbc
pysnmp
python-libnmap
python-memcached
pyyaml
redis
rfc3339-validator
requests
selenium
shodan
sqlalchemy
tabulate
];

nativeCheckInputs = with python3Packages; [
pytest-responses
pytest-cov
pytest-mock
pytestCheckHook
];

<<<<<<< 8a52b9e3ea4df263d4c5099a374bba007e6e6d15
doCheck = false;

checkPhase = ''
=======
preCheck = ''
>>>>>>> changeme: init at 1.2.3
# allow to find the module helper during the test run
export PYTHONPATH=$PYTHONPATH:$PWD/tests
'';
installPhase = ''
runHook preInstall

mkdir -p $out/{bin,share/changeme}
cp -R * $out/share/changeme
installManPage changeme.1

runHook postInstall
'';
fixupPhase = ''
runHook preFixup

makeWrapper "${python3Packages.python.interpreter}" "$out/bin/changeme" \
--set PYTHONPATH "PYTHONPATH:$out/share/changeme/changeme.py" \
--add-flags "$out/share/changeme/changeme.py"

runHook postFixup
'';

meta = {
description = "A default credential scanner";
homepage = "https://github.com/ztgrace/changeme";
license = lib.licenses.gpl3Only;
maintainers = with lib.maintainers; [ tochiaha ];
mainProgram = "changeme";
platforms = lib.platforms.all;
};
}

0 comments on commit 05dfa5b

Please sign in to comment.