Created
October 3, 2019 12:56
-
-
Save zph/aaee477962e9b6f3884115675d02e322 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
# bash_strict_mode disable=true | |
source "$stdenv/setup" | |
goModDownload() { | |
export GO111MODULE=on | |
cd go/src/$goPackagePath || exit 1 | |
go mod download | |
go mod vendor | |
} | |
buildPhase() { | |
export GO111MODULE=on | |
cd go/src/$goPackagePath || exit 1 | |
make build | |
} | |
installPhase() { | |
mkdir -p "$out/bin" | |
cp bin/moresql "$out/bin" | |
chmod +x "$out/bin/moresql" | |
} | |
preBuildPhases+=(goModDownload) | |
genericBuild |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ stdenv, buildGoPackage, fetchFromGitHub, git, curl, cacert }: | |
buildGoPackage rec { | |
pname = "moresql"; | |
version = "v1.0.4"; | |
goPackagePath = "github.com/zph/moresql"; | |
src = fetchFromGitHub { | |
owner = "zph"; | |
repo = pname; | |
rev = version; | |
sha256 = "00fw2wahfiiy9kx1zscjx7iqa03mly45i9776rswpk1ms0sapixd"; | |
}; | |
buildInputs = [ | |
git | |
curl | |
cacert | |
]; | |
builder = ./builder.sh; | |
meta = with stdenv.lib; { | |
description = "Data streaming and replication from mongo -> postgres"; | |
homepage = https://github.com/zph/moresql; | |
license = licenses.mit; | |
maintainers = [ maintainers.zph ]; | |
platforms = platforms.unix; | |
}; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment