Skip to content

Instantly share code, notes, and snippets.

View dhess's full-sized avatar

Drew Hess dhess

View GitHub Profile
<<ghc: 1338865608 bytes, 246 GCs, 30276086/102572440 avg/max bytes residency (8 samples), 211M in use, 0.000 INIT (0.000 elapsed), 19.478 MUT (56.294 elapsed), 4.512 GC (4.668 elapsed) :ghc>>
<<ghc: 3660834260 bytes, 305 GCs, 40960988/113517708 avg/max bytes residency (9 samples), 250M in use, 0.000 INIT (0.000 elapsed), 22.212 MUT (76.508 elapsed), 6.243 GC (6.394 elapsed) :ghc>>
"inplace/bin/ghc-stage1" -hisuf hi -osuf o -hcsuf hc -static -H32m -O -Wall -Iincludes -Iincludes/dist -Iincludes/dist-derivedconstants/header -Iincludes/dist-ghcconstants/header -this-unit-id ghc-8.2.2 -hide-all-packages -i -icompiler/backpack -icompiler/basicTypes -icompiler/cmm -icompiler/codeGen -icompiler/coreSyn -icompiler/deSugar -icompiler/ghci -icompiler/hsSyn -icompiler/iface -icompiler/llvmGen -icompiler/main -icompiler/nativeGen -icompiler/parser -icompiler/prelude -icompiler/profiling -icompiler/rename -icompiler/simplCore -icompiler/simplStg -icompiler/specialise -icompiler/stgSyn -icompiler/stranal -icompiler/ty
@dhess
dhess / nix-repl
Last active January 6, 2018 00:20
$ nix-repl jobsets/release.nix
Welcome to Nix version 1.11.16. Type :? for help.
Loading ‘jobsets/release.nix’...
Added 2 variables.
nix-repl> ansible-env
{ }
nix-repl>
$ darwin-rebuild switch
building the system configuration...
writing defaults...
setting up user launchd services...
checking for hydra group... yes
checking for hydra user... no, created
2018-01-04 16:41:05.117 sysadminctl[4390:88133] Failed to authenticate with SystemAdministration framework.
@dhess
dhess / dmesg
Created November 15, 2017 23:21
[ 0.000000] Booting Linux on physical CPU 0x0
[ 0.000000] Linux version 4.9.59 (nixbld@localhost) (gcc version 6.4.0 (GCC) ) #1-NixOS SMP PREEMPT Thu Jan 1 00:00:01 UTC 1970
[ 0.000000] CPU: ARMv7 Processor [413fc082] revision 2 (ARMv7), cr=10c5387d
[ 0.000000] CPU: PIPT / VIPT nonaliasing data cache, VIPT aliasing instruction cache
[ 0.000000] OF: fdt:Machine model: TI AM335x BeagleBone Black
[ 0.000000] cma: Reserved 48 MiB at 0x9c800000
[ 0.000000] Memory policy: Data cache writeback
[ 0.000000] On node 0 totalpages: 130560
[ 0.000000] free_area_init_node: node 0, pgdat c14e1dc0, node_mem_map df961000
[ 0.000000] Normal zone: 1148 pages used for memmap
0: P----- -1 CBB-Relay,00A0,Logic_Supply,CBB-Relay
1: PF---- -1
2: PF---- -1
3: PF---- -1
4: P-O-L- 0 Override Board Name,00A0,Override Manuf,cape-universal
echo cape-universal > /sys/devices/platform/bone_capemgr/slots
# gpio51
config-pin p9_16 high
echo 1 > /sys/class/gpio/gpio51/active_low
# gpio3
config-pin p9_21 high
echo 1 > /sys/class/gpio/gpio3/active_low
@dhess
dhess / 8.0.1-binary.nix
Last active September 24, 2019 08:07
GHC nixpkgs overlay for ARM hosts
{stdenv, lib, fetchurl, llvm_37, dpkg, perl, ncurses5, gmp, libffi, binutils, coreutils, makeWrapper }:
let
LD_LIBRARY_PATH = lib.makeLibraryPath
[ gmp libffi ncurses5 ];
in
stdenv.mkDerivation rec {
version = "8.0.1";
name = "ghc-${version}-binary";
@@ -159,7 +164,11 @@ in rec {
compilerConfig = callPackage ../development/haskell-modules/configuration-ghc-7.10.x.nix { };
};
ghc802 = callPackage ../development/haskell-modules {
- ghc = compiler.ghc802;
+ ghc = if stdenv.system == "armv7l-linux" || stdenv.system == "aarch64-linux"
+ then
+ compiler.ghc802Arm
+ else
+ compiler.ghc802;
@dhess
dhess / default.nix
Created November 1, 2017 01:01
Fix php for macOS in Nixpkgs. Put the contents of this file in ~/.config/nixpkgs/overlays/default.nix
self: super:
{
php = super.stdenv.lib.overrideDerivation super.php (oldAttrs: {
CXXFLAGS = "-std=c++11";
});
}
NOTICE: BL31: v1.2(release):cc5fd7c
NOTICE: BL31: Built : 00:44:34, Jul 20 2017
NOTICE: Trusty image missing.
ERROR: Error initializing runtime service trusty_fast
[0001.137] I> Welcome to Cboot
[0001.140] I> Cboot Version: 00.00.2014.50-t186-96ecc32e
[0001.145] I> CPU-BL Params @ 0x277200000
[0001.149] I> 0) Base:0x00000000 Size:0x00000000
[0001.153] I> 1) Base:0x277f00000 Size:0x00100000
[0001.157] I> 2) Base:0x277e00000 Size:0x00100000