Monorepo for wisp.place. A static site hosting service built on top of the AT Protocol. wisp.place
87
fork

Configure Feed

Select the types of activity you want to include in your feed.

BIG changes

+254 -161
+3 -3
apps/main-app/public/editor/tabs/CLITab.tsx
··· 71 71 </a> 72 72 <div className="text-xs text-muted-foreground"> 73 73 <span className="font-mono"> 74 - SHA-1: 69de880e160a2f26e3c26b7c28030457913754dc 74 + SHA-1: 912f8f99c2b55ca6ad75e0a89903688bd2c1cb4b 75 75 </span> 76 76 </div> 77 77 </div> ··· 87 87 </a> 88 88 <div className="text-xs text-muted-foreground"> 89 89 <span className="font-mono"> 90 - SHA-1: 026189f2c10077a2be4705102e169e66cb207f84 90 + SHA-1: ef1992d8850f8fef1d719e4e8fab5431475c352e 91 91 </span> 92 92 </div> 93 93 </div> ··· 103 103 </a> 104 104 <div className="text-xs text-muted-foreground"> 105 105 <span className="font-mono"> 106 - SHA-1: 4777cff07558906717402484a3313359880eae96 106 + SHA-1: 3018dde8fec495abcae044079564ced93cdeb4f8 107 107 </span> 108 108 </div> 109 109 </div>
-59
backup.nix
··· 1 - { 2 - inputs.nixpkgs.url = "github:nixos/nixpkgs/nixpkgs-unstable"; 3 - inputs.nci.url = "github:90-008/nix-cargo-integration"; 4 - inputs.nci.inputs.nixpkgs.follows = "nixpkgs"; 5 - inputs.parts.url = "github:hercules-ci/flake-parts"; 6 - inputs.parts.inputs.nixpkgs-lib.follows = "nixpkgs"; 7 - inputs.fenix = { 8 - url = "github:nix-community/fenix"; 9 - inputs.nixpkgs.follows = "nixpkgs"; 10 - }; 11 - 12 - outputs = inputs @ { 13 - parts, 14 - nci, 15 - ... 16 - }: 17 - parts.lib.mkFlake {inherit inputs;} { 18 - systems = ["x86_64-linux" "aarch64-darwin"]; 19 - imports = [ 20 - nci.flakeModule 21 - ./crates.nix 22 - ]; 23 - perSystem = { 24 - pkgs, 25 - config, 26 - ... 27 - }: let 28 - crateOutputs = config.nci.outputs."wisp-cli"; 29 - mkRenamedPackage = name: pkg: isWindows: pkgs.runCommand name {} '' 30 - mkdir -p $out/bin 31 - if [ -f ${pkg}/bin/wisp-cli.exe ]; then 32 - cp ${pkg}/bin/wisp-cli.exe $out/bin/${name} 33 - elif [ -f ${pkg}/bin/wisp-cli ]; then 34 - cp ${pkg}/bin/wisp-cli $out/bin/${name} 35 - else 36 - echo "Error: Could not find wisp-cli binary in ${pkg}/bin/" 37 - ls -la ${pkg}/bin/ || true 38 - exit 1 39 - fi 40 - ''; 41 - in { 42 - devShells.default = crateOutputs.devShell; 43 - packages.default = crateOutputs.packages.release; 44 - packages.wisp-cli-x86_64-linux = mkRenamedPackage "wisp-cli-x86_64-linux" crateOutputs.packages.release false; 45 - packages.wisp-cli-aarch64-linux = mkRenamedPackage "wisp-cli-aarch64-linux" crateOutputs.allTargets."aarch64-unknown-linux-gnu".packages.release false; 46 - packages.wisp-cli-x86_64-windows = mkRenamedPackage "wisp-cli-x86_64-windows.exe" crateOutputs.allTargets."x86_64-pc-windows-gnu".packages.release true; 47 - packages.wisp-cli-aarch64-darwin = mkRenamedPackage "wisp-cli-aarch64-darwin" crateOutputs.allTargets."aarch64-apple-darwin".packages.release false; 48 - packages.all = pkgs.symlinkJoin { 49 - name = "wisp-cli-all"; 50 - paths = [ 51 - config.packages.wisp-cli-x86_64-linux 52 - config.packages.wisp-cli-aarch64-linux 53 - config.packages.wisp-cli-x86_64-windows 54 - config.packages.wisp-cli-aarch64-darwin 55 - ]; 56 - }; 57 - }; 58 - }; 59 - }
+1 -1
cli/build-macos.sh
··· 12 12 13 13 echo "Building macOS arm64 binary." 14 14 RUSTFLAGS="-C target-feature=+crt-static" cargo build --release --target aarch64-apple-darwin 15 - cp target/aarch64-apple-darwin/release/wisp-cli binaries/wisp-cli-macos-arm64 15 + cp target/aarch64-apple-darwin/release/wisp-cli binaries/wisp-cli-aarch64-darwin
-90
crates.nix
··· 1 - {...}: { 2 - perSystem = { 3 - pkgs, 4 - config, 5 - lib, 6 - inputs', 7 - ... 8 - }: { 9 - # declare projects 10 - nci.projects."wisp-place-cli" = { 11 - path = ./cli; 12 - export = false; 13 - }; 14 - nci.toolchains.mkBuild = _: 15 - with inputs'.fenix.packages; 16 - combine [ 17 - minimal.rustc 18 - minimal.cargo 19 - targets.x86_64-pc-windows-gnu.latest.rust-std 20 - targets.x86_64-unknown-linux-gnu.latest.rust-std 21 - targets.aarch64-apple-darwin.latest.rust-std 22 - targets.aarch64-unknown-linux-gnu.latest.rust-std 23 - ]; 24 - # configure crates 25 - nci.crates."wisp-cli" = { 26 - profiles = { 27 - dev.runTests = false; 28 - release.runTests = false; 29 - }; 30 - targets."x86_64-unknown-linux-gnu" = let 31 - targetPkgs = pkgs.pkgsCross.gnu64; 32 - targetCC = targetPkgs.stdenv.cc; 33 - targetCargoEnvVarTarget = targetPkgs.stdenv.hostPlatform.rust.cargoEnvVarTarget; 34 - in rec { 35 - default = true; 36 - depsDrvConfig.mkDerivation = { 37 - nativeBuildInputs = [targetCC]; 38 - }; 39 - depsDrvConfig.env = rec { 40 - TARGET_CC = "${targetCC.targetPrefix}cc"; 41 - "CARGO_TARGET_${targetCargoEnvVarTarget}_LINKER" = TARGET_CC; 42 - }; 43 - drvConfig = depsDrvConfig; 44 - }; 45 - targets."x86_64-pc-windows-gnu" = let 46 - targetPkgs = pkgs.pkgsCross.mingwW64; 47 - targetCC = targetPkgs.stdenv.cc; 48 - targetCargoEnvVarTarget = targetPkgs.stdenv.hostPlatform.rust.cargoEnvVarTarget; 49 - in rec { 50 - depsDrvConfig.mkDerivation = { 51 - nativeBuildInputs = [targetCC]; 52 - buildInputs = with targetPkgs; [windows.pthreads]; 53 - }; 54 - depsDrvConfig.env = rec { 55 - TARGET_CC = "${targetCC.targetPrefix}cc"; 56 - "CARGO_TARGET_${targetCargoEnvVarTarget}_LINKER" = TARGET_CC; 57 - }; 58 - drvConfig = depsDrvConfig; 59 - }; 60 - targets."aarch64-apple-darwin" = let 61 - targetPkgs = pkgs.pkgsCross.aarch64-darwin; 62 - targetCC = targetPkgs.stdenv.cc; 63 - targetCargoEnvVarTarget = targetPkgs.stdenv.hostPlatform.rust.cargoEnvVarTarget; 64 - in rec { 65 - depsDrvConfig.mkDerivation = { 66 - nativeBuildInputs = [targetCC]; 67 - }; 68 - depsDrvConfig.env = rec { 69 - TARGET_CC = "${targetCC.targetPrefix}cc"; 70 - "CARGO_TARGET_${targetCargoEnvVarTarget}_LINKER" = TARGET_CC; 71 - }; 72 - drvConfig = depsDrvConfig; 73 - }; 74 - targets."aarch64-unknown-linux-gnu" = let 75 - targetPkgs = pkgs.pkgsCross.aarch64-multiplatform; 76 - targetCC = targetPkgs.stdenv.cc; 77 - targetCargoEnvVarTarget = targetPkgs.stdenv.hostPlatform.rust.cargoEnvVarTarget; 78 - in rec { 79 - depsDrvConfig.mkDerivation = { 80 - nativeBuildInputs = [targetCC]; 81 - }; 82 - depsDrvConfig.env = rec { 83 - TARGET_CC = "${targetCC.targetPrefix}cc"; 84 - "CARGO_TARGET_${targetCargoEnvVarTarget}_LINKER" = TARGET_CC; 85 - }; 86 - drvConfig = depsDrvConfig; 87 - }; 88 - }; 89 - }; 90 - }
+8 -8
docs/src/content/docs/cli.md
··· 1 1 --- 2 - title: Wisp CLI 0.4.1 (alpha) 2 + title: Wisp CLI 0.5.0 (alpha) 3 3 description: Command-line tool for deploying static sites to the AT Protocol 4 4 --- 5 5 ··· 19 19 20 20 <div class="downloads"> 21 21 22 - <h2>Download v0.4.1</h2> 22 + <h2>Download v0.5.0</h2> 23 23 24 24 <a href="https://sites.wisp.place/nekomimi.pet/wisp-cli-binaries/wisp-cli-aarch64-darwin" class="download-link" download=""> 25 25 ··· 48 48 <h3 style="margin-top: 1.5rem; margin-bottom: 0.5rem;">SHA-1 Checksums</h3> 49 49 50 50 <pre style="font-size: 0.75rem; padding: 1rem;" class="language-bash" tabindex="0"><code class="language-bash"> 51 - 69de880e160a2f26e3c26b7c28030457913754dc wisp-cli-aarch64-darwin 51 + 912f8f99c2b55ca6ad75e0a89903688bd2c1cb4b wisp-cli-aarch64-darwin 52 52 53 - 026189f2c10077a2be4705102e169e66cb207f84 wisp-cli-aarch64-linux 53 + ef1992d8850f8fef1d719e4e8fab5431475c352e wisp-cli-aarch64-linux 54 54 55 - 4777cff07558906717402484a3313359880eae96 wisp-cli-x86_64-linux 55 + 3018dde8fec495abcae044079564ced93cdeb4f8 wisp-cli-x86_64-linux 56 56 57 57 d6bc789d7fd7c787e5520eb476cee70c97ccb3ce wisp-cli-x86_64-windows.exe 58 58 </code></pre> ··· 117 117 118 118 ```bash 119 119 # Download and make executable 120 - curl -O https://sites.wisp.place/nekomimi.pet/wisp-cli-binaries/wisp-cli-macos-arm64 121 - chmod +x wisp-cli-macos-arm64 120 + curl -O https://sites.wisp.place/nekomimi.pet/wisp-cli-binaries/wisp-cli-aarch64-darwin 121 + chmod +x wisp-cli-aarch64-darwin 122 122 123 123 # Deploy your site 124 - ./wisp-cli-macos-arm64 deploy your-handle.bsky.social \ 124 + ./wisp-cli-aarch64-darwin deploy your-handle.bsky.social \ 125 125 --path ./dist \ 126 126 --site my-site 127 127 ```
+82
flake.lock
··· 1 + { 2 + "nodes": { 3 + "flake-utils": { 4 + "inputs": { 5 + "systems": "systems" 6 + }, 7 + "locked": { 8 + "lastModified": 1731533236, 9 + "narHash": "sha256-l0KFg5HjrsfsO/JpG+r7fRrqm12kzFHyUHqHCVpMMbI=", 10 + "owner": "numtide", 11 + "repo": "flake-utils", 12 + "rev": "11707dc2f618dd54ca8739b309ec4fc024de578b", 13 + "type": "github" 14 + }, 15 + "original": { 16 + "owner": "numtide", 17 + "repo": "flake-utils", 18 + "type": "github" 19 + } 20 + }, 21 + "nixpkgs": { 22 + "locked": { 23 + "lastModified": 1769018530, 24 + "narHash": "sha256-MJ27Cy2NtBEV5tsK+YraYr2g851f3Fl1LpNHDzDX15c=", 25 + "owner": "NixOS", 26 + "repo": "nixpkgs", 27 + "rev": "88d3861acdd3d2f0e361767018218e51810df8a1", 28 + "type": "github" 29 + }, 30 + "original": { 31 + "owner": "NixOS", 32 + "ref": "nixos-unstable", 33 + "repo": "nixpkgs", 34 + "type": "github" 35 + } 36 + }, 37 + "root": { 38 + "inputs": { 39 + "flake-utils": "flake-utils", 40 + "nixpkgs": "nixpkgs", 41 + "rust-overlay": "rust-overlay" 42 + } 43 + }, 44 + "rust-overlay": { 45 + "inputs": { 46 + "nixpkgs": [ 47 + "nixpkgs" 48 + ] 49 + }, 50 + "locked": { 51 + "lastModified": 1769136478, 52 + "narHash": "sha256-8UNd5lmGf8phCr/aKxagJ4kNsF0pCHLish2G4ZKCFFY=", 53 + "owner": "oxalica", 54 + "repo": "rust-overlay", 55 + "rev": "470ee44393bb19887056b557ea2c03fc5230bd5a", 56 + "type": "github" 57 + }, 58 + "original": { 59 + "owner": "oxalica", 60 + "repo": "rust-overlay", 61 + "type": "github" 62 + } 63 + }, 64 + "systems": { 65 + "locked": { 66 + "lastModified": 1681028828, 67 + "narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=", 68 + "owner": "nix-systems", 69 + "repo": "default", 70 + "rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e", 71 + "type": "github" 72 + }, 73 + "original": { 74 + "owner": "nix-systems", 75 + "repo": "default", 76 + "type": "github" 77 + } 78 + } 79 + }, 80 + "root": "root", 81 + "version": 7 82 + }
+160
flake.nix
··· 1 + { 2 + description = "wisp-cli - Static site hosting CLI for AT Protocol"; 3 + 4 + # === INPUTS === 5 + # These are the dependencies of your flake (like package.json dependencies) 6 + inputs = { 7 + # nixpkgs is the main Nix package repository 8 + nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable"; 9 + 10 + # rust-overlay gives us easy access to Rust toolchains with cross-compilation targets 11 + rust-overlay = { 12 + url = "github:oxalica/rust-overlay"; 13 + inputs.nixpkgs.follows = "nixpkgs"; 14 + }; 15 + 16 + # flake-utils provides helpers for multi-system flakes 17 + flake-utils.url = "github:numtide/flake-utils"; 18 + }; 19 + 20 + # === OUTPUTS === 21 + outputs = { self, nixpkgs, rust-overlay, flake-utils }: 22 + flake-utils.lib.eachDefaultSystem (system: 23 + let 24 + overlays = [ (import rust-overlay) ]; 25 + pkgs = import nixpkgs { inherit system overlays; }; 26 + 27 + # Rust toolchain with cross-compilation targets 28 + rustToolchain = pkgs.rust-bin.stable.latest.default.override { 29 + targets = [ 30 + "x86_64-unknown-linux-musl" 31 + "aarch64-unknown-linux-musl" 32 + "x86_64-apple-darwin" 33 + "aarch64-apple-darwin" 34 + ]; 35 + }; 36 + 37 + version = "0.5.0"; 38 + pname = "wisp-cli"; 39 + 40 + 41 + # Linux cross-compilation (uses zig as linker for musl) 42 + mkLinuxPackage = { target, suffix }: pkgs.stdenv.mkDerivation { 43 + pname = "${pname}-${suffix}"; 44 + inherit version; 45 + src = ./cli; 46 + 47 + nativeBuildInputs = [ 48 + rustToolchain 49 + pkgs.cargo-zigbuild 50 + pkgs.zig 51 + pkgs.cacert 52 + ]; 53 + 54 + __noChroot = true; 55 + 56 + buildPhase = '' 57 + export HOME=$(mktemp -d) 58 + export CARGO_HOME=$(mktemp -d) 59 + export SSL_CERT_FILE=${pkgs.cacert}/etc/ssl/certs/ca-bundle.crt 60 + export CARGO_TARGET_X86_64_UNKNOWN_LINUX_MUSL_RUSTFLAGS="-C target-feature=+crt-static" 61 + export CARGO_TARGET_AARCH64_UNKNOWN_LINUX_MUSL_RUSTFLAGS="-C target-feature=+crt-static" 62 + cargo zigbuild --release --target ${target} 63 + ''; 64 + 65 + installPhase = '' 66 + mkdir -p $out/bin 67 + cp target/${target}/release/${pname} $out/bin/${pname} 68 + ''; 69 + 70 + dontConfigure = true; 71 + dontFixup = true; 72 + }; 73 + 74 + # macOS builds (native cargo) 75 + mkDarwinPackage = { target, suffix }: pkgs.stdenv.mkDerivation { 76 + pname = "${pname}-${suffix}"; 77 + inherit version; 78 + src = ./cli; 79 + 80 + nativeBuildInputs = [ rustToolchain pkgs.cacert ]; 81 + 82 + __noChroot = true; 83 + 84 + buildPhase = '' 85 + export HOME=$(mktemp -d) 86 + export CARGO_HOME=$(mktemp -d) 87 + export SSL_CERT_FILE=${pkgs.cacert}/etc/ssl/certs/ca-bundle.crt 88 + cargo build --release --target ${target} 89 + ''; 90 + 91 + installPhase = '' 92 + mkdir -p $out/bin 93 + cp target/${target}/release/${pname} $out/bin/${pname} 94 + ''; 95 + 96 + dontConfigure = true; 97 + dontFixup = true; 98 + }; 99 + 100 + # Cross-compiled packages 101 + linux-x86_64 = mkLinuxPackage { 102 + target = "x86_64-unknown-linux-musl"; 103 + suffix = "linux-x86_64"; 104 + }; 105 + 106 + linux-aarch64 = mkLinuxPackage { 107 + target = "aarch64-unknown-linux-musl"; 108 + suffix = "linux-aarch64"; 109 + }; 110 + 111 + macos-x86_64 = mkDarwinPackage { 112 + target = "x86_64-apple-darwin"; 113 + suffix = "macos-x86_64"; 114 + }; 115 + 116 + macos-aarch64 = mkDarwinPackage { 117 + target = "aarch64-apple-darwin"; 118 + suffix = "macos-aarch64"; 119 + }; 120 + 121 + # Build all targets and collect binaries 122 + all = pkgs.stdenv.mkDerivation { 123 + pname = "${pname}-all"; 124 + inherit version; 125 + dontUnpack = true; 126 + 127 + installPhase = '' 128 + mkdir -p $out 129 + cp ${linux-x86_64}/bin/${pname} $out/${pname}-linux-x86_64 130 + cp ${linux-aarch64}/bin/${pname} $out/${pname}-linux-aarch64 131 + cp ${macos-x86_64}/bin/${pname} $out/${pname}-macos-x86_64 132 + cp ${macos-aarch64}/bin/${pname} $out/${pname}-macos-aarch64 133 + ''; 134 + }; 135 + 136 + # Pick the right default based on current system 137 + default = { 138 + "x86_64-linux" = linux-x86_64; 139 + "aarch64-linux" = linux-aarch64; 140 + "x86_64-darwin" = macos-x86_64; 141 + "aarch64-darwin" = macos-aarch64; 142 + }.${system}; 143 + 144 + in { 145 + packages = { 146 + inherit default linux-x86_64 linux-aarch64 macos-x86_64 macos-aarch64 all; 147 + }; 148 + 149 + devShells.default = pkgs.mkShell { 150 + buildInputs = [ 151 + rustToolchain 152 + pkgs.cargo-zigbuild 153 + pkgs.zig 154 + pkgs.rust-analyzer 155 + ]; 156 + # Darwin stdenv includes SDK with frameworks and libiconv automatically 157 + }; 158 + } 159 + ); 160 + }