Skip to content

Instantly share code, notes, and snippets.

View thomasjm's full-sized avatar

Tom McLaughlin thomasjm

View GitHub Profile
@thomasjm
thomasjm / gist:7a23341b56349c616e1534acc2280a3b
Created November 6, 2018 02:10
Output of `type nix-channel ; nix-channel -vvvvvvv --update`
nix-channel is /home/tom/tools/nix_build/bin/nix-channel
locking path '/home/tom/.cache/nix/tarballs/071qfgdy82dkn58wqsv1ri3zlch4amvvfgn5vmwh9fvb4spcv18y-file'
download thread waiting for 10000 ms
lock acquired on '/home/tom/.cache/nix/tarballs/071qfgdy82dkn58wqsv1ri3zlch4amvvfgn5vmwh9fvb4spcv18y-file.lock'
acquiring global GC lock '/nix_frozen/var/nix/gc.lock'
acquiring read lock on '/nix_frozen/var/nix/temproots/7044'
acquiring write lock on '/nix_frozen/var/nix/temproots/7044'
downgrading to read lock on '/nix_frozen/var/nix/temproots/7044'
lock released on '/home/tom/.cache/nix/tarballs/071qfgdy82dkn58wqsv1ri3zlch4amvvfgn5vmwh9fvb4spcv18y-file.lock'
error: path '/nix/store/p9bczv4dp4yk8qp9pq5sdvh56pl3hxyd-nixpkgs-unstable' is not in the Nix store
@thomasjm
thomasjm / lsp_repro.py
Created December 5, 2018 21:31
Repro for javascript-typescript-langserver issue 502
#!/usr/bin/python
import atexit
import os
import socket
import subprocess
from time import sleep
port = 5000
...
installing /nix_frozen/store/rm886kfylvz4gz321scwq0i2kdbiy6s6-nodejs-10.12.0/lib/node_modules/npm/html/doc/cli/npm-shrinkwrap.html
installing /nix_frozen/store/rm886kfylvz4gz321scwq0i2kdbiy6s6-nodejs-10.12.0/lib/node_modules/npm/html/doc/cli/npm-cache.html
installing /nix_frozen/store/rm886kfylvz4gz321scwq0i2kdbiy6s6-nodejs-10.12.0/lib/node_modules/npm/html/doc/cli/npm-version.html
installing /nix_frozen/store/rm886kfylvz4gz321scwq0i2kdbiy6s6-nodejs-10.12.0/lib/node_modules/npm/html/doc/cli/npm-stars.html
installing /nix_frozen/store/rm886kfylvz4gz321scwq0i2kdbiy6s6-nodejs-10.12.0/lib/node_modules/n
builder for '/nix_frozen/store/7c31w5b5w4kxrkyqkln8dvhg3yp20y5l-nodejs-10.12.0.drv' failed with exit code 2
@thomasjm
thomasjm / manylinux1.nix
Last active February 15, 2019 00:40
Nix derivation for adding manylinux1 support to Python
{stdenv, pkgs}:
with stdenv.lib;
with pkgs;
rec {
# To be manylinux1 compatible, we have to be able to link against any of the libraries below (PEP 513)
# https://www.python.org/dev/peps/pep-0513
desiredLibraries = [
"libpanelw.so.5"
@thomasjm
thomasjm / default.nix
Created July 11, 2019 01:06
Attempted out-of-tree cling build
{ stdenv, fetchgit, fetchFromGitHub, cmake, glibc, libffi, makeWrapper, python }:
rec {
llvmClingPatched = stdenv.mkDerivation {
pname = "llvm-cling-patched";
version = "unstable-2018-11-20";
src = fetchgit {
url = "http://root.cern.ch/git/llvm.git";
rev = "e0b472e46eb5861570497c2b9efabf96f2d4a485"; # This is the head of the cling-patches branch
@thomasjm
thomasjm / tex2svg.html
Created January 21, 2020 11:32
From running ./tex2svg "x^2 + y^2"
<html>
<head>
<style>
mjx-container[jax="SVG"] > svg {
overflow: visible;
}
mjx-container[jax="SVG"] > svg a {
fill: blue;
# Copyright(c) Microsoft Corporation
# All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the License); you may not use
# this file except in compliance with the License. You may obtain a copy of the
# License at http://www.apache.org/licenses/LICENSE-2.0
#
# THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS
# OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY
# IMPLIED WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE,
FROM ubuntu:20.04
RUN apt-get update
RUN DEBIAN_FRONTEND=noninteractive apt-get install -y sudo curl emacs git
RUN mkdir /nix
RUN chmod a+rwx /nix
RUN adduser user --home /home/user --disabled-password --gecos "" --shell /bin/bash
USER user
@thomasjm
thomasjm / cling_logs_cmake_trace_expand
Created November 21, 2022 22:45
Trying to build Cling 0.9 on Nix with CMake --trace-expand
This file has been truncated, but you can view the full file.
warning: Git tree '/home/tom/tools/nixpkgs' is dirty
building '/nix/store/0wrxx60rz7jracyj9z5lv9ci8kwnwycb-cling-unwrapped-0.9.drv'...
cling-unwrapped> unpacking sources
cling-unwrapped> unpacking source archive /nix/store/79z3awvbfa17789j6mwhpnkcqv907cj4-clang
cling-unwrapped> source root is clang
cling-unwrapped> patching sources
cling-unwrapped> configuring
cling-unwrapped> fixing cmake files...
cling-unwrapped> cmake flags: -DCMAKE_FIND_USE_SYSTEM_PACKAGE_REGISTRY=OFF -DCMAKE_FIND_USE_PACKAGE_REGISTRY=OFF -DCMAKE_EXPORT_NO_PACKAGE_REGISTRY=ON -DCMAKE_BUILD_TYPE=Release -DBUILD_TESTING=OFF -DCMAKE_INSTALL_LOCALEDIR=/nix/store/8fa0f0w5sz681cggid1jrzppsq54mgzz-cling-unwrapped-0.9/share/locale -DCMAKE_INSTALL_LIBEXECDIR=/nix/store/8fa0f0w5sz681cggid1jrzppsq54mgzz-cling-unwrapped-0.9/libexec -DCMAKE_INSTALL_LIBDIR=/nix/store/8fa0f0w5sz681cggid1jrzppsq54mgzz-cling-unwrapped-0.9/lib -DCMAKE_INSTALL_DOCDIR=/nix/store/8fa0f0w5sz681cggid1jrzppsq54mgzz-cling-unwrapped-0.9/share/doc/Clang -DCMAKE_INSTALL_INFODIR=/nix
2023-04-26 01:31:20.5428 UTC [Debug] () --> {
"id": 1,
"jsonrpc": "2.0",
"method": "initialize",
"params": {
"capabilities": {
"general": {
"markdown": {
"parser": ""
},