Created
January 8, 2019 16:25
-
-
Save kalbasit/cbd0a6eddfe3b1ee5b90662f1b5e98c1 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
λ nix repl | |
Welcome to Nix version 2.1.3. Type :? for help. | |
nix-repl> pkgs = import <nixpkgs> {} | |
nix-repl> transform = with pkgs; with pkgs.lib; let transformType = with types; let list3 = elemType: addCheck (listOf elemType) (l: length l != 3); in uniq (list3 (list3 float)); in mkOption { type = transformType; description = "3×3 matrix of floating point numbers"; default = []; example = [ [ 0.6 0.0 0.0 ] [ 0.0 0.6 0.0 ] [ 0.0 0.0 1.0 ] ]; } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment