nixpkgs-suyu/pkgs/development/tools/dep2nix/default.nix

35 lines
788 B
Nix
Raw Normal View History

2018-06-01 23:02:24 +02:00
{ stdenv, fetchFromGitHub, buildGoPackage
2018-09-11 13:47:16 +02:00
, makeWrapper, nix-prefetch-scripts }:
2018-06-01 23:02:24 +02:00
buildGoPackage rec {
name = "dep2nix-${version}";
2018-09-11 13:47:16 +02:00
version = "0.0.2";
2018-06-01 23:02:24 +02:00
goPackagePath = "github.com/nixcloud/dep2nix";
src = fetchFromGitHub {
owner = "nixcloud";
repo = "dep2nix";
rev = version;
2018-09-11 13:47:16 +02:00
sha256 = "17csgnd6imr1l0gpirsvr5qg7z0mpzxj211p2nwqilrvbp8zj7vg";
2018-06-01 23:02:24 +02:00
};
nativeBuildInputs = [
makeWrapper
];
postFixup = ''
wrapProgram $bin/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
meta = with stdenv.lib; {
description = "Convert `Gopkg.lock` files from golang dep into `deps.nix`";
license = licenses.bsd3;
homepage = https://github.com/nixcloud/dep2nix;
maintainers = [ maintainers.mic92 ];
};
}