push sheeet
Some checks failed
Periodic Merges (6h) / master → staging-nixos (push) Failing after 12m50s
Periodic Merges (6h) / master → staging-next (push) Failing after 12m54s
Periodic Merges (24h) / merge-base(master,staging) → haskell-updates (push) Failing after 11m54s
Periodic Merges (6h) / staging-next → staging (push) Failing after 12m13s
Periodic Merges (24h) / staging-next-25.05 → staging-25.05 (push) Failing after 13m24s
Periodic Merges (24h) / release-25.05 → staging-next-25.05 (push) Failing after 14m28s

This commit is contained in:
Dark Steveneq
2025-10-09 14:15:47 +02:00
commit 646b892680
49168 changed files with 5897842 additions and 0 deletions

245
pkgs/by-name/am/amp-cli/package-lock.json generated Normal file
View File

@@ -0,0 +1,245 @@
{
"name": "amp-cli",
"lockfileVersion": 3,
"requires": true,
"packages": {
"": {
"dependencies": {
"@sourcegraph/amp": "^0.0.1759233723-gf92434"
}
},
"node_modules/@napi-rs/keyring": {
"version": "1.1.9",
"resolved": "https://registry.npmjs.org/@napi-rs/keyring/-/keyring-1.1.9.tgz",
"integrity": "sha512-qjg04yaJ/gFqgG7wDqLlWBvZpsjvYDtwL+xOr2vSM2JrhojuIKsw7pH013U7xJOradTVGeQqhwqgZtt2IblgOw==",
"license": "MIT",
"engines": {
"node": ">= 10"
},
"funding": {
"type": "github",
"url": "https://github.com/sponsors/Brooooooklyn"
},
"optionalDependencies": {
"@napi-rs/keyring-darwin-arm64": "1.1.9",
"@napi-rs/keyring-darwin-x64": "1.1.9",
"@napi-rs/keyring-freebsd-x64": "1.1.9",
"@napi-rs/keyring-linux-arm-gnueabihf": "1.1.9",
"@napi-rs/keyring-linux-arm64-gnu": "1.1.9",
"@napi-rs/keyring-linux-arm64-musl": "1.1.9",
"@napi-rs/keyring-linux-riscv64-gnu": "1.1.9",
"@napi-rs/keyring-linux-x64-gnu": "1.1.9",
"@napi-rs/keyring-linux-x64-musl": "1.1.9",
"@napi-rs/keyring-win32-arm64-msvc": "1.1.9",
"@napi-rs/keyring-win32-ia32-msvc": "1.1.9",
"@napi-rs/keyring-win32-x64-msvc": "1.1.9"
}
},
"node_modules/@napi-rs/keyring-darwin-arm64": {
"version": "1.1.9",
"resolved": "https://registry.npmjs.org/@napi-rs/keyring-darwin-arm64/-/keyring-darwin-arm64-1.1.9.tgz",
"integrity": "sha512-/lVnrSFrut+8pQC6IcqlfHKzcEmf2XvQDOZPB5X4vI23GrNXBd56EuBlFPdTBtx46A8Bn+Aqi6pS8cnprHtcCw==",
"cpu": [
"arm64"
],
"license": "MIT",
"optional": true,
"os": [
"darwin"
],
"engines": {
"node": ">= 10"
}
},
"node_modules/@napi-rs/keyring-darwin-x64": {
"version": "1.1.9",
"resolved": "https://registry.npmjs.org/@napi-rs/keyring-darwin-x64/-/keyring-darwin-x64-1.1.9.tgz",
"integrity": "sha512-G3PiFZTAFTzUnpSB31A/UaPjl48/3sDTLmLxaAZBEk7HcOyBnL31gA1YqhDCO7F2y5sD5TWiFiuID9MyqYOcjw==",
"cpu": [
"x64"
],
"license": "MIT",
"optional": true,
"os": [
"darwin"
],
"engines": {
"node": ">= 10"
}
},
"node_modules/@napi-rs/keyring-freebsd-x64": {
"version": "1.1.9",
"resolved": "https://registry.npmjs.org/@napi-rs/keyring-freebsd-x64/-/keyring-freebsd-x64-1.1.9.tgz",
"integrity": "sha512-R4XbvRhEzQyOy4yM+SMDgk8BgkLPkIzXGwR6QR0wJ2YrPeBx3F2TrgdHfsIGSn/X5Axg/2UlrCiZVciZ5BmusA==",
"cpu": [
"x64"
],
"license": "MIT",
"optional": true,
"os": [
"freebsd"
],
"engines": {
"node": ">= 10"
}
},
"node_modules/@napi-rs/keyring-linux-arm-gnueabihf": {
"version": "1.1.9",
"resolved": "https://registry.npmjs.org/@napi-rs/keyring-linux-arm-gnueabihf/-/keyring-linux-arm-gnueabihf-1.1.9.tgz",
"integrity": "sha512-UrKy110I+zQyBtw4HLVUqZ1jDq11K3PmQIYgWAJNwB5VQOj4IQ63zLxk4V01Jx4bNOJmGNlvHDJUAyh/lC5Yww==",
"cpu": [
"arm"
],
"license": "MIT",
"optional": true,
"os": [
"linux"
],
"engines": {
"node": ">= 10"
}
},
"node_modules/@napi-rs/keyring-linux-arm64-gnu": {
"version": "1.1.9",
"resolved": "https://registry.npmjs.org/@napi-rs/keyring-linux-arm64-gnu/-/keyring-linux-arm64-gnu-1.1.9.tgz",
"integrity": "sha512-yOrhVpNGexDYzybe3dhmHQRPBDjlZPtJDE+eGSi1JwEqYlWDB+4IWjRsetxnO63DhnMFRLeMTdwWghsYrA7VwA==",
"cpu": [
"arm64"
],
"license": "MIT",
"optional": true,
"os": [
"linux"
],
"engines": {
"node": ">= 10"
}
},
"node_modules/@napi-rs/keyring-linux-arm64-musl": {
"version": "1.1.9",
"resolved": "https://registry.npmjs.org/@napi-rs/keyring-linux-arm64-musl/-/keyring-linux-arm64-musl-1.1.9.tgz",
"integrity": "sha512-82EcuzoV/+Dxwi1HHhrEEprN5Ou7OsRKyTJSaRqiVuGvLaQDUhZX/4zXTTh4Pz24m22Q4aoJogafS31w8iKGGw==",
"cpu": [
"arm64"
],
"license": "MIT",
"optional": true,
"os": [
"linux"
],
"engines": {
"node": ">= 10"
}
},
"node_modules/@napi-rs/keyring-linux-riscv64-gnu": {
"version": "1.1.9",
"resolved": "https://registry.npmjs.org/@napi-rs/keyring-linux-riscv64-gnu/-/keyring-linux-riscv64-gnu-1.1.9.tgz",
"integrity": "sha512-Q1ar7DszC1X8FW6w7Ql7b72GFeAUxkTiOuxXChCFBy7eWCQSDrr52ZLroIowp82RmkQLZebnK+IwSssD2Ntoag==",
"cpu": [
"riscv64"
],
"license": "MIT",
"optional": true,
"os": [
"linux"
],
"engines": {
"node": ">= 10"
}
},
"node_modules/@napi-rs/keyring-linux-x64-gnu": {
"version": "1.1.9",
"resolved": "https://registry.npmjs.org/@napi-rs/keyring-linux-x64-gnu/-/keyring-linux-x64-gnu-1.1.9.tgz",
"integrity": "sha512-LMvrYt1ho3pEDECssA7ATbcMDgayEUwwSD+UfrC7Hj1+C6dlvipwt5njwUDCno2OeXbjjisCo4CR9fDmXa4sZA==",
"cpu": [
"x64"
],
"license": "MIT",
"optional": true,
"os": [
"linux"
],
"engines": {
"node": ">= 10"
}
},
"node_modules/@napi-rs/keyring-linux-x64-musl": {
"version": "1.1.9",
"resolved": "https://registry.npmjs.org/@napi-rs/keyring-linux-x64-musl/-/keyring-linux-x64-musl-1.1.9.tgz",
"integrity": "sha512-x2i/TgS2/fM+6LRj1MrtVC580sepz5GcxbSCXpttx2H58uZKBF0vVM9HDPHoKP2w5++fyrA17eltJNYN3Ob46A==",
"cpu": [
"x64"
],
"license": "MIT",
"optional": true,
"os": [
"linux"
],
"engines": {
"node": ">= 10"
}
},
"node_modules/@napi-rs/keyring-win32-arm64-msvc": {
"version": "1.1.9",
"resolved": "https://registry.npmjs.org/@napi-rs/keyring-win32-arm64-msvc/-/keyring-win32-arm64-msvc-1.1.9.tgz",
"integrity": "sha512-14t6p8CTBNfGzLO5LXqurT+pAOf/ocGjOM/qiG/LW+jPkhyJYBNI9e3HKq3QX+ObbnxVpt4fAY02b4XLt7EWig==",
"cpu": [
"arm64"
],
"license": "MIT",
"optional": true,
"os": [
"win32"
],
"engines": {
"node": ">= 10"
}
},
"node_modules/@napi-rs/keyring-win32-ia32-msvc": {
"version": "1.1.9",
"resolved": "https://registry.npmjs.org/@napi-rs/keyring-win32-ia32-msvc/-/keyring-win32-ia32-msvc-1.1.9.tgz",
"integrity": "sha512-7+7aXz5op6PtOnWYcK1GYXWQlk2zfpdPt9taLqmCCVpk1g4m3Gw1wyKyQxjrg9clHWdNhdWxhFEA0osDxG8/Eg==",
"cpu": [
"ia32"
],
"license": "MIT",
"optional": true,
"os": [
"win32"
],
"engines": {
"node": ">= 10"
}
},
"node_modules/@napi-rs/keyring-win32-x64-msvc": {
"version": "1.1.9",
"resolved": "https://registry.npmjs.org/@napi-rs/keyring-win32-x64-msvc/-/keyring-win32-x64-msvc-1.1.9.tgz",
"integrity": "sha512-P1wsSrSqDqvcXLL7yiH2RsO3De65wuEQj1ZjV9s1MHfEP5dIdriNYZfFsRBlOsl32GoK3qFzsuH5DTVviGEHSw==",
"cpu": [
"x64"
],
"license": "MIT",
"optional": true,
"os": [
"win32"
],
"engines": {
"node": ">= 10"
}
},
"node_modules/@sourcegraph/amp": {
"version": "0.0.1759233723-gf92434",
"resolved": "https://registry.npmjs.org/@sourcegraph/amp/-/amp-0.0.1759233723-gf92434.tgz",
"integrity": "sha512-ts+dHxSHfT7sXNAvlRHyp/jwjGvKs08lf+KHaZ/2pMcqnBf94d9g+8u/AoPzUfeFq0WDAbeMl2rV4TDaJAM3aQ==",
"dependencies": {
"@napi-rs/keyring": "1.1.9"
},
"bin": {
"amp": "dist/main.js"
},
"engines": {
"node": ">=20"
}
}
}
}

