{ lib, stdenv, fetchurl, }: let sources = lib.importJSON ./sources.json; source = sources.sources.${stdenv.hostPlatform.system}; in stdenv.mkDerivation { pname = "openshell"; version = lib.removePrefix "v" sources.version; src = fetchurl { inherit (source) url hash; }; unpackPhase = '' tar -xzf $src ''; installPhase = '' install -Dm755 openshell $out/bin/openshell ''; passthru.updateScript = ./update.sh; meta = with lib; { description = "Safe, private runtime for autonomous AI agents"; homepage = "https://github.com/NVIDIA/OpenShell"; license = licenses.asl20; platforms = attrNames sources.sources; mainProgram = "openshell"; maintainers = []; }; }