commit
b4a9badcb8
@ -1,26 +1,25 @@ |
||||
{ lib, buildGoPackage, fetchFromGitHub }: |
||||
{ lib, buildGoModule, fetchFromGitHub }: |
||||
|
||||
buildGoPackage rec { |
||||
pname = "compile-daemon-unstable"; |
||||
version = "2017-03-08"; |
||||
rev = "d447e567232bcb84cedd3b2be012c7127f31f469"; |
||||
|
||||
goPackagePath = "github.com/githubnemo/CompileDaemon"; |
||||
buildGoModule rec { |
||||
pname = "compile-daemon"; |
||||
version = "1.4.0"; |
||||
|
||||
src = fetchFromGitHub { |
||||
owner = "githubnemo"; |
||||
repo = "CompileDaemon"; |
||||
inherit rev; |
||||
sha256 = "0jfbipp3gd89n6d7gds1qvfkqvz80qdlqqhijxffh8z8ss0xinqc"; |
||||
rev = "v${version}"; |
||||
sha256 = "sha256-gpyXy7FO7ZVXJrkzcKHFez4S/dGiijXfZ9eSJtNlm58="; |
||||
}; |
||||
|
||||
goDeps = ./deps.nix; |
||||
vendorSha256 = "sha256-UDPOeg8jQbDB+Fr4x6ehK7UyQa8ySZy6yNxS1xotkgA="; |
||||
|
||||
ldflags = [ "-s" "-w" ]; |
||||
|
||||
meta = with lib; { |
||||
description = "Very simple compile daemon for Go"; |
||||
homepage = "https://github.com/githubnemo/CompileDaemon"; |
||||
license = licenses.bsd2; |
||||
maintainers = with maintainers; [ ]; |
||||
mainProgram = "CompileDaemon"; |
||||
inherit (src.meta) homepage; |
||||
}; |
||||
} |
||||
|
@ -1,48 +0,0 @@ |
||||
# This file was generated by https://github.com/kamilchm/go2nix v1.2.0-devel |
||||
[ |
||||
{ |
||||
goPackagePath = "github.com/fatih/color"; |
||||
fetch = { |
||||
type = "git"; |
||||
url = "https://github.com/fatih/color"; |
||||
rev = "9131ab34cf20d2f6d83fdc67168a5430d1c7dc23"; |
||||
sha256 = "111x6rhpxfjhwkjrmrirqqh6nc68q5g7air9fl5kgr3bg85hybr5"; |
||||
}; |
||||
} |
||||
{ |
||||
goPackagePath = "github.com/mattn/go-colorable"; |
||||
fetch = { |
||||
type = "git"; |
||||
url = "https://github.com/mattn/go-colorable"; |
||||
rev = "a392f450ea64cee2b268dfaacdc2502b50a22b18"; |
||||
sha256 = "1msiq5nb1sdhwfjv65hjnvr2s4pfsp8mv6f5z8aa8n9bjf0cksyc"; |
||||
}; |
||||
} |
||||
{ |
||||
goPackagePath = "github.com/mattn/go-isatty"; |
||||
fetch = { |
||||
type = "git"; |
||||
url = "https://github.com/mattn/go-isatty"; |
||||
rev = "57fdcb988a5c543893cc61bce354a6e24ab70022"; |
||||
sha256 = "1fkhmi3nhz6vasfvjzjjwxkbpwsb9hzc0g5h1rygqrnzjykl2r39"; |
||||
}; |
||||
} |
||||
{ |
||||
goPackagePath = "golang.org/x/sys"; |
||||
fetch = { |
||||
type = "git"; |
||||
url = "https://go.googlesource.com/sys"; |
||||
rev = "99f16d856c9836c42d24e7ab64ea72916925fa97"; |
||||
sha256 = "0g2x5krfhnraq03v0b48y3xv3ffg92pbgvps0npj9l7wq8q9hkmx"; |
||||
}; |
||||
} |
||||
{ |
||||
goPackagePath = "gopkg.in/fsnotify.v1"; |
||||
fetch = { |
||||
type = "git"; |
||||
url = "https://gopkg.in/fsnotify.v1"; |
||||
rev = "629574ca2a5df945712d3079857300b5e4da0236"; |
||||
sha256 = "06wfg1mmzjj04z7d0q1x2fai9k6hm957brngsaf02fa9a3qqanv3"; |
||||
}; |
||||
} |
||||
] |
@ -1,23 +1,24 @@ |
||||
{ lib, buildGoPackage, fetchFromGitHub }: |
||||
{ lib, buildGoModule, fetchFromGitHub }: |
||||
|
||||
buildGoPackage rec { |
||||
pname = "go-junit-report-unstable"; |
||||
version = "2018-06-14"; |
||||
rev = "385fac0ced9acaae6dc5b39144194008ded00697"; |
||||
|
||||
goPackagePath = "github.com/jstemmer/go-junit-report"; |
||||
buildGoModule rec { |
||||
pname = "go-junit-report"; |
||||
version = "1.0.0"; |
||||
|
||||
src = fetchFromGitHub { |
||||
inherit rev; |
||||
owner = "jstemmer"; |
||||
repo = "go-junit-report"; |
||||
sha256 = "109zs8wpdmc2ijc2khyqija8imay88ka6v50xvrpnnwnd3ywckxi"; |
||||
rev = "v${version}"; |
||||
sha256 = "sha256-/ER99EmYrERBjcJeYeV3GBq6lDjACM0loICg41hUuPQ="; |
||||
}; |
||||
|
||||
vendorSha256 = "sha256-pQpattmS9VmO3ZIQUFn66az8GSmB4IvYhTTCFn6SUmo="; |
||||
|
||||
ldflags = [ "-s" "-w" ]; |
||||
|
||||
meta = with lib; { |
||||
description = "Converts go test output to an xml report, suitable for applications that expect junit xml reports (e.g. Jenkins)"; |
||||
homepage = "https://${goPackagePath}"; |
||||
description = "Convert go test output to junit xml"; |
||||
homepage = "https://github.com/jstemmer/go-junit-report"; |
||||
license = licenses.mit; |
||||
maintainers = with maintainers; [ cryptix ]; |
||||
license = licenses.mit; |
||||
}; |
||||
} |
||||
|
@ -0,0 +1,25 @@ |
||||
{ lib, stdenv, fetchFromGitHub, cmake, gperf, openssl, zlib }: |
||||
|
||||
stdenv.mkDerivation { |
||||
pname = "telegram-bot-api"; |
||||
version = "5.7"; |
||||
|
||||
src = fetchFromGitHub { |
||||
repo = "telegram-bot-api"; |
||||
owner = "tdlib"; |
||||
rev = "c57b04c4c8c4e8d8bb6fdd0bd3bfb5b93b9d8f05"; |
||||
sha256 = "sha256-WetzX8GBdwQAnnZjek+W4v+QN1aUFdlvs+Jv6n1B+eY="; |
||||
fetchSubmodules = true; |
||||
}; |
||||
|
||||
nativeBuildInputs = [ cmake gperf ]; |
||||
buildInputs = [ openssl zlib ]; |
||||
|
||||
meta = with lib; { |
||||
description = "Telegram Bot API server"; |
||||
homepage = "https://github.com/tdlib/telegram-bot-api"; |
||||
license = licenses.boost; |
||||
maintainers = with maintainers; [ Anillc ]; |
||||
platforms = platforms.all; |
||||
}; |
||||
} |
@ -0,0 +1,186 @@ |
||||
{ lib, stdenv, system ? builtins.currentSystem, ovftoolBundles ? {} |
||||
, requireFile, buildFHSUserEnv, autoPatchelfHook, makeWrapper, unzip |
||||
, glibc, c-ares, libressl, curl, expat, icu60, xercesc, zlib |
||||
}: |
||||
|
||||
let |
||||
version = "4.4.1-16812187"; |
||||
|
||||
# FHS environment required to unpack ovftool on x86. |
||||
ovftoolX86Unpacker = buildFHSUserEnv rec { |
||||
name = "ovftool-unpacker"; |
||||
targetPkgs = pkgs: [ pkgs.bash ]; |
||||
multiPkgs = targetPkgs; |
||||
runScript = "bash"; |
||||
}; |
||||
|
||||
# unpackPhase for i686 and x86_64 ovftool self-extracting bundles. |
||||
ovftoolX86UnpackPhase = '' |
||||
runHook preUnpack |
||||
# This is a self-extracting shell script and needs a FHS environment to run. |
||||
# In reality, it could be doing anything, which is bad for reproducibility. |
||||
# Our postUnpack uses nix-hash to verify the hash to prevent problems. |
||||
# |
||||
# Note that the Arch PKGBUILD at |
||||
# https://aur.archlinux.org/cgit/aur.git/tree/PKGBUILD?h=vmware-ovftool |
||||
# appears to use xvfb-run - this hasn't been proven necessary so far. |
||||
# |
||||
cp ${ovftoolSource} ./ovftool.bundle |
||||
chmod +x ./ovftool.bundle |
||||
${ovftoolX86Unpacker}/bin/ovftool-unpacker ./ovftool.bundle -x ovftool |
||||
rm ovftool.bundle |
||||
extracted=ovftool/vmware-ovftool/ |
||||
if [ -d "$extracted" ]; then |
||||
# Move the directory we care about to ovftool/ |
||||
mv "$extracted" . |
||||
rm -r ovftool |
||||
mv "$(basename -- "$extracted")" ovftool |
||||
echo "ovftool extracted successfully" >&2 |
||||
else |
||||
echo "Could not find $extracted - are you sure this is ovftool?" >&2 |
||||
rm -r ovftool |
||||
exit 1 |
||||
fi |
||||
runHook postUnpack |
||||
''; |
||||
|
||||
# unpackPhase for aarch64 .zip. |
||||
ovftoolAarch64UnpackPhase = '' |
||||
runHook preUnpack |
||||
unzip ${ovftoolSource} |
||||
extracted=ovftool/ |
||||
if [ -d "$extracted" ]; then |
||||
echo "ovftool extracted successfully" >&2 |
||||
else |
||||
echo "Could not find $extracted - are you sure this is ovftool?" >&2 |
||||
exit 1 |
||||
fi |
||||
runHook postUnpack |
||||
''; |
||||
|
||||
# When the version is bumped, postUnpackHash will change |
||||
# for all these supported systems. Update it from the printed error on build. |
||||
# |
||||
# This is just a sanity check, since ovftool is a self-extracting bundle |
||||
# that could be doing absolutely anything on 2/3 of the supported platforms. |
||||
ovftoolSystems = { |
||||
"i686-linux" = { |
||||
filename = "VMware-ovftool-${version}-lin.i386.bundle"; |
||||
sha256 = "0gx78g3s77mmpir7jbiskna10i6262ihal1ywivlb6xxxxbhqzwj"; |
||||
unpackPhase = ovftoolX86UnpackPhase; |
||||
postUnpackHash = "1k8rp8ywhs0cl9aad37v1p0493bdvkxrsvwg5pgv2bhvjs4hqk7n"; |
||||
}; |
||||
"x86_64-linux" = { |
||||
filename = "VMware-ovftool-${version}-lin.x86_64.bundle"; |
||||
sha256 = "1kp2bp4d9i8y7q25yqff2bn62mh292lws7b66lyn8ka9b35kvnzc"; |
||||
unpackPhase = ovftoolX86UnpackPhase; |
||||
postUnpackHash = "0zvyakwi4iishqxxisihgh91bmdsfvj5vchm2c192hia03a143py"; |
||||
}; |
||||
"aarch64-linux" = { |
||||
filename = "VMware-ovftool-${version}-lin.aarch64.zip"; |
||||
sha256 = "0all8bwv5p5adnzqvrly6nzmxmfpywvlbfr0finr4n100yv0v1xy"; |
||||
unpackPhase = ovftoolAarch64UnpackPhase; |
||||
postUnpackHash = "16vyyzrmryi8b7mrd6nxnhywvvj2pw0ban4qfiqfahw763fn6971"; |
||||
}; |
||||
}; |
||||
|
||||
ovftoolSystem = if builtins.hasAttr system ovftoolSystems then |
||||
ovftoolSystems.${system} |
||||
else throw "System '${system}' is unsupported by ovftool"; |
||||
|
||||
ovftoolSource = if builtins.hasAttr system ovftoolBundles then |
||||
ovftoolBundles.${system} |
||||
else |
||||
requireFile { |
||||
name = ovftoolSystem.filename; |
||||
url = "https://my.vmware.com/group/vmware/downloads/get-download?downloadGroup=OVFTOOL441"; |
||||
sha256 = ovftoolSystem.sha256; |
||||
}; |
||||
in |
||||
stdenv.mkDerivation rec { |
||||
pname = "ovftool"; |
||||
inherit version; |
||||
|
||||
src = ovftoolSource; |
||||
|
||||
buildInputs = [ |
||||
glibc |
||||
libressl |
||||
c-ares |
||||
(curl.override { openssl = libressl; }) |
||||
expat |
||||
icu60 |
||||
xercesc |
||||
zlib |
||||
]; |
||||
|
||||
nativeBuildInputs = [ autoPatchelfHook makeWrapper unzip ]; |
||||
|
||||
sourceRoot = "."; |
||||
|
||||
unpackPhase = ovftoolSystem.unpackPhase; |
||||
|
||||
postUnpackHash = ovftoolSystem.postUnpackHash; |
||||
|
||||
# Expects a directory named 'ovftool' containing the ovftool install. |
||||
# Based on https://aur.archlinux.org/packages/vmware-ovftool/ |
||||
# with the addition of a libexec directory and a Nix-style binary wrapper. |
||||
installPhase = '' |
||||
runHook preInstall |
||||
if [ -d ovftool ]; then |
||||
# Ensure we're in the staging directory |
||||
cd ovftool |
||||
fi |
||||
# libraries |
||||
install -m 755 -d "$out/lib/${pname}" |
||||
# These all appear to be VMWare proprietary except for libgoogleurl. |
||||
# The rest of the libraries that the installer extracts are omitted here, |
||||
# and provided in buildInputs. |
||||
# |
||||
# FIXME: can we replace libgoogleurl? Possibly from Chromium? |
||||
# |
||||
install -m 644 -t "$out/lib/${pname}" \ |
||||
libgoogleurl.so.59 \ |
||||
libssoclient.so \ |
||||
libvim-types.so libvmacore.so libvmomi.so |
||||
# ovftool specifically wants 1.0.2 but our libcrypto is named 1.0.0 |
||||
ln -s "${lib.getLib libressl}/lib/libcrypto.so" \ |
||||
"$out/lib/${pname}/libcrypto.so.1.0.2" |
||||
ln -s "${lib.getLib libressl}/lib/libssl.so" \ |
||||
"$out/lib/${pname}/libssl.so.1.0.2" |
||||
# libexec |
||||
install -m 755 -d "$out/libexec/${pname}" |
||||
install -m 755 -t "$out/libexec/${pname}" ovftool.bin |
||||
install -m 644 -t "$out/libexec/${pname}" icudt44l.dat |
||||
# libexec resources |
||||
for subdir in "certs" "env" "env/en" "schemas/DMTF" "schemas/vmware"; do |
||||
install -m 755 -d "$out/libexec/${pname}/$subdir" |
||||
install -m 644 -t "$out/libexec/${pname}/$subdir" "$subdir"/*.* |
||||
done |
||||
# EULA/OSS files |
||||
install -m 755 -d "$out/share/licenses/${pname}" |
||||
install -m 644 -t "$out/share/licenses/${pname}" \ |
||||
"vmware.eula" "vmware-eula.rtf" "open_source_licenses.txt" |
||||
# documentation files |
||||
install -m 755 -d "$out/share/doc/${pname}" |
||||
install -m 644 -t "$out/share/doc/${pname}" "README.txt" |
||||
# binary wrapper; note that LC_CTYPE is defaulted to en_US.UTF-8 by |
||||
# VMWare's wrapper script. We use C.UTF-8 instead. |
||||
install -m 755 -d "$out/bin" |
||||
makeWrapper "$out/libexec/${pname}/ovftool.bin" "$out/bin/ovftool" \ |
||||
--set-default LC_CTYPE C.UTF-8 \ |
||||
--prefix LD_LIBRARY_PATH : "$out/lib" |
||||
runHook postInstall |
||||
''; |
||||
|
||||
preFixup = '' |
||||
addAutoPatchelfSearchPath "$out/lib" |
||||
''; |
||||
|
||||
meta = with lib; { |
||||
description = "VMWare tools for working with OVF, OVA, and VMX images"; |
||||
license = licenses.unfree; |
||||
maintainers = with maintainers; [ numinit wolfangaukang ]; |
||||
platforms = builtins.attrNames ovftoolSystems; |
||||
}; |
||||
} |
Loading…
Reference in new issue