diff options
author | Jörg Thalheim <joerg@thalheim.io> | 2018-06-21 23:12:52 +0100 |
---|---|---|
committer | Jörg Thalheim <joerg@thalheim.io> | 2018-06-21 23:34:44 +0100 |
commit | 6906e5c1494b0134748dc73ebb7a02e0ab2c7ff6 (patch) | |
tree | 0834cdb39bf0680825aec299ca2082ee7d9b19b4 /pkgs/applications/version-management | |
parent | fe948fd6b01a67a8977271fa4129437296f14a8c (diff) | |
download | nixlib-6906e5c1494b0134748dc73ebb7a02e0ab2c7ff6.tar nixlib-6906e5c1494b0134748dc73ebb7a02e0ab2c7ff6.tar.gz nixlib-6906e5c1494b0134748dc73ebb7a02e0ab2c7ff6.tar.bz2 nixlib-6906e5c1494b0134748dc73ebb7a02e0ab2c7ff6.tar.lz nixlib-6906e5c1494b0134748dc73ebb7a02e0ab2c7ff6.tar.xz nixlib-6906e5c1494b0134748dc73ebb7a02e0ab2c7ff6.tar.zst nixlib-6906e5c1494b0134748dc73ebb7a02e0ab2c7ff6.zip |
gitAndTools.hub: remove go compiler from runtime closure
Diffstat (limited to 'pkgs/applications/version-management')
-rw-r--r-- | pkgs/applications/version-management/git-and-tools/hub/default.nix | 39 |
1 files changed, 18 insertions, 21 deletions
diff --git a/pkgs/applications/version-management/git-and-tools/hub/default.nix b/pkgs/applications/version-management/git-and-tools/hub/default.nix index 1a6e8bc56f40..c9f666390b55 100644 --- a/pkgs/applications/version-management/git-and-tools/hub/default.nix +++ b/pkgs/applications/version-management/git-and-tools/hub/default.nix @@ -1,38 +1,35 @@ -{ stdenv, fetchgit, go, ronn, groff, utillinux, Security }: +{ stdenv, buildGoPackage, fetchFromGitHub, go, ronn, ruby, groff, Security, utillinux }: -stdenv.mkDerivation rec { +buildGoPackage rec { name = "hub-${version}"; version = "2.4.0"; - src = fetchgit { - url = https://github.com/github/hub.git; - rev = "refs/tags/v${version}"; + goPackagePath = "github.com/github/hub"; + + src = fetchFromGitHub { + owner = "github"; + repo = "hub"; + rev = "v${version}"; sha256 = "1lr6vg0zhg2air9bnzcl811g97jraxq05l3cs46wqqflwy57xpz2"; }; + buildInputs = [ groff ronn ruby utillinux ] ++ + stdenv.lib.optional stdenv.isDarwin Security; - buildInputs = [ go ronn groff utillinux ] - ++ stdenv.lib.optional stdenv.isDarwin Security; - - buildPhase = '' + postPatch = '' mkdir bin ln -s ${ronn}/bin/ronn bin/ronn - patchShebangs . - make all man-pages ''; - installPhase = '' - prefix=$out sh -x < script/install.sh - - mkdir -p "$out/share/zsh/site-functions" - cp "etc/hub.zsh_completion" "$out/share/zsh/site-functions/_hub" - - mkdir -p "$out/etc/bash_completion.d" - cp "etc/hub.bash_completion.sh" "$out/etc/bash_completion.d/" + postInstall = '' + cd go/src/${goPackagePath} + install -D etc/hub.zsh_completion "$bin/share/zsh/site-functions/_hub" + install -D etc/hub.bash_completion.sh "$bin/etc/bash_completion.d/hub.bash_completion.sh" + install -D etc/hub.fish_completion "$bin/share/fish/vendor_completions.d/hub.fish" - # Should we also install provided git-hooks? - # And fish completion? + make man-pages + cp -r share/man $bin/share/man ''; meta = with stdenv.lib; { |