Skip to content

Instantly share code, notes, and snippets.

View AndersonTorres's full-sized avatar

Anderson Torres AndersonTorres

  • São Paulo, Brazil
View GitHub Profile
@zimbatm
zimbatm / README.md
Created March 29, 2017 09:32
Nixpkgs pinning example

Nixpkgs pinning example

This is an example of how to pin the version of nixpkgs in a package repo. The goal is to improve reproducibility, make sure all the developers use the same version of nixpkgs and also allow to share binary caches.

Usage

Put all these files in a nixpkgs folder and then in other derivations, instead of import <nixpkgs> {} use import ./path/to/nixpkgs {}

Keeping nixpkgs up to date

with import ./lisp.nix { a = null; }; eval
(defun fib (n)
(defun fib2 (a b n)
(iff (lt n 2) b
(def (next (plus a b))
(fib2 b next (minus n 1))))
(fib2 0 1 n))
(fib 60))