sift
sift copied to clipboard
Request: support major package management systems such as macports and apt
It would be nice if you or anyone reading this could add support for macports or homebrew, as well as package systems for the other operating systems. This would help popularize the tool.
I will try to get sift added to major distributions/package systems - this issue can be used to document efforts:
- Arch Linux (thanks to @jetm)
sift would be easy to be supported in other package systems. You will need only to copy a binary file from http://sift-tool.org/download.html. One great advantage from Go.
@svent: By the way, I have created two sift Arch Linux packages: sift and sift-bin. The former build sift from source and the latter download sift binary from http://sift-tool.org/download.html. I can imagine both kind of users: one want to build from source and another just want to download a binary.
@jetm the pkgbuild for sift (not the bin version) needs a little bit to make it work.
adding to the build() function after the cd line:
export GOPATH="$srcdir" go get github.com/svent/go-flags go get github.com/svent/go-nbreader
Will let it compile completely, oh and git may need to be added to depends. (go uses git and such to fetch stuff)
@shaggytwodope: Thank you for report it. It has been fixed.
For me works fine because in the past I have installed Go and followed package instructions:
mkdir ~/go
export GOPATH=~/go
export PATH=$PATH:~/go/bin
@jetm well the catch here is exporting the go path (even some users set this in their env already) might cause some aur stuff to build for folks. But we gotta always assume go isnt even installed and nothing is setup. (took me a long time with people bitching at me to get this right lol)
But much love, need any aur help hit me up.
Is anyone working on homebrew? If not, I can add it.
@mwean I do not know of anyone working on it yet, and unfortunately I do not have a test device at the moment.
I made a PR for it here: homebrew/homebrew#44293. It should get merged in soon.
I'm having a problem building the binary. It works the first time, but if I delete the binary and try to build again, I get these errors:
$ go build -o sift
./sift.go:474: too many arguments in call to parser.AddGroup
./sift.go:475: parser.Name undefined (type *flags.Parser has no field or method Name)
It works again if I delete the go-flags directory. Do you have any idea why that might be happening?
@mwean Thanks for your work to get sift available in homebrew! I will merge your PR once the PR for homebrew gets merged.
Regarding the build errors: I think the following line from the homebrew formula might be the problem:
url "https://github.com/svent/go-flags.git", :revision => "37c8226983775d404b6edfebd44be1078bd0fe95"
The referenced commit is quite old and the API of that release differs from the current release (the two error messages match this).
It should not be necessary to reference specific commits - the current version of the go-flags fork and go-nbreader will always work with the current version of sift.
Oh great, I think that fixed it! I was using the sha from the last release instead of the latest commit. I think they want the revision to lock the version of all dependencies.
I created a macports ticket.
Ok, it's finally on homebrew
That's great to hear, thanks for you support on this! I just merged your PR regarding the installation options.