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

35 lines
795 B
Nix
Raw Normal View History

2018-06-01 22:02:24 +01:00
{ stdenv, fetchFromGitHub, buildGoPackage
2018-09-11 12:47:16 +01:00
, makeWrapper, nix-prefetch-scripts }:
2018-06-01 22:02:24 +01:00
buildGoPackage rec {
name = "dep2nix-${version}";
2018-09-11 12:47:16 +01:00
version = "0.0.2";
2018-06-01 22:02:24 +01:00
goPackagePath = "github.com/nixcloud/dep2nix";
src = fetchFromGitHub {
owner = "nixcloud";
repo = "dep2nix";
rev = version;
2018-09-11 12:47:16 +01:00
sha256 = "17csgnd6imr1l0gpirsvr5qg7z0mpzxj211p2nwqilrvbp8zj7vg";
2018-06-01 22:02:24 +01:00
};
nativeBuildInputs = [
makeWrapper
];
postFixup = ''
wrapProgram $bin/bin/dep2nix \
2018-09-11 12:47:16 +01:00
--prefix PATH : ${nix-prefetch-scripts}/bin
2018-06-01 22:02:24 +01:00
'';
2018-09-11 12:47:16 +01:00
goDeps = src + "/deps.nix";
2018-06-01 22:02:24 +01: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 ];
};
}