parses paypal soap logs
1{ 2 description = "PayPal SOAP Log Parser"; 3 4 inputs = { 5 nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable"; 6 utils.url = "github:numtide/flake-utils"; 7 }; 8 9 outputs = { self, nixpkgs, utils }: 10 utils.lib.eachDefaultSystem (system: 11 let 12 pkgs = nixpkgs.legacyPackages.${system}; 13 14 # Build dependencies 15 buildInputs = with pkgs; [ 16 cmake 17 ]; 18 19 # Development dependencies 20 nativeBuildInputs = with pkgs; [ 21 clang-tools 22 bear 23 ]; 24 in 25 { 26 packages = rec { 27 soapdump = pkgs.stdenv.mkDerivation { 28 pname = "soapdump"; 29 version = "0.1.0"; 30 31 src = ./.; 32 33 nativeBuildInputs = [ pkgs.clang ]; 34 35 buildPhase = '' 36 mkdir -p bin 37 clang++ -std=c++17 -O3 -o bin/transaction-parser src/transaction-parser.cpp 38 ''; 39 40 installPhase = '' 41 mkdir -p $out/bin 42 cp bin/transaction-parser $out/bin/ 43 ''; 44 }; 45 46 default = soapdump; 47 }; 48 49 devShells.default = pkgs.mkShell { 50 inherit buildInputs nativeBuildInputs; 51 52 shellHook = '' 53 echo "SoapDump development environment loaded" 54 ''; 55 }; 56 57 apps = rec { 58 transaction-parser = { 59 type = "app"; 60 program = "${self.packages.${system}.default}/bin/transaction-parser"; 61 drv = self.packages.${system}.default; 62 }; 63 64 default = transaction-parser; 65 }; 66 } 67 ); 68}