From 998dac69c66351d4c6877955c83040af8c4c39b9 Mon Sep 17 00:00:00 2001 From: octodi Date: Sun, 14 Jan 2024 21:15:05 +0530 Subject: [PATCH 1/2] altdns: init at unstable-2021-09-09 Update package.nix Co-Authored-By: Fabian Affolter Co-Authored-By: Arthur <150680976+arthsmn@users.noreply.github.com> --- pkgs/by-name/al/altdns/package.nix | 53 ++++++++++++++++++++++++++++++ 1 file changed, 53 insertions(+) create mode 100644 pkgs/by-name/al/altdns/package.nix diff --git a/pkgs/by-name/al/altdns/package.nix b/pkgs/by-name/al/altdns/package.nix new file mode 100644 index 000000000000..7b019f35109b --- /dev/null +++ b/pkgs/by-name/al/altdns/package.nix @@ -0,0 +1,53 @@ +{ lib +, python3 +, fetchFromGitHub +}: + +python3.pkgs.buildPythonApplication { + pname = "altdns"; + version = "unstable-2021-09-09"; + pyproject = true; + + src = fetchFromGitHub { + owner = "infosec-au"; + repo = "altdns"; + rev = "8c1de0fa8365153832bb58d74475caa15d2d077a"; + hash = "sha256-ElY6AZ7IBnOh7sRWNSQNmq7AYGlnjvYRn8/U+29BwWA="; + }; + + nativeBuildInputs = with python3.pkgs; [ + setuptools + ]; + + propagatedBuildInputs = with python3.pkgs; [ + dnspython + termcolor + tldextract + ]; + + prePatch = '' + substituteInPlace requirements.txt \ + --replace "argparse" "" + substituteInPlace setup.py \ + --replace "argparse" "" + ''; + + postInstall = '' + cp $src/words.txt $out/ + ''; + + # Project has no tests + doCheck = false; + + pythonImportsCheck = [ + "altdns" + ]; + + meta = with lib; { + description = "Generates permutations, alterations and mutations of subdomains and then resolves them"; + homepage = "https://github.com/infosec-au/altdns"; + license = licenses.asl20; + maintainers = with maintainers; [ octodi ]; + mainProgram = "altdns"; + }; +} From 0358cfe0b517606c935626324f5dee2fe66b95fb Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Thu, 25 Apr 2024 12:36:48 +0200 Subject: [PATCH 2/2] altdns: refactor --- pkgs/by-name/al/altdns/package.nix | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/pkgs/by-name/al/altdns/package.nix b/pkgs/by-name/al/altdns/package.nix index 7b019f35109b..839173efa64d 100644 --- a/pkgs/by-name/al/altdns/package.nix +++ b/pkgs/by-name/al/altdns/package.nix @@ -5,7 +5,7 @@ python3.pkgs.buildPythonApplication { pname = "altdns"; - version = "unstable-2021-09-09"; + version = "1.0.2-unstable-2021-09-09"; pyproject = true; src = fetchFromGitHub { @@ -15,23 +15,23 @@ python3.pkgs.buildPythonApplication { hash = "sha256-ElY6AZ7IBnOh7sRWNSQNmq7AYGlnjvYRn8/U+29BwWA="; }; - nativeBuildInputs = with python3.pkgs; [ + prePatch = '' + substituteInPlace requirements.txt \ + --replace-fail "argparse" "" + substituteInPlace setup.py \ + --replace-fail "argparse" "" + ''; + + build-system = with python3.pkgs; [ setuptools ]; - propagatedBuildInputs = with python3.pkgs; [ + dependencies = with python3.pkgs; [ dnspython termcolor tldextract ]; - prePatch = '' - substituteInPlace requirements.txt \ - --replace "argparse" "" - substituteInPlace setup.py \ - --replace "argparse" "" - ''; - postInstall = '' cp $src/words.txt $out/ '';