about summary refs log blame commit diff
path: root/protocol.prs
blob: c39a44a6853d4b4e4b0a54bc1099e011cb619a26 (plain) (tree)
1
2
3
4
5
6
7
8
9
10
11
12
           
                            
 
                                                 
 




                          
 





                                                                     
 
                                                         
 
                                                                   

                                                               
 
            
                                                          




                                                                       

                                                                                                                                                                         




                                                                         
                                 

                                 

                             
version 1 .
embeddedType EntityRef.Cap .

# Gatekeeper step to access a Nix store.
NixResolveStep = <nix @detail NixResolveDetail> .

NixResolveDetail = { }
& @lookupPath  LookupPath
& @storeUri    StoreUri
& @storeParams StoreParams
& @cacheSpace  CacheSpace
.

# List of strings corresponding to entries in NIX_PATH.
# For example:
#  [ "nixpkgs=/nix/var/nix/profiles/per-user/root/channels/nixos"
#    "nixos-config=/etc/nixos/configuration.nix"
#    "/nix/var/nix/profiles/per-user/root/channels"
#  ]
LookupPath = @lookupPath { lookupPath: [string ...] } / @absent { } .

StoreUri = @storeUri { storeUri: string } / @absent { } .

StoreParams = @storeParams { storeParams: AttrSet } / @absent { } .

# A cooperative caching dataspace shared with other Nix stores.
CacheSpace = @cacheSpace { cache: #:any } / @absent { } .

# Assertion.
CheckStorePath = <check-path @path string @valid #:bool> .

# Represents a Nix derivation. The @value can be realised via @context.
Derivation = <drv @value any @context any> .

# Assertion.
Realise = <realise @value any @result #:Result> .

# Assertion. The store that this asserted to will copy the closure of @storePath to @destination. When the copy completes or fails a Result value is asserted to @result.
CopyClosure = <copy-closure @dest #:any @storePath string @result #:Result>.

# Assertion.
# Eval at a nix-repo. @expr must be a function that takes two parameters,
# the first is the nix-repo value, the second is @args.
# The result is asserted to @result
Eval = <eval @expr string @args any @result #:Result> .

AttrSet = {symbol: any ...:...} .

# Value.
Result = Error / <ok @value any>.

# Common error type.
Error = <error @message any>.