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