{ buildGoModule, pkgs, fetchFromGitHub }: with import {}; # bring all of Nixpkgs into scope # stdenv.mkDerivation rec { buildGoModule rec { pname = "zeit"; version = "0.0.7"; src = fetchFromGitHub { owner = "mrusme"; repo = "zeit"; rev = "v0.0.7"; sha256 = "SCBNMgFBmyeJHC8VU1K2zDhhvdYi9RqaKIcJ4ziKNa0="; }; vendorHash = "sha256-gn5fwwBO4eUUYG1PJD7o8xS+tZO+P5M33fVvg2NDANw="; # meta = with stdenv.lib; { # description = ""; # homepage = ""; # license = licenses.gpl; # maintainers = with maintainers; []; # platforms = []; # }; nativeBuildInputs = with pkgs.buildPackages; [ go ]; buildInputs = [ ]; patchPhase = '' sed -i 's/VERSION=0.0/VERSION=${version}/g' Makefile ''; buildPhase = '' # gcc program.c -o myprogram # PREFIX=$out make # go build -ldflags "-X github.com/mrusme/zeit/z.VERSION=$(version)" ''; installPhase = '' mkdir -p $out/bin cp zeit $out/bin ''; }