Skip to content
This repository has been archived by the owner on Oct 10, 2023. It is now read-only.

Go support #142

Draft
wants to merge 13 commits into
base: main
Choose a base branch
from
6 changes: 0 additions & 6 deletions .envrc
Original file line number Diff line number Diff line change
@@ -1,7 +1 @@
use_riff() {
watch_file Cargo.toml Cargo.lock
eval "$(riff print-dev-env)"
}

use riff
use flake .
21 changes: 21 additions & 0 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ tracing = "0.1.36"
tracing-error = "0.2.0"
tracing-subscriber = { version = "0.3.15", features = ["env-filter"] }
uuid = { version = "1.1.2", features = [ "v4", "fast-rng", "serde" ]}
walkdir = "2.3.2"
xdg = "2"
zeroize = "1.5.7"

Expand Down
2 changes: 1 addition & 1 deletion registry/format.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#!/bin/sh

set -exuo pipefail
cd "$(dirname "$0")"

jq -S < registry.json > registry.next.json
Expand Down
137 changes: 137 additions & 0 deletions registry/registry.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,142 @@
{
"language": {
"go": {
"default": {
"build-inputs": [
"go"
]
},
"dependencies": {
"???": {
"build-inputs": [
"xkbcommon",
"wayland",
"pkg-config"
]
},
"github.com/containerd/btrfs": {
"build-inputs": [
"btrfs-progs"
]
},
"github.com/containers/image/v5/ostree": {
"build-inputs": [
"ostree",
"glib",
"libselinux",
"pkg-config"
]
},
"github.com/containers/storage/drivers/btrfs": {
"build-inputs": [
"btrfs-progs"
]
},
"github.com/containers/storage/drivers/devmapper": {
"build-inputs": [
"pkg-config",
"lvm2"
]
},
"github.com/containers/storage/pkg/devicemapper": {
"build-inputs": [
"lvm2"
]
},
"github.com/containers/storage/pkg/idtools": {
"build-inputs": [
"shadow"
]
},
"github.com/coreos/go-systemd/sdjournal": {
"build-inputs": [
"systemd"
]
},
"github.com/go-gl/glfw/v3.3/glfw": {
"build-inputs": [
"pkg-config",
"xorg.libX11",
"xorg.libXcursor",
"xorg.libXrandr",
"xorg.libXinerama",
"xorg.libXi",
"xorg.libXext",
"xorg.libXxf86vm",
"libGL"
]
},
"github.com/google/gopacket/pcap": {
"build-inputs": [
"libpcap"
]
},
"github.com/google/seesaw/netlink": {
"build-inputs": [
"libnl"
]
},
"github.com/ostreedev/ostree-go/pkg/glibobject": {
"build-inputs": [
"glib",
"pkg-config"
]
},
"github.com/ostreedev/ostree-go/pkg/otbuiltin": {
"build-inputs": [
"ostree",
"pkg-config"
]
},
"github.com/proglottis/gpgme": {
"build-inputs": [
"pkg-config",
"gpgme"
]
},
"github.com/seccomp/libseccomp-golang": {
"build-inputs": [
"libseccomp",
"pkg-config"
]
},
"github.com/tecbot/gorocksdb": {
"build-inputs": [
"rocksdb"
]
}
}
},
"javascript": {
"default": {
"build-inputs": [
"nodejs",
"yarn",
"nodePackages.npm"
]
},
"dependencies": {
"cypress": {
"build-inputs": [
"cypress"
],
"environment-variables": {
"CYPRESS_INSTALL_BINARY": "0",
"CYPRESS_RUN_BINARY": "${cypress}/bin/Cypress"
}
},
"karma": {
"environment-variables": {
"CHROME_BIN": "${google-chrome}/bin/google-chrome-stable"
}
},
"node-gyp": {
"build-inputs": [
"python3"
]
}
}
},
"rust": {
"default": {
"build-inputs": [
Expand Down
15 changes: 15 additions & 0 deletions src/dependency_registry/go.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
use std::collections::HashMap;
use super::rust::RustDependencyData;
use serde::Deserialize;

// Cribbing RustDependencyData here because there's nothing really
// rust-specific about it besides the name.

// Not just reusing RustDependencyRegistryData entirely, because
// there's at least the conceptual difference that the map keys
// are Go package paths and not plain crate URLs
#[derive(Deserialize, Default, Clone, Debug)]
pub struct GoDependencyRegistryData {
pub(crate) default: RustDependencyData,
pub(crate) dependencies: HashMap<String, RustDependencyData>,
}
Loading