Skip to content

Instantly share code, notes, and snippets.

View risicle's full-sized avatar

Robert Scott risicle

View GitHub Profile
{ lib
, stdenvNoCC
, fetchFromGitHub
, awscli
, coreutils
, makeWrapper
, gnugrep
, gnused
, jq
, which
=================================== FAILURES ===================================
______________________________ test_verify_cases _______________________________
[gw12] linux -- Python 3.11.7 /nix/store/asiphbpiy2gmidfm3xbwcikayhs66289-python3-3.11.7/bin/python3.11
lib/python3.11/site-packages/scipy/linalg/tests/test_decomp_polar.py:89: in test_verify_cases
verify_polar(a)
a = [[1, 2, 3]]
lib/python3.11/site-packages/scipy/linalg/tests/test_decomp_polar.py:77: in verify_polar
evals = eigh(p, eigvals_only=True)
a = [[1, 2, 3]]
aa = array([[1, 2, 3]])
@risicle
risicle / netplan2nixos.jq
Created November 18, 2023 22:03
`jq` script to convert a netplan config file (converted from yaml) to nixos-importable json. Does not support all netplan features obviously.
{
systemd: {
network: {
netdevs: (
.network.ethernets | with_entries(.value |= {
netdevConfig: {Name: ."set-name"},
matchConfig: {MACAddress: .match.macaddress}
})
)
}
services.postgresql = {
enable = true;
enableTCPIP = true;
ensureDatabases = [
"concourse"
];
ensureUsers = [
{
name = "concourse";
ensurePermissions = {
unpacking sources
unpacking source archive /nix/store/mw664kgniq3ch73i66zlgbg7krksizlp-source
source root is source
patching sources
updateAutotoolsGnuConfigScriptsPhase
configuring
no configure script, doing nothing
building
build flags: SHELL=/nix/store/a7f7xfp9wyghf44yv6l6fv9dfw492hd3-bash-5.2-p15/bin/bash
[CC] buffer.o
unpacking sources
unpacking source archive /nix/store/ydb6n6fghhx32izg0pdk8x0bkrmnd61k-source
source root is source
patching sources
updateAutotoolsGnuConfigScriptsPhase
Updating Autotools / GNU config script to a newer upstream version: ./nng/extern/msquic/submodules/openssl/krb5/src/config/config.sub
Updating Autotools / GNU config script to a newer upstream version: ./nng/extern/msquic/submodules/openssl/krb5/src/config/config.guess
configuring
fixing cmake files...
cmake flags: -GNinja -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/csi69820lpy04q1rc610qkm3k7cxs7i8-nanomq-0.18.2/share/locale -DCMAKE_INSTALL_LIBEXECDIR=/nix/store/csi69820lpy04q1rc610qkm3k7cxs7i8-nanomq-0.18.2/libexec -DCMAKE_INSTALL_LIBDIR=/nix/store/csi69820lpy04q1rc610qkm3k7cxs7i8-nanomq-0.18.2/lib -DCMAKE_INSTALL_DOCDIR=/nix/store/csi69820lpy04q1rc610qkm3k7cxs7i8-nanomq-0.18.2/share
unpacking sources
unpacking source archive /nix/store/m51ns7p2rjn91lzr1021b05z57176d3y-root_v5.34.38.source.tar.gz
source root is root
setting SOURCE_DATE_EPOCH to timestamp 1520866180 of file root/etc/gitinfo.txt
patching sources
applying patch /nix/store/xzi1l7qs3ms4bsc1qnrsjv723rv0frdn-sw_vers_root5.patch
patching file build/unix/compiledata.sh
patching file cmake/modules/SetUpMacOS.cmake
patching file config/root-config.in
patching file cint/ROOT/CMakeLists.txt
@risicle
risicle / gist:2b87aedcdf3bb59fa4fbd245228ea070
Created August 21, 2022 22:13
flask-restful test failure
_________________ APITestCase.test_exception_header_forwarded __________________
self = <tests.test_api.APITestCase testMethod=test_exception_header_forwarded>
def test_exception_header_forwarded(self):
"""Test that HTTPException's headers are extended properly"""
app = Flask(__name__)
app.config['DEBUG'] = True
api = flask_restful.Api(app)
sum by (instance) (rate(http_server_request_duration_seconds_sum{org="digitalmarketplace", space="$space", job=~"$app(-release)?"}[1m]))
#!/bin/bash
ALL_ATTRS_NIX=$(mktemp)
PKGS_PATH="."
#NIX_SYSTEM="x86_64-linux"
cat > "$ALL_ATTRS_NIX" <<EOF
{}@args: let pkgs = (import $(realpath "$PKGS_PATH") args); in with pkgs; builtins.filter (x: x != null) (builtins.map (x: if (builtins.tryEval x.drvPath).success then x else null) [
EOF