{ pkgs ? import <nixpkgs> {} }:
pkgs.stdenv.mkDerivation {
  name = "goss";
  src = pkgs.fetchurl {
    url = "https://github.com/aelsabbahy/goss/releases/download/v0.3.13/goss-linux-amd64";
    sha256 = "1q0kfdbifffszikcl0warzmqvsbx4bg19l9a3vv6yww2jvzj4dgb";
  };
  phases = ["installPhase" "patchPhase"];
  installPhase = ''
    mkdir -p $out/bin
    cp $src $out/bin/goss
    chmod +x $out/bin/goss
    cp $out/bin/goss .
  '';
}
