Skip to content

Instantly share code, notes, and snippets.

View ericsagnes's full-sized avatar

Eric Sagnes ericsagnes

View GitHub Profile
$ nix-instantiate --eval test.nix --strict
  { noOrder = [ "lumina" "gnome3" "plasma5" ]; order = [ "gnome3" "plasma5" "lumina" ]; }
@ericsagnes
ericsagnes / all-packages.nix
Created June 3, 2017 07:57
Solr 6.5.1 nix expression
solr = callPackage ../servers/search/solr { java = jre; };
@ericsagnes
ericsagnes / readme.md
Created March 14, 2017 11:33
Performance check of nix __functor

This test the performance of Nix __functor function calls.

Normal function result:

$ perf stat -r 10 -d nix-instantiate --eval ./test.nix -A normal
 Performance counter stats for 'nix-instantiate --eval ./test.nix -A normal' (10 runs):

         91.359343      task-clock (msec)         #    1.002 CPUs utilized            ( +-  2.66% )
                30      context-switches          #    0.329 K/sec                    ( +-  7.95% )
# nixos-rebuild build-vm -I nixpkgs=/home/eric/Projects/nixos/nixpkgs -I nixos-config=/tmp/wireguard-conf.nix
{ config, pkgs, ... }:
{
imports =
[
<nixos/modules/installer/scan/not-detected.nix>
];
nix.maxJobs = 4;
require 'digest/sha1'
require 'csv'
require 'pp'
class ShaRand
attr_reader :data
def initialize
@data = {}