{ inputs, lib, outputs, ... }@flakeArg: { pkgs, system, ... }@sysArg: let craneLib = inputs.crane.mkLib pkgs; in { librespot-auth = pkgs.callPackage ./librespot-auth { inherit craneLib; }; nft-update-addresses = pkgs.callPackage ./nft-update-addresses { }; secrix-wrapper = let secrixExe = outputs.apps.${system}.secrix.program; in pkgs.writeShellApplication { name = "secr"; text = '' secrix() { set -x exec ${secrixExe} "$@" } help() { echo "Usages:" echo " $0 [create|rekey|edit|encrypt] [ …] " echo " $0 decrypt [ …] " } main() { if [[ $# -lt 1 ]]; then help exit 0 fi cmd="$1" shift 1 case "$cmd" in help|-h|--help) help ;; create) secrix "$cmd" --all-users --system "$@" ;; rekey|edit) secrix "$cmd" --identity "$SECRIX_ID" --all-users --system "$@" ;; encrypt) secrix "$cmd" --all-users --system "$@" ;; decrypt) secrix "$cmd" --identity "$SECRIX_ID" "$@" ;; esac } main "$@" ''; }; }