{pkgs, patchElf ? false, name, url, sha256 ? "0000000000000000000000000000000000000000000000000000"}: with pkgs; stdenv.mkDerivation { inherit name; src = fetchurl { url = url; sha256 = sha256; }; nativeBuildInputs = [ ] ++ lib.optionals patchElf [ autoPatchelfHook ]; phases = ["installPhase" "fixupPhase"]; installPhase = '' mkdir -p $out/bin cp $src $out/bin/${name} chmod u+x $out/bin/${name} ''; }