4a7f99d55d
Part of: https://github.com/NixOS/nixpkgs/issues/108938 meta = with stdenv.lib; is a widely used pattern. We want to slowly remove the `stdenv.lib` indirection and encourage people to use `lib` directly. Thus let’s start with the meta field. This used a rewriting script to mostly automatically replace all occurances of this pattern, and add the `lib` argument to the package header if it doesn’t exist yet. The script in its current form is available at https://cs.tvl.fyi/depot@2f807d7f141068d2d60676a89213eaa5353ca6e0/-/blob/users/Profpatsch/nixpkgs-rewriter/default.nix
35 lines
823 B
Nix
35 lines
823 B
Nix
{ lib, stdenv, fetchFromGitHub, buildGoPackage
|
|
, makeWrapper, nix-prefetch-scripts }:
|
|
|
|
buildGoPackage rec {
|
|
pname = "dep2nix";
|
|
version = "unstable-2019-04-02";
|
|
|
|
goPackagePath = "github.com/nixcloud/dep2nix";
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "nixcloud";
|
|
repo = pname;
|
|
rev = "830684f920333b8ff0946d6b807e8be642eec3ef";
|
|
sha256 = "17sjxhzhmz4893x3x054anp4xvqd1px15nv3fj2m7i6r0vbgpm0j";
|
|
};
|
|
|
|
nativeBuildInputs = [
|
|
makeWrapper
|
|
];
|
|
|
|
postFixup = ''
|
|
wrapProgram $out/bin/dep2nix \
|
|
--prefix PATH : ${nix-prefetch-scripts}/bin
|
|
'';
|
|
|
|
goDeps = ./deps.nix;
|
|
|
|
meta = with lib; {
|
|
description = "Convert `Gopkg.lock` files from golang dep into `deps.nix`";
|
|
license = licenses.bsd3;
|
|
homepage = "https://github.com/nixcloud/dep2nix";
|
|
maintainers = [ maintainers.mic92 ];
|
|
};
|
|
}
|