From debca548f928c23d4dcb8d66098ceba693f14982 Mon Sep 17 00:00:00 2001 From: Danylo Hlynskyi Date: Mon, 16 Dec 2019 00:58:16 +0200 Subject: [PATCH] dolt: init at 0.12.0 (#75693) * dolt: init at 0.12.0 * Update pkgs/servers/sql/dolt/default.nix Co-Authored-By: robert seaton * fix eval * Update pkgs/servers/sql/dolt/default.nix Co-Authored-By: Wael Nasreddine * update Go docs as well --- doc/languages-frameworks/go.xml | 4 +-- .../go-modules/generic/default.nix | 7 +++++- pkgs/servers/sql/dolt/default.nix | 25 +++++++++++++++++++ pkgs/top-level/all-packages.nix | 2 ++ 4 files changed, 35 insertions(+), 3 deletions(-) create mode 100644 pkgs/servers/sql/dolt/default.nix diff --git a/doc/languages-frameworks/go.xml b/doc/languages-frameworks/go.xml index 288a90298631..bd1ee8eba275 100644 --- a/doc/languages-frameworks/go.xml +++ b/doc/languages-frameworks/go.xml @@ -26,7 +26,7 @@ buildGoModule pet = buildGoModule rec { - name = "pet-${version}"; + pname = "pet"; version = "0.3.4"; src = fetchFromGitHub { @@ -79,7 +79,7 @@ pet = buildGoModule rec { buildGoPackage deis = buildGoPackage rec { - name = "deis-${version}"; + pname = "deis"; version = "1.13.0"; goPackagePath = "github.com/deis/deis"; diff --git a/pkgs/development/go-modules/generic/default.nix b/pkgs/development/go-modules/generic/default.nix index 55eaca514da8..b3c583da51e4 100644 --- a/pkgs/development/go-modules/generic/default.nix +++ b/pkgs/development/go-modules/generic/default.nix @@ -10,6 +10,9 @@ # A function to override the go-modules derivation , overrideModAttrs ? (_oldAttrs : {}) +# path to go.mod and go.sum directory +, modRoot ? "./" + # modSha256 is the sha256 of the vendored dependencies , modSha256 @@ -58,7 +61,7 @@ let export GOCACHE=$TMPDIR/go-cache export GOPATH="$TMPDIR/go" mkdir -p "''${GOPATH}/pkg/mod/cache/download" - + cd "${modRoot}" runHook postConfigure ''; @@ -101,6 +104,8 @@ let export GOSUMDB=off export GOPROXY=file://${go-modules} + cd "$modRoot" + runHook postConfigure ''; diff --git a/pkgs/servers/sql/dolt/default.nix b/pkgs/servers/sql/dolt/default.nix new file mode 100644 index 000000000000..b9876fbc5eaa --- /dev/null +++ b/pkgs/servers/sql/dolt/default.nix @@ -0,0 +1,25 @@ +{ stdenv, fetchFromGitHub, lib, buildGoModule }: + +buildGoModule rec { + pname = "dolt"; + version = "0.12.0"; + + src = fetchFromGitHub { + owner = "liquidata-inc"; + repo = "dolt"; + rev = "v${version}"; + sha256 = "1sy8ia9j5aymjpf3k86fc8yw6384iy9ryd8cl72fr9cp70l7sx1q"; + }; + + modRoot = "./go"; + subPackages = [ "cmd/dolt" "cmd/git-dolt" "cmd/git-dolt-smudge" ]; + modSha256 = "0fagi529m1gf5jrqdlg9vxxq4yz9k9q8h92ch0gahp43kxfbgr4q"; + + meta = with lib; { + description = "Relational database with version control and CLI a-la Git."; + homepage = "https://github.com/liquidata-inc/dolt"; + license = licenses.asl20; + maintainers = with maintainers; [ danbst ]; + platforms = platforms.linux ++ platforms.darwin; + }; +} diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 31ab71587051..d6a72d931ec1 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -9877,6 +9877,8 @@ in doit = callPackage ../development/tools/build-managers/doit { }; + dolt = callPackage ../servers/sql/dolt { }; + dot2tex = pythonPackages.dot2tex; doxygen = callPackage ../development/tools/documentation/doxygen {