mirror of
https://github.com/tweag/gomod2nix.git
synced 2024-11-08 11:39:11 +00:00
21 lines
470 B
Nix
21 lines
470 B
Nix
{ pkgs ? import <nixpkgs> { } }:
|
|
|
|
let
|
|
buildGoApplication = pkgs.buildGoApplication or pkgs.callPackage ./builder { };
|
|
inherit (pkgs) lib;
|
|
|
|
in buildGoApplication {
|
|
pname = "gomod2nix";
|
|
version = "0.1";
|
|
src = lib.cleanSource ./.;
|
|
modules = ./gomod2nix.toml;
|
|
|
|
nativeBuildInputs = [
|
|
pkgs.makeWrapper
|
|
];
|
|
|
|
postInstall = ''
|
|
wrapProgram $out/bin/gomod2nix --prefix PATH : ${lib.makeBinPath [ pkgs.nix-prefetch-git ]}
|
|
rm -f $out/bin/builder
|
|
'';
|
|
}
|