···
2
-
description = "PayPal SOAP Log Parser";
2
+
description = "SoapDump - A high-performance PayPal SOAP log parser";
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
6
-
utils.url = "github:numtide/flake-utils";
9
-
outputs = { self, nixpkgs, utils }:
10
-
utils.lib.eachDefaultSystem (system:
12
-
pkgs = nixpkgs.legacyPackages.${system};
14
-
# Build dependencies
15
-
buildInputs = with pkgs; [
19
-
# Development dependencies
20
-
nativeBuildInputs = with pkgs; [
8
+
outputs = { self, nixpkgs, ... }:
11
+
"x86_64-linux" # 64-bit Intel/AMD Linux
12
+
"aarch64-linux" # 64-bit ARM Linux
13
+
"x86_64-darwin" # 64-bit Intel macOS
14
+
"aarch64-darwin" # 64-bit ARM macOS
17
+
nixpkgs.lib.genAttrs allSystems (
20
+
pkgs = import nixpkgs { inherit system; };
25
+
packages = forAllSystems (
28
+
version = if self ? rev then self.rev else "0.1.0";
soapdump = pkgs.stdenv.mkDerivation {
33
-
nativeBuildInputs = [ pkgs.clang ];
34
+
nativeBuildInputs = with pkgs; [
37
-
clang++ -std=c++17 -O3 -o bin/soapdump src/soapdump.cpp
42
+
cmake --build build --config Release
42
-
cp bin/soapdump $out/bin/
47
+
cp build/soapdump $out/bin/
49
+
# Generate shell completions
50
+
mkdir -p completions
51
+
$out/bin/soapdump --help > /dev/null 2>&1 || true
53
+
# Install shell completions if they exist
54
+
if [ -f completions/soapdump.bash ]; then
55
+
installShellCompletion --bash completions/soapdump.bash
57
+
if [ -f completions/soapdump.fish ]; then
58
+
installShellCompletion --fish completions/soapdump.fish
60
+
if [ -f completions/soapdump.zsh ]; then
61
+
installShellCompletion --zsh completions/soapdump.zsh
65
+
mkdir -p $out/share/man/man1
66
+
$out/bin/soapdump --help | sed 's/^/ /' > $out/share/man/man1/soapdump.1
69
+
meta = with pkgs.lib; {
70
+
description = "A high-performance PayPal SOAP log parser";
71
+
homepage = "https://github.com/taciturnaxolotl/soapdump";
72
+
license = licenses.mit;
73
+
maintainers = with maintainers; [ taciturnaxolotl ];
74
+
platforms = platforms.linux ++ platforms.darwin;
49
-
devShells.default = pkgs.mkShell {
50
-
inherit buildInputs nativeBuildInputs;
53
-
echo "SoapDump development environment loaded"
83
+
apps = forAllSystems (
60
-
program = "${self.packages.${system}.default}/bin/soapdump";
61
-
drv = self.packages.${system}.default;
88
+
program = "${self.packages.${pkgs.system}.default}/bin/soapdump";
93
+
devShells = forAllSystems (
96
+
default = pkgs.mkShell {
97
+
buildInputs = with pkgs; [
103
+
echo "SoapDump development environment loaded"
109
+
formatter = forAllSystems ({ pkgs }: pkgs.nixfmt-tree);