Skip to content

Instantly share code, notes, and snippets.

@matejc
Created November 16, 2016 18:39
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save matejc/075273f7cd2c12be3695b6e87e0d14a6 to your computer and use it in GitHub Desktop.
Save matejc/075273f7cd2c12be3695b6e87e0d14a6 to your computer and use it in GitHub Desktop.
{
"type": "dict",
"meta": {},
"value": {
"build_script": {
"type": "file",
"meta": {},
"value": "builders/overrider.nix"
},
"override": {
"type": "dict",
"meta": {},
"value": {
"src": {
"type": "dict",
"meta": {},
"value": {
"sha256": {
"type": "hash",
"meta": {},
"value": "244242d263d7688938bb01c741f3126cb090ea0f2dc17daea4eb55f2a1559d55"
},
"url": {
"type": "url",
"meta": {},
"value": "https://github.com/matejc/tarman/archive/master.tar.gz"
}
}
}
}
},
"scripts": {
"type": "git",
"meta": {
"private_key": "ssh-rsa AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA matej@matej71"
},
"value": "git@github.com:matejc/hydra_scripts"
},
"nixpkgs": {
"type": "git",
"meta": {
"private_key": "ssh-rsa AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA matej@matej71"
},
"value": "git@github.com:matejc/nixpkgs"
},
"build": {
"type": "derivation",
"meta": {
"scope": "nixpkgs"
},
"value": "pythonPackages.tarman"
}
}
}
root2 = {
"type": "dict",
"value": {},
"meta": {}
}
recurse_set_options(['nixpkgs'], 'git@github.com:matejc/nixpkgs', root2, value_type='git', meta={'private_key': 'ssh-rsa AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA matej@matej71'})
recurse_set_options(['scripts'], 'git@github.com:matejc/hydra_scripts', root2, value_type='git', meta={'private_key': 'ssh-rsa AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA matej@matej71'})
recurse_set_options(['build_script'], 'builders/overrider.nix', root2, value_type='file')
recurse_set_options(['build'], 'pythonPackages.tarman', root2, value_type='derivation', meta={'scope': 'nixpkgs'})
recurse_set_options(['override', 'src', 'url'], 'https://github.com/matejc/tarman/archive/master.tar.gz', root2, value_type='url')
recurse_set_options(['override', 'src', 'sha256'], '244242d263d7688938bb01c741f3126cb090ea0f2dc17daea4eb55f2a1559d55', root2, value_type='hash')
print(json.dumps(recurse_options([], root2)))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment