Skip to content

Instantly share code, notes, and snippets.

Allen Short washort

Block or report user

Report or block washort

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View pleroma-deps.nix
{
jose = {
buildTool = "mix";
deps = [
"base64url"
];
fetchHex = {
sha256 = "7946d1e5c03a76ac9ef42a6e6a20001d35987afd68c2107bcd8f01a84e75aa73";
url = "https://repo.hex.pm/tarballs/jose-1.8.4.tar";
};
@washort
washort / default.nix
Last active Aug 7, 2019
pleroma nix packaging
View default.nix
{ pkgs ? import <nixpkgs> {} }:
let cfg = {
instance = {
name = "Pleroma for Nix";
email = "admin@example.org";
notify_email = "noreply@example.org";
description = "Pleroma demo on NixOS";
};
endpoint = {
secret_key_base = "big-secret-key";
View bitwarden-web.nix
{ lib, stdenv, fetchurl }:
stdenv.mkDerivation rec {
name= "bitwarden-web-${version}";
version = "2.8.0d";
src = fetchurl {
url = "https://github.com/dani-garcia/bw_web_builds/releases/download/v${version}/bw_web_v${version}.tar.gz";
sha256 = "042hdwyn1shf973f1d8zyvslrny87pq2n78xryrb1mqg2806s6fz";
};
View cargo-config-1.patch
diff -Nru .cargo-orig/config .cargo/config
--- a/.cargo/config 1969-12-31 18:00:00.000000000 -0600
+++ b/.cargo/config 2019-02-04 22:55:37.237658171 -0600
@@ -0,0 +1,17 @@
+[source.crates-io]
+replace-with = "vendored-sources"
+
+[source."https://github.com/dani-garcia/msgpack-rust"]
+git = "https://github.com/dani-garcia/msgpack-rust"
+branch = "master"
View gist:5335e7153602c21a1ca85b9ef9eda901
[nix-shell:~/Projects/typhon]$ while rr record -h python main.py -l mast loader run capn/testCapn; do :; done
rr: Saving execution to trace directory `/home/washort/.local/share/rr/python-36'.
[version:WARNING] Errors getting Mercurial information: Not running from a Mercurial repository!
Traceback (most recent call last):
File "/nix/store/0a5xzivfxv5zz4dfjdr05kcyr9kpaw90-pypy6.0-macropy-1.0.4/site-packages/macropy/core/import_hooks.py", line 76, in find_module
macropy.exporter.export_transformed(code, tree, module_name, file.name)
File "/nix/store/0a5xzivfxv5zz4dfjdr05kcyr9kpaw90-pypy6.0-macropy-1.0.4/site-packages/macropy/core/exporters.py", line 30, in export_transformed
with open(new_path, "w") as f:
IOError: [Errno 2] No such file or directory: 'typhon/exported/objects/files.py'
@washort
washort / 21.txt
Last active Feb 2, 2019
testCapn intermittent failures
View 21.txt
rr: Saving execution to trace directory `/home/washort/.local/share/rr/mt-typhon-21'.
Taking initial turn in script...
TRACE: time 1549074526.559192 vat pa
~ "Loader args: [\"run\", \"capn/testCapn\"]"
TRACE: time 1549074526.559356 vat pa
~ "Loading capn/testCapn"rr: Saving execution to trace directory `/home/washort/.local/share/rr/mt-typhon-21'.
completed/running/errors/total: 0/0/0/0 Last source: null Last test: nullTRACTaking initial turn in script...
E: time 1549074532.254664 vat pa
~ TRACE: time 1549074526.559192 vat pa
View testCapn.mt
import "lib/codec/utf8" =~ [=> UTF8 :DeepFrozen]
import "lib/capn" =~ capn :DeepFrozen
import "tools/capnpc" =~ ["main" => capnpc :DeepFrozen]
exports (main)
def main(_argv, => currentProcess, => makeProcess, => makeFileResource) as DeepFrozen:
def [ (b`CAPNPC`) => CAPNPC ] | _ := currentProcess.getEnvironment()
def compile(schema):
def tmp := makeFileResource("/tmp/test.capnp").setContents(
UTF8.encode(schema, null))
View wat2.mt
# Doesn't use 'unittest' because of dependency on `makeProcess`.
import "lib/codec/utf8" =~ [=> UTF8 :DeepFrozen]
import "lib/streams" =~ [=> collectBytes :DeepFrozen]
exports (main)
def main(_argv, => makeProcess) as DeepFrozen:
def compile():
def pr := makeProcess(b`/nix/store/wm8va53fh5158ipi0ic9gir64hrvqv1z-coreutils-8.29/bin/ls`, [b`ls`, b`-lR`],
[].asMap(),
"stdout" => true)
View readerwriter.mt
object _ :null as DeepFrozen:
""
method dependencies() :List.get(Str):
""
_makeList.run("lib/capn")
method run(package :null) :Map.get(Str, DeepFrozen):
""
def via (_mapExtract.run("makeMessageReader")) [makeMessageReader :DeepFrozen, via (_mapExtract.run("makeMessageWriter")) [makeMessageWriter :DeepFrozen, via (_mapExtract.run("text")) [text :DeepFrozen, _ :null]]] exit null := package.import("lib/capn")
object reader :null as DeepFrozen:
View monte.log
these derivations will be built:
/nix/store/dac36cfcjb35z5vgzc2q5qyskxa1v11h-typhon.drv
/nix/store/44r96qqhxwy7jd0681sm1l44ipwfp7fg-monte.drv
/nix/store/mkj0lk1vdmb7dna7g5084n0i6lb88y1v-capnpc-monte.drv
/nix/store/awyikgz4vym0qmkc6gkcnd5ika6a9krv-monte.drv
building '/nix/store/dac36cfcjb35z5vgzc2q5qyskxa1v11h-typhon.drv'...
unpacking sources
unpacking source archive /nix/store/yidbvkyflvmmlihv0gl6f6xqyc2k0021-typhon
source root is typhon
patching sources
You can’t perform that action at this time.