Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
1{ lib 2, fetchFromGitHub 3, python3 4}: 5 6let 7 py = python3.override { 8 packageOverrides = self: super: { 9 paramiko = super.paramiko.overridePythonAttrs (oldAttrs: rec { 10 version = "3.1.0"; 11 src = oldAttrs.src.override { 12 inherit version; 13 hash = "sha256-aVD6ymgZrNMhnUrmlKI8eofuONCE9wwXJLDA27i3V2k="; 14 }; 15 patches = [ ]; 16 propagatedBuildInputs = oldAttrs.propagatedBuildInputs ++ [ python3.pkgs.icecream ]; 17 }); 18 }; 19 }; 20in 21with py.pkgs; 22 23buildPythonApplication rec { 24 pname = "ssh-mitm"; 25 version = "3.0.2"; 26 format = "setuptools"; 27 28 src = fetchFromGitHub { 29 owner = pname; 30 repo = pname; 31 rev = "refs/tags/${version}"; 32 hash = "sha256-koV7g6ZmrrXk60rrDP8BwrDZk3shiyJigQgNcb4BASE="; 33 }; 34 35 propagatedBuildInputs = [ 36 argcomplete 37 colored 38 packaging 39 paramiko 40 pytz 41 pyyaml 42 rich 43 setuptools 44 sshpubkeys 45 ]; 46 47 # Module has no tests 48 doCheck = false; 49 50 pythonImportsCheck = [ 51 "sshmitm" 52 ]; 53 54 meta = with lib; { 55 description = "Tool for SSH security audits"; 56 homepage = "https://github.com/ssh-mitm/ssh-mitm"; 57 changelog = "https://github.com/ssh-mitm/ssh-mitm/blob/${version}/CHANGELOG.md"; 58 license = licenses.gpl3Only; 59 maintainers = with maintainers; [ fab ]; 60 }; 61}