Comments (4)
Why can't I do something like git clone hydroxide ./somewhere; cd ./somewhere; go build;?
This is how you do it with Go 1.11. It should work if you clone outside GOPATH (which is always the case for PKGBUILD), try it.
from hydroxide.
This behaviour is only the case when GOPATH and GOROOT both are unset. If they are set, it behaves differently.
Hmm, I have GOPATH and GOROOT set and go build ./cmd/hydroxide
works. Only works if I cloned outside GOPATH though.
Anyway, nice you've figured it out!
from hydroxide.
This is what I tried at first, but then it couldn't find the module that provides hydroxide itself.
Error was/is then:
can't load package: package github.com/emersion/hydroxide: unknown import path "github.com/emersion/hydroxide": cannot find module providing package github.com/emersion/hydroxide
... and I was trying to execute go build
inside the repo's root folder (same folder wherein the go.mod
file is located).
If I use go build
, do I need to set some environment variables or special flags, so that go finds the go.mod
file and knows that the repo I'm building is also known as the alias in the source code?
I also tried using the GO111MODULE=on
flag, but that has no influence over this behaviour (somewhere somebody said it's only necessary outside GOPATH).
from hydroxide.
Okay, for future references (in case somebody has the same problem):
go build
will only check the localgo.mod
file if a build target is given, which meanscd ./hydroxide; go build ./cmd/hydroxide
is necessary. Paths to.go
files won't work, and a build target is required. Otherwise the above message is displayed.- This behaviour is only the case when
GOPATH
andGOROOT
both are unset. If they are set, it behaves differently.
So all in all, the new PKGBUILD file for hydroxide-git
looks super simple, like this (go version 1.11
and later):
pkgname=hydroxide-git
pkgver=r1.05d0806
pkgrel=1
pkgdesc="A third-party, open-source ProtonMail CardDAV, IMAP and SMTP bridge"
arch=('x86_64')
makedepends=('git' 'go')
url="https://github.com/emersion/hydroxide"
license=('MIT')
source=('git+https://github.com/emersion/hydroxide')
md5sums=('SKIP')
pkgver() {
cd "$srcdir/hydroxide"
printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)"
}
build() {
cd "$srcdir/hydroxide";
go build "./cmd/hydroxide";
}
package() {
mkdir -p "$pkgdir/usr/bin"
install -p -m755 "$srcdir/hydroxide/hydroxide" "$pkgdir/usr/bin"
install -Dm644 "$srcdir/hydroxide/LICENSE" "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
}
@emersion Sorry for the trouble, thanks for the help! Your comment led me on the right path.
from hydroxide.
Related Issues (20)
- hydroxide appears to strip email headers HOT 4
- Unable to install Hydroxide HOT 1
- `auth` fails with "This webpage is out of date" HOT 6
- Please update hydroxide in AUR HOT 1
- "This web page is out of date, please refresh the page to continue using it" HOT 1
- unknown sender address (in reply to end of DATA command)) whenever from address is blank HOT 1
- auth command returns 403 token scope issue HOT 1
- Unable to login to ProtonMail via hydroxide HOT 3
- Can't login to proton account on thunderbird HOT 25
- SMTP Banner wrong - eMail Server Setup Problem
- Unable to connect after reboot HOT 4
- Provide auth.json example HOT 2
- unable to log in from local client HOT 1
- For OpenWrt users HOT 2
- Subfolders? HOT 9
- 554 5.0.0 Error: transaction failed, blame it on the weather: cannot upload attachment: [2001] Invalid input
- Cannot log in to Proton Mail in Thunderbird with Hydroxide running as a service HOT 2
- A period in the mail address produce a dysfunctional access password HOT 2
- [Feature request] Setup guides
- Tor stream isolation support HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from hydroxide.