curl-ca-certs (#121)

This commit is contained in:
Max Howell 2022-09-06 20:33:51 -04:00
parent ac25a93fff
commit 0a87367017
3 changed files with 48 additions and 4 deletions

View file

@ -11,7 +11,7 @@ dependencies:
cairographics.org: 1
freetype.org: 2
gnome.org/glib: 2
harfbuzz.org: 5
harfbuzz.org: '>=4 <6' #FIXME were actually not sure about the specifics of this requirement
freedesktop.org/fontconfig: 2
sourceware.org/libffi: 3
gnu.org/fribidi: 1

47
scripts/deps.ts Executable file
View file

@ -0,0 +1,47 @@
#!/usr/bin/env -S tea -E
/*---
args:
- deno
- run
- --allow-read
- --allow-env
- --import-map={{ srcroot }}/import-map.json
---*/
import { PackageRequirement, parsePackageRequirement } from "types"
import usePantry from "hooks/usePantry.ts"
import useFlags from "hooks/useFlags.ts"
import hydrate from "prefab/hydrate.ts"
const pantry = usePantry()
useFlags()
const mode: 'build' | 'install' = Deno.args.includes("-b") ? 'build' : 'install'
const get_deps = async (pkg: PackageRequirement) => {
const deps = await pantry.getDeps(pkg)
switch (mode) {
case 'build':
return [...deps.build, ...deps.runtime]
case 'install':
return deps.runtime
}
}
const dry = Deno.args.compactMap(arg => !arg.startsWith('-') && parsePackageRequirement(arg))
const explicit = new Set(dry.map(x=>x.project))
const wet = await hydrate(dry, get_deps)
const gas = wet.pkgs.compactMap(({project}) => {
if (Deno.args.includes('-i')) {
return project
} else {
return explicit.has(project) || project
}
})
if (Deno.env.get("GITHUB_ACTIONS")) {
console.log(`::set-output name=pkgs::${gas.join(" ")}\n`)
} else {
console.log(gas.join("\n"))
}

View file

@ -4,10 +4,7 @@
args:
- deno
- run
- --allow-net
- --allow-run
- --allow-read
- --allow-write
- --allow-env
- --import-map={{ srcroot }}/import-map.json
---*/