Skip to content

Instantly share code, notes, and snippets.

View sarcasticadmin's full-sized avatar

Robert James Hernandez sarcasticadmin

View GitHub Profile
with builtins;
let
pkgs = import ../nixpkgs { overlays = []; config={oraclejdk.accept_license = true;}; };
# clean evals
cc1 = pkgs.lib.mapAttrs (n: v: (builtins.tryEval v).value ) (pkgs.recurseIntoAttrs pkgs);
# Only top level derivations
cc2 = pkgs.lib.filterAttrs (n: v: pkgs.lib.isDerivation v) cc1;
# Filter for meta tags
#!/bin/bash
set -eu
usage() {
cat >&2 <<'EOF'
usage: ./difflog $out1 $out2
Compare two Nix build logs, normalizing out boring differences.
This can be useful to test the effect of a change to build scripts,
@csobankesmarki
csobankesmarki / convert private key
Last active July 18, 2024 17:12
Convert OpenSSH ED25519 to OpenSSL ED25519
(printf \\x30\\x2e\\x02\\x01\\x00\\x30\\x05\\x06\\x03\\x2b\\x65\\x70\\x04\\x22\\x04\\x20;egrep -v "^-" | tr -d '\n' | base64 -d | dd bs=161 skip=1 2>/dev/null | dd bs=32 count=1 2>/dev/null) | openssl pkey -inform der -outform pem