From f71a753d66c25c1494cf89bdae4890ca6a3275d0 Mon Sep 17 00:00:00 2001 From: 0x61nas Date: Tue, 21 May 2024 12:49:06 +0300 Subject: [PATCH 1/2] maintainers: add anas --- maintainers/maintainer-list.nix | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/maintainers/maintainer-list.nix b/maintainers/maintainer-list.nix index df3308c01abf..6b3769b7c88c 100644 --- a/maintainers/maintainer-list.nix +++ b/maintainers/maintainer-list.nix @@ -1174,6 +1174,15 @@ githubId = 18249234; name = "Christopher Crouse"; }; + anas = { + email = "anas.elgarhy.dev@gmail.com"; + github = "0x61nas"; + githubId = 44965145; + name = "Anas Elgarhy"; + keys = [{ + fingerprint = "E10B D192 9231 08C7 3C35 7EC3 83E0 3DC6 F383 4086"; + }]; + }; AnatolyPopov = { email = "aipopov@live.ru"; github = "AnatolyPopov"; From 8f31c8a21416acdcb58c28f4f7c5e078d5e4e080 Mon Sep 17 00:00:00 2001 From: 0x61nas Date: Tue, 21 May 2024 13:20:27 +0300 Subject: [PATCH 2/2] flawz: init at 0.2.0 --- pkgs/by-name/fl/flawz/package.nix | 57 +++++++++++++++++++++++++++++++ 1 file changed, 57 insertions(+) create mode 100644 pkgs/by-name/fl/flawz/package.nix diff --git a/pkgs/by-name/fl/flawz/package.nix b/pkgs/by-name/fl/flawz/package.nix new file mode 100644 index 000000000000..504dd849b5d9 --- /dev/null +++ b/pkgs/by-name/fl/flawz/package.nix @@ -0,0 +1,57 @@ +{ lib +, fetchFromGitHub +, rustPlatform +, pkg-config +, openssl +, sqlite +, installShellFiles +, stdenv +}: + +rustPlatform.buildRustPackage rec { + pname = "flawz"; + version = "0.2.0"; + + src = fetchFromGitHub { + owner = "orhun"; + repo = "flawz"; + rev = "v${version}"; + hash = "sha256-eIZUKI/fdaSPHHEEaN/5s4I2LRX44FijUlKzzvuD42E="; + }; + + cargoHash = "sha256-UWjrVA5T78QLJtMug38y+egLnM+G7zmAIsNmqn2ZE5I="; + + nativeBuildInputs = [ pkg-config installShellFiles ]; + + buildInputs = [ openssl sqlite ]; + outputs = [ "out" "man" ]; + + postInstall = '' + export OUT_DIR=$(mktemp -d) + + # Generate the man pages + cargo run --bin flawz-mangen + installManPage $OUT_DIR/flawz.1 + + # Generate shell completions + cargo run --bin flawz-completions + installShellCompletion \ + --bash $OUT_DIR/flawz.bash \ + --fish $OUT_DIR/flawz.fish \ + --zsh $OUT_DIR/_flawz + + # Clean up temporary directory + rm -rf $OUT_DIR + ''; + + meta = { + description = "Terminal UI for browsing CVEs"; + homepage = "https://github.com/orhun/flawz"; + changelog = "https://github.com/orhun/flawz/releases/tag/v${version}"; + license = with lib.licenses; [ mit asl20 ]; + mainProgram = "flawz"; + maintainers = with lib.maintainers; [ anas ]; + platforms = with lib.platforms; unix ++ windows; + broken = stdenv.isDarwin; # needing some apple_sdk packages + }; +}