Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
at devShellTools-shell 64 lines 1.3 kB view raw
1{ 2 lib, 3 fetchFromGitHub, 4 python3, 5}: 6 7let 8 version = "3.4.7"; 9in 10python3.pkgs.buildPythonApplication { 11 pname = "routersploit"; 12 inherit version; 13 pyproject = true; 14 15 src = fetchFromGitHub { 16 owner = "threat9"; 17 repo = "routersploit"; 18 tag = "v${version}"; 19 hash = "sha256-10NBSY/mYjOWoz2XCJ1UvXUIYUW4csRJHHtDlWMO420="; 20 }; 21 22 build-system = with python3.pkgs; [ setuptools ]; 23 24 dependencies = with python3.pkgs; [ 25 paramiko 26 pycryptodome 27 pysnmp 28 requests 29 setuptools 30 ]; 31 32 # Tests are out-dated and support for newer pysnmp is not implemented yet 33 doCheck = false; 34 35 nativeCheckInputs = with python3.pkgs; [ 36 pytest-xdist 37 pytestCheckHook 38 threat9-test-bed 39 ]; 40 41 postInstall = '' 42 mv $out/bin/rsf.py $out/bin/rsf 43 ''; 44 45 pythonImportsCheck = [ "routersploit" ]; 46 47 enabledTestPaths = [ 48 # Run the same tests as upstream does in the first round 49 "tests/core/" 50 "tests/test_exploit_scenarios.py" 51 "tests/test_module_info.py" 52 ]; 53 54 meta = { 55 description = "Exploitation Framework for Embedded Devices"; 56 homepage = "https://github.com/threat9/routersploit"; 57 license = lib.licenses.bsd3; 58 maintainers = with lib.maintainers; [ 59 fab 60 thtrf 61 ]; 62 mainProgram = "rsf"; 63 }; 64}