2021-01-11 07:54:33 +00:00
|
|
|
{ lib, stdenv, fetchFromGitHub, buildGoPackage
|
2018-09-11 11:47:16 +00:00
|
|
|
, makeWrapper, nix-prefetch-scripts }:
|
2018-06-01 21:02:24 +00:00
|
|
|
|
|
|
|
buildGoPackage rec {
|
2019-04-10 20:29:30 +00:00
|
|
|
pname = "dep2nix";
|
|
|
|
version = "unstable-2019-04-02";
|
2018-06-01 21:02:24 +00:00
|
|
|
|
|
|
|
goPackagePath = "github.com/nixcloud/dep2nix";
|
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "nixcloud";
|
2019-04-10 20:29:30 +00:00
|
|
|
repo = pname;
|
|
|
|
rev = "830684f920333b8ff0946d6b807e8be642eec3ef";
|
|
|
|
sha256 = "17sjxhzhmz4893x3x054anp4xvqd1px15nv3fj2m7i6r0vbgpm0j";
|
2018-06-01 21:02:24 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
nativeBuildInputs = [
|
|
|
|
makeWrapper
|
|
|
|
];
|
|
|
|
|
|
|
|
postFixup = ''
|
2020-04-28 01:50:57 +00:00
|
|
|
wrapProgram $out/bin/dep2nix \
|
2018-09-11 11:47:16 +00:00
|
|
|
--prefix PATH : ${nix-prefetch-scripts}/bin
|
2018-06-01 21:02:24 +00:00
|
|
|
'';
|
|
|
|
|
2018-09-11 11:56:14 +00:00
|
|
|
goDeps = ./deps.nix;
|
2018-06-01 21:02:24 +00:00
|
|
|
|
2021-01-11 07:54:33 +00:00
|
|
|
meta = with lib; {
|
2018-06-01 21:02:24 +00:00
|
|
|
description = "Convert `Gopkg.lock` files from golang dep into `deps.nix`";
|
|
|
|
license = licenses.bsd3;
|
2020-04-01 01:11:51 +00:00
|
|
|
homepage = "https://github.com/nixcloud/dep2nix";
|
2018-06-01 21:02:24 +00:00
|
|
|
maintainers = [ maintainers.mic92 ];
|
|
|
|
};
|
|
|
|
}
|