View File

@@ -0,0 +1,89 @@
{
lib,
buildNpmPackage,
fetchzip,
ripgrep,
makeWrapper,
testers,
}:
buildNpmPackage (finalAttrs: {
pname = "amp-cli";
version = "0.0.1759233723-gf92434";
src = fetchzip {
url = "https://registry.npmjs.org/@sourcegraph/amp/-/amp-${finalAttrs.version}.tgz";
hash = "sha256-r48Odw2PA9ei3WrCm+Q8eGXCY1TVzyrqJa9FLzW84vs=";
};
postPatch = ''
cp ${./package-lock.json} package-lock.json
# Create a minimal package.json with just the dependency we need (without devDependencies)
cat > package.json <<EOF
{
"name": "amp-cli",
"version": "0.0.0",
"license": "UNLICENSED",
"dependencies": {
"@sourcegraph/amp": "${finalAttrs.version}"
},
"bin": {
"amp": "./bin/amp-wrapper.js"
}
}
EOF
# Create wrapper bin directory
mkdir -p bin
# Create a wrapper script that will be installed by npm
cat > bin/amp-wrapper.js << EOF
#!/usr/bin/env node
import('@sourcegraph/amp/dist/main.js')
EOF
chmod +x bin/amp-wrapper.js
'';
npmDepsHash = "sha256-Al8JZ2g68ZvMTxDbZM9grKz7C217YJxnjWnO8o8ySnI=";
propagatedBuildInputs = [
ripgrep
];
nativeBuildInputs = [
makeWrapper
];
npmFlags = [
"--no-audit"
"--no-fund"
"--ignore-scripts"
];
# Disable build and prune steps
dontNpmBuild = true;
postInstall = ''
wrapProgram $out/bin/amp \
--prefix PATH : ${lib.makeBinPath [ ripgrep ]}
'';
passthru.updateScript = ./update.sh;
passthru.tests.version = testers.testVersion {
package = finalAttrs.finalPackage;
command = "HOME=$(mktemp -d) amp --version";
};
meta = {
description = "CLI for Amp, an agentic coding agent in research preview from Sourcegraph";
homepage = "https://ampcode.com/";
downloadPage = "https://www.npmjs.com/package/@sourcegraph/amp";
license = lib.licenses.unfree;
maintainers = with lib.maintainers; [
keegancsmith
burmudar
];
mainProgram = "amp";
};
})

View File

@@ -0,0 +1,15 @@
#!/usr/bin/env nix-shell
#!nix-shell -i bash -p nodePackages.npm nix-update
set -euo pipefail
version=$(npm view @sourcegraph/amp version)
# Generate updated lock file
cd "$(dirname "${BASH_SOURCE[0]}")"
npm i --package-lock-only @sourcegraph/amp@"$version"
rm -f package.json # package.json is not used by buildNpmPackage
# Update version and hashes
cd -
nix-update amp-cli --version "$version"