the universal sandbox runtime for agents and humans. pocketenv.io
sandbox openclaw agent claude-code vercel-sandbox deno-sandbox cloudflare-sandbox atproto sprites daytona
7
fork

Configure Feed

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

Add flake.nix and flake.lock

Update .gitignore to ignore build output 'result'.
Provide a multi-platform Nix flake packaging pocketenv with an app
entry and devShell, and pin inputs in flake.lock.

+165
+61
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": 1774709303, 24 + "narHash": "sha256-D3Q07BbIA2KnTcSXIqqu9P586uWxN74zNoCH3h2ESHg=", 25 + "owner": "NixOS", 26 + "repo": "nixpkgs", 27 + "rev": "8110df5ad7abf5d4c0f6fb0f8f978390e77f9685", 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 + } 42 + }, 43 + "systems": { 44 + "locked": { 45 + "lastModified": 1681028828, 46 + "narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=", 47 + "owner": "nix-systems", 48 + "repo": "default", 49 + "rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e", 50 + "type": "github" 51 + }, 52 + "original": { 53 + "owner": "nix-systems", 54 + "repo": "default", 55 + "type": "github" 56 + } 57 + } 58 + }, 59 + "root": "root", 60 + "version": 7 61 + }
+104
flake.nix
··· 1 + { 2 + description = "pocketenv - the universal sandbox runtime for agents and humans."; 3 + 4 + inputs = { 5 + nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable"; 6 + flake-utils.url = "github:numtide/flake-utils"; 7 + }; 8 + 9 + outputs = { self, nixpkgs, flake-utils }: 10 + flake-utils.lib.eachSystem [ 11 + "x86_64-linux" 12 + "aarch64-linux" 13 + "x86_64-darwin" 14 + "aarch64-darwin" 15 + ] (system: 16 + let 17 + pkgs = import nixpkgs { inherit system; }; 18 + 19 + version = "0.6.0"; 20 + 21 + # Map Nix system strings to pocketenv release target triples 22 + targetMap = { 23 + "x86_64-linux" = "x86_64-unknown-linux-gnu"; 24 + "aarch64-linux" = "aarch64-unknown-linux-gnu"; 25 + "x86_64-darwin" = "x86_64-apple-darwin"; 26 + "aarch64-darwin" = "aarch64-apple-darwin"; 27 + }; 28 + 29 + # Fill these in by running: 30 + # nix-prefetch-url --type sha256 <url> 31 + # or: 32 + # curl -sL <url> | sha256sum 33 + # then convert with: nix hash to-sri --type sha256 <hex> 34 + # 35 + # Example for aarch64-linux: 36 + # nix-prefetch-url --type sha256 \ 37 + # https://github.com/pocketenv-io/pocketenv/releases/download/v0.6.0/pocketenv_v0.6.0_aarch64-unknown-linux-gnu.tar.gz 38 + hashMap = { 39 + "x86_64-linux" = "sha256-XzSuI2HmmMcFPaG3ixApiY//9TlQuLrzu3jfecnRLhI="; 40 + "aarch64-linux" = "sha256-Pzh28zZTocug7/7VuUoPWqDwk+63Y6/iQovZgK2Ur0k="; 41 + "x86_64-darwin" = "sha256-lP1D/zS2BqIr/bUj5doFCx1UDAFvsRwkKMYlDPAYSC8="; 42 + "aarch64-darwin" = "sha256-WkvSYttx5Z7MsFfCJ7mgAjmAcUW9AkKXaYCPPYOUlAA="; 43 + }; 44 + 45 + target = targetMap.${system}; 46 + hash = hashMap.${system}; 47 + 48 + pocketenv = pkgs.stdenv.mkDerivation rec { 49 + pname = "pocketenv"; 50 + inherit version; 51 + 52 + src = pkgs.fetchurl { 53 + url = "https://github.com/pocketenv-io/pocketenv/releases/download/v${version}/pocketenv_v${version}_${target}.tar.gz"; 54 + sha256 = hash; 55 + }; 56 + 57 + # On Linux, patch the ELF interpreter to work under NixOS 58 + nativeBuildInputs = pkgs.lib.optionals pkgs.stdenv.isLinux [ 59 + pkgs.autoPatchelfHook 60 + ]; 61 + 62 + # Common C runtime — needed if the Deno binary links glibc 63 + buildInputs = pkgs.lib.optionals pkgs.stdenv.isLinux [ 64 + pkgs.stdenv.cc.cc.lib 65 + ]; 66 + 67 + # The tarball unpacks directly; tell Nix not to look for a sub-directory 68 + # Adjust sourceRoot if the tarball contains a subdirectory, e.g.: 69 + # sourceRoot = "pocketenv-${version}"; 70 + # Leave commented unless extraction fails. 71 + sourceRoot = "."; 72 + 73 + installPhase = '' 74 + runHook preInstall 75 + install -m755 -D pocketenv $out/bin/pocketenv 76 + runHook postInstall 77 + ''; 78 + 79 + meta = with pkgs.lib; { 80 + description = "pocketenv environment manager"; 81 + homepage = "https://github.com/pocketenv-io/pocketenv"; 82 + license = licenses.mit; # adjust if different 83 + platforms = [ "x86_64-linux" "aarch64-linux" "x86_64-darwin" "aarch64-darwin" ]; 84 + mainProgram = "pocketenv"; 85 + }; 86 + }; 87 + 88 + in { 89 + packages = { 90 + default = pocketenv; 91 + pocketenv = pocketenv; 92 + }; 93 + 94 + apps.default = flake-utils.lib.mkApp { 95 + drv = pocketenv; 96 + }; 97 + 98 + # Development shell with pocketenv available 99 + devShells.default = pkgs.mkShell { 100 + buildInputs = [ pocketenv ]; 101 + }; 102 + } 103 + ); 104 + }