2020-11-09 15:59:12 +00:00
|
|
|
{ lib
|
|
|
|
, fetchFromGitHub
|
|
|
|
, buildGoModule
|
2020-04-24 23:36:52 +00:00
|
|
|
, makeWrapper
|
|
|
|
, nix-prefetch-git
|
2020-11-09 15:59:12 +00:00
|
|
|
, go
|
2020-04-24 23:36:52 +00:00
|
|
|
}:
|
|
|
|
|
2020-11-09 15:59:12 +00:00
|
|
|
buildGoModule {
|
2020-04-24 23:36:52 +00:00
|
|
|
pname = "vgo2nix";
|
2020-11-09 15:59:12 +00:00
|
|
|
version = "unstable-2020-11-07";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
2020-05-15 21:57:56 +00:00
|
|
|
owner = "nix-community";
|
2020-04-24 23:36:52 +00:00
|
|
|
repo = "vgo2nix";
|
2020-11-09 15:59:12 +00:00
|
|
|
rev = "4546d8056ab09ece3d2489594627c0541b15a397";
|
|
|
|
sha256 = "0n9pf0i5y59kiiv6dq8h8w1plaz9w6s67rqr2acqgxa45iq36mkh";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2020-11-09 15:59:12 +00:00
|
|
|
vendorSha256 = "1lzhhg9wimn8nfzrrla5bshgk1ghnlsdfmq6iask0zqz311g96bv";
|
|
|
|
|
|
|
|
subPackages = [ "." ];
|
|
|
|
|
|
|
|
nativeBuildInputs = [ makeWrapper ];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
allowGoReference = true;
|
|
|
|
|
2020-11-09 15:59:12 +00:00
|
|
|
postInstall = ''
|
|
|
|
wrapProgram $out/bin/vgo2nix --prefix PATH : ${lib.makeBinPath [ nix-prefetch-git go ]}
|
2020-04-24 23:36:52 +00:00
|
|
|
'';
|
|
|
|
|
2020-11-09 15:59:12 +00:00
|
|
|
meta = with lib; {
|
2020-04-24 23:36:52 +00:00
|
|
|
description = "Convert go.mod files to nixpkgs buildGoPackage compatible deps.nix files";
|
2020-05-15 21:57:56 +00:00
|
|
|
homepage = "https://github.com/nix-community/vgo2nix";
|
2020-04-24 23:36:52 +00:00
|
|
|
license = licenses.mit;
|
2020-11-09 15:59:12 +00:00
|
|
|
maintainers = with maintainers; [ adisbladis SuperSandro2000 ];
|
2021-10-09 14:59:57 +00:00
|
|
|
mainProgram = "vgo2nix";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
}
|