Skip to content

Commit

Permalink
authoscope: refactor (NixOS#371250)
Browse files Browse the repository at this point in the history
  • Loading branch information
fabaff authored Jan 8, 2025
2 parents 5fb5316 + 5fd77b8 commit 1489dd8
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 16 deletions.
Original file line number Diff line number Diff line change
@@ -1,13 +1,14 @@
{
lib,
stdenv,
darwin,
fetchFromGitHub,
installShellFiles,
libcap,
nix-update-script,
openssl,
pkg-config,
rustPlatform,
Security,
zlib,
}:

Expand All @@ -17,9 +18,9 @@ rustPlatform.buildRustPackage rec {

src = fetchFromGitHub {
owner = "kpcyrd";
repo = pname;
rev = "v${version}";
sha256 = "sha256-SKgb/N249s0+Rb59moBT/MeFb4zAAElCMQJto0diyUk=";
repo = "authoscope";
tag = "v${version}";
hash = "sha256-SKgb/N249s0+Rb59moBT/MeFb4zAAElCMQJto0diyUk=";
};

cargoHash = "sha256-rSHuKy86iJNLAKSVcb7fn7A/cc75EOc97jGI14EaC6k=";
Expand All @@ -29,11 +30,15 @@ rustPlatform.buildRustPackage rec {
pkg-config
];

buildInputs = [
libcap
zlib
openssl
] ++ lib.optional stdenv.hostPlatform.isDarwin Security;
buildInputs =
[
libcap
zlib
openssl
]
++ lib.optional stdenv.hostPlatform.isDarwin [
darwin.apple_sdk.frameworks.Security
];

postInstall = ''
installManPage docs/${pname}.1
Expand All @@ -42,10 +47,13 @@ rustPlatform.buildRustPackage rec {
# Tests requires access to httpin.org
doCheck = false;

meta = with lib; {
passthru.updateScript = nix-update-script { };

meta = {
description = "Scriptable network authentication cracker";
homepage = "https://github.com/kpcyrd/authoscope";
license = with licenses; [ gpl3Plus ];
maintainers = with maintainers; [ fab ];
changelog = "https://github.com/kpcyrd/authoscope/releases/tag/v${version}";
license = lib.licenses.gpl3Plus;
maintainers = with lib.maintainers; [ fab ];
};
}
4 changes: 0 additions & 4 deletions pkgs/top-level/all-packages.nix
Original file line number Diff line number Diff line change
Expand Up @@ -1944,10 +1944,6 @@ with pkgs;
buildGoModule = buildGo123Module;
};

authoscope = callPackage ../tools/security/authoscope {
inherit (darwin.apple_sdk.frameworks) Security;
};

avahi = callPackage ../development/libraries/avahi { };

avahi-compat = callPackage ../development/libraries/avahi {
Expand Down

0 comments on commit 1489dd8

Please sign in to comment.