Port gotags to buildGoPackage
This commit is contained in:
parent
9c6420580a
commit
67f34cbd0d
@ -1,24 +1,20 @@
|
|||||||
{ stdenv, lib, go, fetchurl, fetchgit, fetchhg, fetchbzr, fetchFromGitHub }:
|
{ lib, goPackages, fetchFromGitHub }:
|
||||||
|
|
||||||
stdenv.mkDerivation rec {
|
with goPackages;
|
||||||
name = "gotags";
|
|
||||||
|
|
||||||
src = import ./deps.nix {
|
buildGoPackage rec {
|
||||||
inherit stdenv lib fetchgit fetchhg fetchbzr fetchFromGitHub;
|
rev = "a60c6a1b171faedc44354bd437d965e5e3bdc220";
|
||||||
|
name = "gotags-${lib.strings.substring 0 7 rev}";
|
||||||
|
|
||||||
|
goPackagePath = "github.com/jstemmer/gotags";
|
||||||
|
|
||||||
|
src = fetchFromGitHub {
|
||||||
|
inherit rev;
|
||||||
|
owner = "jstemmer";
|
||||||
|
repo = "gotags";
|
||||||
|
sha256 = "1drbypby0isdmkq44jmlv59k3jrwvq2jciaccxx2qc2nnx444fkq";
|
||||||
};
|
};
|
||||||
|
|
||||||
buildInputs = [ go ];
|
|
||||||
|
|
||||||
buildPhase = ''
|
|
||||||
export GOPATH=$src
|
|
||||||
go build -v -o gotags github.com/jstemmer/gotags
|
|
||||||
'';
|
|
||||||
|
|
||||||
installPhase = ''
|
|
||||||
mkdir -p $out/bin
|
|
||||||
mv gotags $out/bin
|
|
||||||
'';
|
|
||||||
|
|
||||||
meta = with lib; {
|
meta = with lib; {
|
||||||
description = "Ctags-compatible tag generator for Go";
|
description = "Ctags-compatible tag generator for Go";
|
||||||
homepage = https://github.com/nsf/gotags;
|
homepage = https://github.com/nsf/gotags;
|
||||||
|
@ -1,27 +0,0 @@
|
|||||||
{ stdenv, lib, fetchgit, fetchhg, fetchbzr, fetchFromGitHub }:
|
|
||||||
|
|
||||||
let
|
|
||||||
goDeps = [
|
|
||||||
{
|
|
||||||
root = "github.com/jstemmer/gotags";
|
|
||||||
src = fetchFromGitHub {
|
|
||||||
owner = "jstemmer";
|
|
||||||
repo = "gotags";
|
|
||||||
rev = "a60c6a1b171faedc44354bd437d965e5e3bdc220";
|
|
||||||
sha256 = "1drbypby0isdmkq44jmlv59k3jrwvq2jciaccxx2qc2nnx444fkq";
|
|
||||||
};
|
|
||||||
}
|
|
||||||
];
|
|
||||||
|
|
||||||
in
|
|
||||||
|
|
||||||
stdenv.mkDerivation rec {
|
|
||||||
name = "go-deps";
|
|
||||||
|
|
||||||
buildCommand =
|
|
||||||
lib.concatStrings
|
|
||||||
(map (dep: ''
|
|
||||||
mkdir -p $out/src/`dirname ${dep.root}`
|
|
||||||
ln -s ${dep.src} $out/src/${dep.root}
|
|
||||||
'') goDeps);
|
|
||||||
}
|
|
Loading…
x
Reference in New Issue
Block a user