Requirements:
- root directory is a git repository(for
git rev-parse --show-toplevel) - github.com/nixos/nixpkgs at pkgs/nixpkgs
Tree:
.
├── .git
| { pkgs ? import <nixpkgs> {} }: | |
| pkgs.buildGoModule { | |
| name = "agola"; | |
| src = pkgs.fetchFromGitHub { | |
| owner = "agola-io"; | |
| repo = "agola"; | |
| rev = "v0.7.0"; | |
| sha256 = "sha256-AiD7mVogWk/TOYy7Ed1aT31h1kbrRwseue5qc3wLOCI="; | |
| }; | |
| doCheck = false; |
| (defgroup ulisp-mode nil | |
| "Settings for ulisp-mode Lisp source buffers." | |
| :prefix "ulisp-" | |
| :group 'ulisp) | |
| (defcustom ulisp-port "/dev/ttyUSB0" | |
| "uLisp serial port" | |
| :type 'string | |
| :group 'ulisp-mode) | |
| (defcustom ulisp-port-speed 115200 | |
| "uLisp serial port speed bps" |
| { lua, luaPackages, fetchurl, fetchgit }: | |
| luaPackages.buildLuarocksPackage rec { | |
| pname = "luastatic"; | |
| version = "0.0.12"; | |
| knownRockspec = (fetchurl { | |
| url = "https://luarocks.org/manifests/ers35/luastatic-${version}-1.rockspec"; | |
| sha256 = "sha256-jNxq4gyO+7kN7+Vpvq1iGFrIQ15x+HAkcqa3VqIhUVU="; | |
| }).outPath; | |
| src = fetchgit { | |
| url = "https://github.com/ers35/luastatic"; |
| #lang racket/base | |
| (require setup/dirs | |
| setup/variant | |
| setup/cross-system | |
| racket/promise) | |
| (define plain-variant | |
| (delay/sync | |
| (cond | |
| [(cross-installation?) |
| latest-nixos-minimal-x86_64-linux.iso: | |
| wget https://channels.nixos.org/nixos-20.03/latest-nixos-minimal-x86_64-linux.iso | |
| curl -Ls https://channels.nixos.org/nixos-20.03/latest-nixos-minimal-x86_64-linux.iso.sha256 \ | |
| | grep -F .iso | head -n1 \ | |
| | sed 's|nixos-minimal-.\+|latest-nixos-minimal-x86_64-linux.iso|' \ | |
| | sha256sum -c - | |
| root.img: | |
| qemu-img create root.img 10G |
Requirements:
git rev-parse --show-toplevel)Tree:
.
├── .git
| with import <nixpkgs>{}; | |
| { pkgs ? import <nixpkgs> {} }: | |
| buildGo19Package rec { | |
| name = "cointop-unstable-${version}"; | |
| version = "development"; | |
| src = fetchFromGitHub { | |
| owner = "miguelmota"; | |
| repo = "cointop"; |
| #! /usr/bin/env racket | |
| #lang racket | |
| (require racket/cmdline) | |
| (require csv-reading) ;; $ raco pkg install csv-reading | |
| (define (will-loop executor) | |
| (lambda () | |
| (let loop () | |
| (will-execute executor) |
| ;; Disable flycheck when on battery | |
| (defun toggle-flycheck () | |
| (when (fboundp 'battery-status-function) | |
| (let | |
| ((battery-status (battery-format "%L" (funcall battery-status-function)))) | |
| (cond | |
| ((string-match-p "N/A" battery-status) (global-flycheck-mode +1)) | |
| ((string-match-p "AC" battery-status) (global-flycheck-mode +1)) | |
| (t (global-flycheck-mode -1)))))) | |
| (run-with-idle-timer 5 1 'toggle-flycheck) |
| { lib }: | |
| with lib; rec { | |
| pow = | |
| let | |
| pow' = base: exponent: value: | |
| # FIXME: It will silently overflow on values > 2**62 :( | |
| # The value will become negative or zero in this case | |
| if exponent == 0 | |
| then 1 | |
| else if exponent <= 1 |