Hi,
I rely on netexec in my work. 1.4.0 is broken for one of my usecases and I need 1.5.0, but nix maintainer did not yet provide it. My first approach was to create such override:
environment.systemPackages = [
(pkgs.netexec.overrideAttrs (oldAttrs: {
version = "1.5.0";
src = pkgs.fetchFromGitHub {
owner = "Pennyw0rth";
repo = "NetExec";
rev = "v1.5.0";
hash = "sha256-...";
};
}))
];
Unfortunately this breaks due to the fact original nix package relies on nix supplied version of impacket which it patches and I donāt even want to think what other issues will I run into trying to unravel this. I was able to get around that by using this ugly flake:
{
description = "NetExec development environment";
inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
flake-utils.url = "github:numtide/flake-utils";
};
outputs =
{
self,
nixpkgs,
flake-utils,
}:
flake-utils.lib.eachDefaultSystem (
system:
let
pkgs = nixpkgs.legacyPackages.${system};
in
{
devShells.default = pkgs.mkShell {
packages = with pkgs; [
python314
poetry
pipx
openssl
];
};
}
);
}
And running pipx install . inside netexec repo from within nix develop shell. This is OK for desperate patching, when under pressure, but itās extremely annoying due to the fact nix develop uses vanilla bash. Is there a dead easy way, like a wrapper pkgs.justMakeItWorkFromPipx I could use to make a quick and dirty package? Or at least make the stuff built inside nix develop available as system-wide binary so I can run it in my normal shell configuration as if it was a part of the system (this would be preferable to avoid untangling issues with poetry2reasonablepackagemanagementsystem issues)?
Just to clarify: donāt care even if every single dependency is duplicated or other things are unoptimal. Just want a procedure to follow next time in such situation - preferably if it was agnostic to python ![]()
Thanks in advance ![]()