{1}# coding:utf-8 {0} {9}1{0} {7}+{0} {9}2{0} {12}let{0} {10}x{0} {7}={0} {9}1{7};{0} {10}y{0} {7}={0} {9}2{7};{0} {12}in{0} {6}x{0} {7}+{0} {6}y{0} {12}let{0} {10}x{7}={9}1{7};{10}y{7}={9}2{7};{12}in{0} {6}x{7}+{6}y{0} {7}{{0} {10}string{0} {7}={0} {3}"hello"{7};{0} {10}integer{0} {7}={0} {9}1{7};{0} {10}float{0} {7}={0} {9}3.141{7};{0} {10}bool{0} {7}={0} {13}true{7};{0} {10}null{0} {7}={0} {13}null{7};{0} {10}list{0} {7}={0} {7}[{0} {9}1{0} {3}"two"{0} {13}false{0} {7}];{0} {10}attribute-set{0} {7}={0} {7}{{0} {10}a{0} {7}={0} {3}"hello"{7};{0} {10}b{0} {7}={0} {9}2{7};{0} {10}c{0} {7}={0} {9}2.718{7};{0} {10}d{0} {7}={0} {13}false{7};{0} {7}};{0} {1}# comments are supported {7}}{0} {12}rec{0} {7}{{0} {10}one{0} {7}={0} {9}1{7};{0} {10}two{0} {7}={0} {6}one{0} {7}+{0} {9}1{7};{0} {10}three{0} {7}={0} {6}two{0} {7}+{0} {9}1{7};{0} {7}}{0} {7}{{0} {10}one{0} {7}={0} {9}1{7};{0} {10}three{0} {7}={0} {9}3{7};{0} {10}two{0} {7}={0} {9}2{7};{0} {7}}{0} {12}let{0} {10}a{0} {7}={0} {9}1{7};{0} {12}in{0} {6}a{0} {7}+{0} {6}a{0} {12}let{0} {10}b{0} {7}={0} {6}a{0} {7}+{0} {9}1{7};{0} {10}a{0} {7}={0} {9}1{7};{0} {12}in{0} {6}a{0} {7}+{0} {6}b{0} {7}{{0} {10}a{0} {7}={0} {12}let{0} {10}x{0} {7}={0} {9}1{7};{0} {12}in{0} {6}x{7};{0} {10}b{0} {7}={0} {6}x{7};{0} {7}}{0} {12}let{0} {10}attrset{0} {7}={0} {7}{{0} {10}x{0} {7}={0} {9}1{7};{0} {7}};{0} {12}in{0} {6}attrset{7}.{6}x{0} {12}let{0} {10}attrset{0} {7}={0} {7}{{0} {10}a{0} {7}={0} {7}{{0} {10}b{0} {7}={0} {7}{{0} {10}c{0} {7}={0} {9}1{7};{0} {7}};{0} {7}};{0} {7}};{0} {12}in{0} {6}attrset{7}.{6}a{7}.{6}b{7}.{6}c{0} {7}{{0} {6}a{7}.{6}b{7}.{10}c{0} {7}={0} {9}1{7};{0} {7}}{0} {12}let{0} {10}a{0} {7}={0} {7}{{0} {10}x{0} {7}={0} {9}1{7};{0} {10}y{0} {7}={0} {9}2{7};{0} {10}z{0} {7}={0} {9}3{7};{0} {7}};{0} {12}in{0} {12}with{0} {6}a{7};{0} {7}[{0} {6}x{0} {6}y{0} {6}z{0} {7}]{0} {12}let{0} {10}x{0} {7}={0} {9}1{7};{0} {10}y{0} {7}={0} {9}2{7};{0} {12}in{0} {7}{{0} {12}inherit{0} {6}x{0} {6}y{7};{0} {7}}{0} {12}let{0} {10}a{0} {7}={0} {7}{{0} {10}x{0} {7}={0} {9}1{7};{0} {10}y{0} {7}={0} {9}2{7};{0} {7}};{0} {12}in{0} {7}{{0} {12}inherit{0} {7}({6}a{7}){0} {6}x{0} {6}y{7};{0} {7}}{0} {12}let{0} {12}inherit{0} {7}({{0} {10}x{0} {7}={0} {9}1{7};{0} {10}y{0} {7}={0} {9}2{7};{0} {7}}){0} {6}x{0} {6}y{7};{0} {12}in{0} {7}[{0} {6}x{0} {6}y{0} {7}]{0} {12}let{0} {10}name{0} {7}={0} {3}"Nix{8}${}{3}"{7};{0} {12}in{0} {3}"hello {8}${{6}name{8}}{3}"{0} {10}graphviz{0} {7}={0} {7}({14}import{0} {11}../tools/graphics/graphviz{7}){0} {7}{{0} {12}inherit{0} {14}fetchurl{0} {6}stdenv{0} {6}libpng{0} {6}libjpeg{0} {6}expat{0} {6}x11{0} {6}yacc{7};{0} {12}inherit{0} {7}({6}xorg{7}){0} {6}libXaw{7};{0} {7}};{0} {12}let{0} {10}negate{0} {7}={0} {6}x{7}:{0} {7}!{6}x{7};{0} {10}concat{0} {7}={0} {6}x{7}:{0} {6}y{7}:{0} {6}x{0} {7}+{0} {6}y{7};{0} {12}in{0} {12}if{0} {6}negate{0} {13}true{0} {12}then{0} {6}concat{0} {3}"foo"{0} {3}"bar"{0} {12}else{0} {3}""{0} {1}# A number # Equals 1 + 1 # asd {0} {2}/* /* Block comments can span multiple lines. */{0} {3}"hello"{0} {3}"hello"{0} {2}/* /* nope */{0} {9}1{0} {14}map{0} {7}({6}concat{0} {3}"foo"{7}){0} {7}[{0} {3}"bar"{0} {3}"bla"{0} {3}"abc"{0} {7}]{0} {7}{{0} {6}localServer{0} {7}?{0} {13}false{0} {7},{0} {6}httpServer{0} {7}?{0} {13}false{0} {7},{0} {6}sslSupport{0} {7}?{0} {13}false{0} {7},{0} {6}pythonBindings{0} {7}?{0} {13}false{0} {7},{0} {6}javaSwigBindings{0} {7}?{0} {13}false{0} {7},{0} {6}javahlBindings{0} {7}?{0} {13}false{0} {7},{0} {6}stdenv{7},{0} {14}fetchurl{0} {7},{0} {6}openssl{0} {7}?{0} {13}null{7},{0} {6}httpd{0} {7}?{0} {13}null{7},{0} {6}db4{0} {7}?{0} {13}null{7},{0} {6}expat{7},{0} {6}swig{0} {7}?{0} {13}null{7},{0} {6}j2sdk{0} {7}?{0} {13}null{0} {7}}:{0} {12}assert{0} {6}localServer{0} {7}->{0} {6}db4{0} {7}!={0} {13}null{7};{0} {12}assert{0} {6}httpServer{0} {7}->{0} {6}httpd{0} {7}!={0} {13}null{0} {7}&&{0} {6}httpd{7}.{10}expat{0} {7}=={0} {6}expat{7};{0} {12}assert{0} {6}sslSupport{0} {7}->{0} {6}openssl{0} {7}!={0} {13}null{0} {7}&&{0} {7}({6}httpServer{0} {7}->{0} {6}httpd{7}.{10}openssl{0} {7}=={0} {6}openssl{7});{0} {12}assert{0} {6}pythonBindings{0} {7}->{0} {6}swig{0} {7}!={0} {13}null{0} {7}&&{0} {6}swig{7}.{6}pythonSupport{7};{0} {12}assert{0} {6}javaSwigBindings{0} {7}->{0} {6}swig{0} {7}!={0} {13}null{0} {7}&&{0} {6}swig{7}.{6}javaSupport{7};{0} {12}assert{0} {6}javahlBindings{0} {7}->{0} {6}j2sdk{0} {7}!={0} {13}null{7};{0} {6}stdenv{7}.{6}mkDerivation{0} {7}{{0} {10}name{0} {7}={0} {3}"subversion-1.1.1"{7};{0} {10}openssl{0} {7}={0} {12}if{0} {6}sslSupport{0} {12}then{0} {6}openssl{0} {12}else{0} {13}null{7};{0} {7}}{0} {10}configureFlags{0} {7}={0} {4}'' -system-zlib -system-libpng -system-libjpeg {8}${{12}if{0} {6}openglSupport{0} {12}then{0} {4}''-dlopen-opengl -L{8}${{6}mesa{8}}{4}/lib -I{8}${{6}mesa{8}}{4}/include -L{8}${{6}libXmu{8}}{4}/lib -I{8}${{6}libXmu{8}}{4}/include''{0} {12}else{0} {3}""{8}}{4} {8}${{12}if{0} {6}threadSupport{0} {12}then{0} {3}"-thread"{0} {12}else{0} {3}"-no-thread"{8}}{4} ''{7};{0} {12}let{0} {10}a{0} {7}={0} {3}"no"{7};{0} {6}a{7}.{6}b{7}.{6}c{7}.{10}d{0} {7}={0} {3}"foo"{0} {12}in{0} {3}"{8}${{6}a{0} {7}+{0} {3}" {8}${{6}a{0} {7}+{0} {3}" {8}${{6}a{8}}{3}"{8}}{3}"{8}}{3}"{0} {12}let{0} {10}out{0} {7}={0} {3}"Nix"{7};{0} {12}in{0} {3}"echo {8}${{6}out{8}}{3} > $out"{0} {11}{0} {4}'' multi {5}''${4}{} {5}'''{4} line {5}''\n{4} string ''{0} {4}'' one two three ''{0} {6}x{7}:{0} {6}x{0} {7}+{0} {9}1{0} {6}x{7}:{0} {6}y{7}:{0} {6}x{0} {7}+{0} {6}y{0} {7}{{0} {6}a{7},{0} {6}b{0} {7}}:{0} {6}a{0} {7}+{0} {6}b{0} {7}{{0} {6}a{7},{0} {6}b{0} {7}?{0} {9}0{0} {7}}:{0} {6}a{0} {7}+{0} {6}b{0} {7}{{0} {6}a{7},{0} {6}b{7},{0} {7}...}:{0} {6}a{0} {7}+{0} {6}b{0} {6}args{7}@{{0} {6}a{7},{0} {6}b{7},{0} {7}...{0} {7}}:{0} {6}a{0} {7}+{0} {6}b{0} {7}+{0} {6}args{7}.{6}c{0} {7}{{0} {6}a{7},{0} {6}b{7},{0} {7}...{0} {7}}@{6}args{7}:{0} {6}a{0} {7}+{0} {6}b{0} {7}+{0} {6}args{7}.{6}c{0} {12}let{0} {10}f{0} {7}={0} {6}x{7}:{0} {6}x{0} {7}+{0} {9}1{7};{0} {12}in{0} {6}f{0} {12}let{0} {10}f{0} {7}={0} {6}x{7}:{0} {6}x{0} {7}+{0} {9}1{7};{0} {12}in{0} {6}f{0} {9}1{0} {12}let{0} {10}f{0} {7}={0} {6}x{7}:{0} {6}x{7}.{6}a{7};{0} {10}v{0} {7}={0} {7}{{0} {10}a{0} {7}={0} {9}1{7};{0} {7}};{0} {12}in{0} {6}f{0} {6}v{0} {7}({6}x{7}:{0} {6}x{0} {7}+{0} {9}1{7}){0} {9}1{0} {12}let{0} {10}f{0} {7}={0} {6}x{7}:{0} {6}x{0} {7}+{0} {9}1{7};{0} {10}a{0} {7}={0} {9}1{7};{0} {12}in{0} {7}[{0} {7}({6}f{0} {6}a{7}){0} {7}]{0} {12}let{0} {10}f{0} {7}={0} {6}x{7}:{0} {6}x{0} {7}+{0} {9}1{7};{0} {10}a{0} {7}={0} {9}1{7};{0} {12}in{0} {7}[{0} {6}f{0} {6}a{0} {7}]{0} {12}let{0} {10}f{0} {7}={0} {6}x{7}:{0} {6}y{7}:{0} {6}x{0} {7}+{0} {6}y{7};{0} {12}in{0} {6}f{0} {9}1{0} {9}2{0} {7}{{6}a{7},{0} {6}b{7}}:{0} {6}a{0} {7}+{0} {6}b{0} {12}let{0} {10}f{0} {7}={0} {7}{{6}a{7},{0} {6}b{7}}:{0} {6}a{0} {7}+{0} {6}b{7};{0} {12}in{0} {6}f{0} {7}{{0} {10}a{0} {7}={0} {9}1{7};{0} {10}b{0} {7}={0} {9}2{7};{0} {7}}{0} {12}let{0} {10}f{0} {7}={0} {7}{{6}a{7},{0} {6}b{7}}:{0} {6}a{0} {7}+{0} {6}b{7};{0} {12}in{0} {6}f{0} {7}{{0} {10}a{0} {7}={0} {9}1{7};{0} {10}b{0} {7}={0} {9}2{7};{0} {10}c{0} {7}={0} {9}3{7};{0} {7}}{0} {12}let{0} {10}f{0} {7}={0} {7}{{6}a{7},{0} {6}b{0} {7}?{0} {9}0{7}}:{0} {6}a{0} {7}+{0} {6}b{7};{0} {12}in{0} {6}f{0} {7}{{0} {10}a{0} {7}={0} {9}1{7};{0} {7}}{0} {12}let{0} {10}f{0} {7}={0} {7}{{6}a{0} {7}?{0} {9}0{7},{0} {6}b{0} {7}?{0} {9}0{7}}:{0} {6}a{0} {7}+{0} {6}b{7};{0} {12}in{0} {6}f{0} {7}{{0} {7}}{0} {1}# empty attribute set {0} {12}let{0} {10}f{0} {7}={0} {7}{{6}a{7},{0} {6}b{7},{0} {7}...}:{0} {6}a{0} {7}+{0} {6}b{7};{0} {12}in{0} {6}f{0} {7}{{0} {10}a{0} {7}={0} {9}1{7};{0} {10}b{0} {7}={0} {9}2{7};{0} {10}c{0} {7}={0} {9}3{7};{0} {7}}{0} {7}{{6}a{7},{0} {6}b{7},{0} {7}...}@{6}args{7}:{0} {6}a{0} {7}+{0} {6}b{0} {7}+{0} {6}args{7}.{6}c{0} {6}args{7}@{{6}a{7},{0} {6}b{7},{0} {7}...}:{0} {6}a{0} {7}+{0} {6}b{0} {7}+{0} {6}args{7}.{6}c{0} {12}let{0} {10}f{0} {7}={0} {7}{{6}a{7},{0} {6}b{7},{0} {7}...}@{6}args{7}:{0} {6}a{0} {7}+{0} {6}b{0} {7}+{0} {6}args{7}.{6}c{7};{0} {12}in{0} {6}f{0} {7}{{0} {10}a{0} {7}={0} {9}1{7};{0} {10}b{0} {7}={0} {9}2{7};{0} {10}c{0} {7}={0} {9}3{7};{0} {7}}{0} {7}{{0} {6}pkgs{0} {7}?{0} {14}import{0} {11}{0} {7}{}{0} {7}}:{0} {12}let{0} {10}message{0} {7}={0} {3}"hello world"{7};{0} {12}in{0} {6}pkgs{7}.{6}mkShellNoCC{0} {7}{{0} {10}packages{0} {7}={0} {12}with{0} {6}pkgs{7};{0} {7}[{0} {6}cowsay{0} {7}];{0} {10}shellHook{0} {7}={0} {4}'' cowsay {8}${{6}message{8}}{4} ''{7};{0} {7}}{0} {7}{{0} {6}config{7},{0} {6}pkgs{7},{0} {7}...{0} {7}}:{0} {7}{{0} {10}imports{0} {7}={0} {7}[{0} {11}./hardware-configuration.nix{0} {7}];{0} {6}environment{7}.{10}systemPackages{0} {7}={0} {12}with{0} {6}pkgs{7};{0} {7}[{0} {6}git{0} {7}];{0} {1}# ... {7}}{0} {7}{{0} {6}lib{7},{0} {6}stdenv{7},{0} {14}fetchurl{0} {7}}:{0} {6}stdenv{7}.{6}mkDerivation{0} {12}rec{0} {7}{{0} {10}pname{0} {7}={0} {3}"hello"{7};{0} {10}version{0} {7}={0} {3}"2.12"{7};{0} {10}src{0} {7}={0} {14}fetchurl{0} {7}{{0} {10}url{0} {7}={0} {3}"mirror://gnu/{8}${{6}pname{8}}{3}/{8}${{6}pname{8}}{3}-{8}${{6}version{8}}{3}.tar.gz"{7};{0} {10}sha256{0} {7}={0} {3}"1ayhp9v4m4rdhjmnl2bq3cibrbqqkgjbl3s7yk2nhlh8vj3ay16g"{7};{0} {7}};{0} {10}meta{0} {7}={0} {12}with{0} {6}lib{7};{0} {7}{{0} {10}license{0} {7}={0} {6}licenses{7}.{6}gpl3Plus{7};{0} {7}};{0} {7}}{0} {7}{{0} {10}baseName{0} {7}={0} {14}baseNameOf{0} {6}name{7};{0} {10}pullImage{0} {7}={0} {12}let{0} {10}fixName{0} {7}={0} {6}name{7}:{0} {14}builtins{7}.{14}replaceStrings{0} {7}[{0} {3}"/"{0} {3}":"{0} {7}]{0} {7}[{0} {3}"-"{0} {3}"-"{0} {7}]{0} {6}name{7};{0} {12}in{0} {7}{{0} {6}imageName{0} {1}# To find the digest of an image, you can use skopeo: {0} {1}# see doc/functions.xml {0} {7},{0} {6}imageDigest{0} {7},{0} {6}sha256{0} {7},{0} {6}os{0} {7}?{0} {3}"linux"{0} {7},{0} {1}# Image architecture, defaults to the architecture of the `hostPlatform` when unset {0} {6}arch{0} {7}?{0} {6}defaultArchitecture{0} {1}# This is used to set name to the pulled image {0} {7},{0} {6}finalImageName{0} {7}?{0} {6}imageName{0} {1}# This used to set a tag to the pulled image {0} {7},{0} {6}finalImageTag{0} {7}?{0} {3}"latest"{0} {1}# This is used to disable TLS certificate verification, allowing access to http registries on (hopefully) trusted networks {0} {7},{0} {6}tlsVerify{0} {7}?{0} {13}true{0} {7},{0} {6}name{0} {7}?{0} {6}fixName{0} {3}"docker-image-{8}${{6}finalImageName{8}}{3}-{8}${{6}finalImageTag{8}}{3}.tar"{0} {7}}:{0} {15}runCommand{0} {6}name{0} {7}{{0} {12}inherit{0} {6}imageDigest{7};{0} {10}imageName{0} {7}={0} {6}finalImageName{7};{0} {10}imageTag{0} {7}={0} {6}finalImageTag{7};{0} {10}impureEnvVars{0} {7}={0} {6}lib{7}.{6}fetchers{7}.{6}proxyImpureEnvVars{7};{0} {10}outputHashMode{0} {7}={0} {3}"flat"{7};{0} {10}outputHashAlgo{0} {7}={0} {3}"sha256"{7};{0} {10}outputHash{0} {7}={0} {6}sha256{7};{0} {10}nativeBuildInputs{0} {7}={0} {7}[{0} {6}skopeo{0} {7}];{0} {10}SSL_CERT_FILE{0} {7}={0} {3}"{8}${{6}cacert{7}.{6}out{8}}{3}/etc/ssl/certs/ca-bundle.crt"{7};{0} {10}sourceURL{0} {7}={0} {3}"docker://{8}${{6}imageName{8}}{3}@{8}${{6}imageDigest{8}}{3}"{7};{0} {10}destNameTag{0} {7}={0} {3}"{8}${{6}finalImageName{8}}{3}:{8}${{6}finalImageTag{8}}{3}"{7};{0} {7}}{0} {4}'' skopeo \ --insecure-policy \ --tmpdir=$TMPDIR \ --override-os {8}${{6}os{8}}{4} \ --override-arch {8}${{6}arch{8}}{4} \ copy \ --src-tls-verify={8}${{6}lib{7}.{6}boolToString{0} {6}tlsVerify{8}}{4} \ "$sourceURL" "docker-archive://$out:$destNameTag" \ | cat # pipe through cat to force-disable progress bar ''{7};{0} {7}}{0} {10}message{0} {7}={0} {16}"unterminated string; {10}message2{0} {7}={0} {16}"unterminated string;