In preparation for the deprecation of `stdenv.isX`. These shorthands are not conducive to cross-compilation because they hide the platforms. Darwin might get cross-compilation for which the continued usage of `stdenv.isDarwin` will get in the way One example of why this is bad and especially affects compiler packages https://www.github.com/NixOS/nixpkgs/pull/343059 There are too many files to go through manually but a treewide should get users thinking when they see a `hostPlatform.isX` in a place where it doesn't make sense. ``` fd --type f "\.nix" | xargs sd --fixed-strings "stdenv.is" "stdenv.hostPlatform.is" fd --type f "\.nix" | xargs sd --fixed-strings "stdenv'.is" "stdenv'.hostPlatform.is" fd --type f "\.nix" | xargs sd --fixed-strings "clangStdenv.is" "clangStdenv.hostPlatform.is" fd --type f "\.nix" | xargs sd --fixed-strings "gccStdenv.is" "gccStdenv.hostPlatform.is" fd --type f "\.nix" | xargs sd --fixed-strings "stdenvNoCC.is" "stdenvNoCC.hostPlatform.is" fd --type f "\.nix" | xargs sd --fixed-strings "inherit (stdenv) is" "inherit (stdenv.hostPlatform) is" fd --type f "\.nix" | xargs sd --fixed-strings "buildStdenv.is" "buildStdenv.hostPlatform.is" fd --type f "\.nix" | xargs sd --fixed-strings "effectiveStdenv.is" "effectiveStdenv.hostPlatform.is" fd --type f "\.nix" | xargs sd --fixed-strings "originalStdenv.is" "originalStdenv.hostPlatform.is" ```
85 lines
1.6 KiB
Nix
85 lines
1.6 KiB
Nix
{
|
|
lib,
|
|
stdenv,
|
|
arc4,
|
|
asn1crypto,
|
|
asn1tools,
|
|
asyauth,
|
|
asysocks,
|
|
buildPythonPackage,
|
|
cargo,
|
|
colorama,
|
|
fetchFromGitHub,
|
|
iconv,
|
|
minikerberos,
|
|
pillow,
|
|
pyperclip,
|
|
pythonOlder,
|
|
rustPlatform,
|
|
rustc,
|
|
setuptools-rust,
|
|
tqdm,
|
|
unicrypto,
|
|
winsspi,
|
|
}:
|
|
|
|
buildPythonPackage rec {
|
|
pname = "aardwolf";
|
|
version = "0.2.8";
|
|
format = "setuptools";
|
|
|
|
disabled = pythonOlder "3.7";
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "skelsec";
|
|
repo = "aardwolf";
|
|
rev = "refs/tags/${version}";
|
|
hash = "sha256-4kJsW0uwWfcgVruEdDw3QhbzfPDuLjmK+YvcLrgF4SI=";
|
|
};
|
|
|
|
cargoDeps = rustPlatform.fetchCargoTarball {
|
|
inherit src;
|
|
sourceRoot = "${src.name}/aardwolf/utils/rlers";
|
|
name = "${pname}-${version}";
|
|
hash = "sha256-i7fmdWOseRQGdvdBnlGi+lgWvhC2WFI2FwXU9JywYsc=";
|
|
};
|
|
|
|
cargoRoot = "aardwolf/utils/rlers";
|
|
|
|
nativeBuildInputs = [
|
|
rustPlatform.cargoSetupHook
|
|
setuptools-rust
|
|
cargo
|
|
rustc
|
|
];
|
|
|
|
propagatedBuildInputs = [
|
|
arc4
|
|
asn1crypto
|
|
asn1tools
|
|
asyauth
|
|
asysocks
|
|
colorama
|
|
minikerberos
|
|
pillow
|
|
pyperclip
|
|
tqdm
|
|
unicrypto
|
|
winsspi
|
|
] ++ lib.optionals (stdenv.hostPlatform.isDarwin) [ iconv ];
|
|
|
|
# Module doesn't have tests
|
|
doCheck = false;
|
|
|
|
pythonImportsCheck = [ "aardwolf" ];
|
|
|
|
meta = with lib; {
|
|
description = "Asynchronous RDP protocol implementation";
|
|
mainProgram = "ardpscan";
|
|
homepage = "https://github.com/skelsec/aardwolf";
|
|
changelog = "https://github.com/skelsec/aardwolf/releases/tag/${version}";
|
|
license = with licenses; [ mit ];
|
|
maintainers = with maintainers; [ fab ];
|
|
};
|
|
}
|