Skip to content

Instantly share code, notes, and snippets.

@Zetten
Zetten / jq.BUILD
Last active January 9, 2020 11:08 — forked from benley/jq.BUILD
bazel build jq
licenses(["notice"])
cc_library(
name = "_jq_generated_hdrs",
hdrs = [
"src/version.h",
":src/builtin.inc",
],
include_prefix = "src",
strip_include_prefix = "src",
@Zetten
Zetten / patched_http_archive.bzl
Created November 15, 2017 13:04
Bazel patched http archive
# https://gist.github.com/damienmg/db6b8515c6f656cd0a6169d87eca66a2
def _new_patched_http_archive_impl(rctx):
# Download the archive and extract it
rctx.download_and_extract(
url=rctx.attr.urls,
output=rctx.path(""),
stripPrefix=rctx.attr.strip_prefix,
type=rctx.attr.type,
sha256=rctx.attr.sha256)
@Zetten
Zetten / WORKSPACE
Last active November 15, 2017 13:08
Bazel RPM repository rule for EL6 Devtoolset2
load("@com_cgi_idpf//tools/bzl:rpm_bundle_archive.bzl", "new_rpm_bundle_archive")
new_rpm_bundle_archive(
name = "el6_devtoolset2",
build_file = "//third-party/cxx/toolchain/devtoolset2_linux_gcc:el6_devtoolset2.BUILD",
urls = {
"http://mirror.centos.org/centos/6/os/x86_64/Packages/bash-4.1.2-48.el6.x86_64.rpm": "1c097552862774425f9f09daccff4a4980d9ffc83942d28b57b1151f790a9e4b",
"http://mirror.centos.org/centos/6/os/x86_64/Packages/coreutils-8.4-46.el6.x86_64.rpm": "6f978d78b2fee279f617bee86daa70c388cffdd914b19e2599799146a108bf84",
"http://mirror.centos.org/centos/6/os/x86_64/Packages/gmp-4.3.1-12.el6.x86_64.rpm": "df8aaeb80aadbfd03634c3091148aac5ab5079373f427fb42051089f3a95fc8d",
"http://mirror.centos.org/centos/6/os/x86_64/Packages/libgcc-4.4.7-18.el6.x86_64.rpm": "bb45e0b836c1fd8daee9beb96bd584d5550eff614c1b8f8c4b67a12da93db7af",
@Zetten
Zetten / BUILD
Last active July 29, 2019 11:50
Bazel spring-boot jar
java_binary(
name = "spring_boot_packager",
srcs = ["src/SpringBootPackager.java"],
main_class = "src.SpringBootPackager",
visibility = ["//visibility:public"],
deps = ["//third_party/java:org_springframework_boot_spring_boot_loader_tools"],
)
@Zetten
Zetten / build.gradle
Last active November 3, 2020 23:54
Bazel workspace generation script
plugins {
id "com.github.ben-manes.versions" version "0.17.0"
id "io.spring.dependency-management" version "1.0.5.RELEASE"
id "com.github.jk1.dependency-license-report" version '1.0'
}
apply plugin: 'base'
group = 'com.example'
version = '0.0.0'
@Zetten
Zetten / buck2junit.py
Last active August 30, 2016 13:32
Buck test reports to JUnit XML format
from __future__ import division
import os
from lxml import etree
BUCK2JUNIT_XSLT = '''<xsl:stylesheet version="2.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:f="http://func"
exclude-result-prefixes="f">
#
# delete_child_subkey.rb
#
# === Author
#
# Richard Clark <richard@fohnet.co.uk>
#
module Puppet::Parser::Functions
newfunction(:delete_child_subkey, :type => :rvalue, :doc => <<-EOS
Given a hash containing nested hashes, a single or array of regular
@Zetten
Zetten / log
Created September 13, 2014 15:14
sonar-jacoco-issue log
$ mvn clean install && mvn sonar:sonar
[INFO] Scanning for projects...
[INFO] ------------------------------------------------------------------------
[INFO] Reactor Build Order:
[INFO]
[INFO] Sonar/JaCoCo Issue Example
[INFO] Module One
[INFO] Module Two
[INFO]
[INFO] ------------------------------------------------------------------------