use python3 instead of python2
This commit is contained in:
parent
27351e8d64
commit
5a47efdff0
@ -34,7 +34,7 @@ let
|
|||||||
# a transformation of this data such as rgb. The hacky python script pre-
|
# a transformation of this data such as rgb. The hacky python script pre-
|
||||||
# processes the theme file in this way for consumption by the mustache
|
# processes the theme file in this way for consumption by the mustache
|
||||||
# engine below.
|
# engine below.
|
||||||
python = pkgs.python.withPackages (ps: [ ps.pyyaml ]);
|
python = pkgs.python3.withPackages (ps: [ ps.pyyaml ]);
|
||||||
preprocess = src:
|
preprocess = src:
|
||||||
pkgs.stdenv.mkDerivation {
|
pkgs.stdenv.mkDerivation {
|
||||||
name = "yaml";
|
name = "yaml";
|
||||||
|
@ -2,9 +2,9 @@
|
|||||||
import yaml
|
import yaml
|
||||||
import json
|
import json
|
||||||
import sys
|
import sys
|
||||||
input = yaml.load(sys.stdin)
|
input = yaml.safe_load(sys.stdin)
|
||||||
input["colors"] = {}
|
input["colors"] = {}
|
||||||
for (k,v) in input.copy().items():
|
for (k,v) in list(input.copy().items()):
|
||||||
if k[0:4] == "base":
|
if k[0:4] == "base":
|
||||||
col = k[4:]
|
col = k[4:]
|
||||||
input["colors"][k[4:]] = {
|
input["colors"][k[4:]] = {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user