diff --git a/base16.nix b/base16.nix index f1e634d..775964d 100644 --- a/base16.nix +++ b/base16.nix @@ -34,7 +34,7 @@ let # 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 # engine below. - python = pkgs.python.withPackages (ps: [ ps.pyyaml ]); + python = pkgs.python3.withPackages (ps: [ ps.pyyaml ]); preprocess = src: pkgs.stdenv.mkDerivation { name = "yaml"; diff --git a/base16writer.py b/base16writer.py index 6835640..51eb3ba 100644 --- a/base16writer.py +++ b/base16writer.py @@ -2,9 +2,9 @@ import yaml import json import sys -input = yaml.load(sys.stdin) +input = yaml.safe_load(sys.stdin) input["colors"] = {} -for (k,v) in input.copy().items(): +for (k,v) in list(input.copy().items()): if k[0:4] == "base": col = k[4:] input["colors"][k[4:]] = {