diff --git a/pkgs/development/tools/vgo2nix/default.nix b/pkgs/development/tools/vgo2nix/default.nix new file mode 100644 index 000000000000..ad556606c9ae --- /dev/null +++ b/pkgs/development/tools/vgo2nix/default.nix @@ -0,0 +1,41 @@ +{ stdenv +, lib +, buildGoPackage +, go +, makeWrapper +, nix-prefetch-git +, fetchFromGitHub +}: + +buildGoPackage rec { + name = "vgo2nix-${version}"; + version = "unstable-2018-10-14"; + goPackagePath = "github.com/adisbladis/vgo2nix"; + + nativeBuildInputs = [ makeWrapper ]; + + src = fetchFromGitHub { + owner = "adisbladis"; + repo = "vgo2nix"; + rev = "a36137a2b9675f5e9b7e0a7840bc9fe9f2414d4e"; + sha256 = "1658hr1535v8w3s41q0bcgk8hmisjn8gcw7i3n2d2igszn1dp0q4"; + }; + + goDeps = ./deps.nix; + + allowGoReference = true; + + postInstall = with stdenv; let + binPath = lib.makeBinPath [ nix-prefetch-git go ]; + in '' + wrapProgram $bin/bin/vgo2nix --prefix PATH : ${binPath} + ''; + + meta = with stdenv.lib; { + description = "Convert go.mod files to nixpkgs buildGoPackage compatible deps.nix files"; + homepage = https://github.com/adisbladis/vgo2nix; + license = licenses.mit; + maintainers = with maintainers; [ adisbladis ]; + }; + +} diff --git a/pkgs/development/tools/vgo2nix/deps.nix b/pkgs/development/tools/vgo2nix/deps.nix new file mode 100644 index 000000000000..b8327cd6069f --- /dev/null +++ b/pkgs/development/tools/vgo2nix/deps.nix @@ -0,0 +1,12 @@ +[ + + { + goPackagePath = "golang.org/x/tools"; + fetch = { + type = "git"; + url = "https://go.googlesource.com/tools"; + rev = "ded554d0681e"; + sha256 = "04rlq9hc3ccww9sbsrl48fl6wbjprb136rqxyr7dmgfj444aml56"; + }; + } +] diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index d3d1b06feff6..23734344323e 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -12907,6 +12907,8 @@ with pkgs; leaps = callPackage ../development/tools/leaps { }; + vgo2nix = callPackage ../development/tools/vgo2nix { }; + ws = callPackage ../development/tools/ws { }; ### DEVELOPMENT / JAVA MODULES @@ -18597,7 +18599,7 @@ with pkgs; rclone = callPackage ../applications/networking/sync/rclone { }; rclone-browser = libsForQt5.callPackage ../applications/networking/sync/rclone/browser.nix { }; - + rcs = callPackage ../applications/version-management/rcs { }; rdesktop = callPackage ../applications/networking/remote/rdesktop { };