From 1282b60452b32d625d537fd26c17f76b28208c24 Mon Sep 17 00:00:00 2001 From: adisbladis Date: Sat, 11 Jan 2020 23:37:05 +0000 Subject: poetry2nix: 1.2.0 -> 1.2.1 --- pkgs/development/tools/poetry2nix/poetry2nix/lib.nix | 20 +++++++++++++++++++- 1 file changed, 19 insertions(+), 1 deletion(-) (limited to 'pkgs/development/tools') diff --git a/pkgs/development/tools/poetry2nix/poetry2nix/lib.nix b/pkgs/development/tools/poetry2nix/poetry2nix/lib.nix index 3d0b80c4c5a..559c3051a73 100644 --- a/pkgs/development/tools/poetry2nix/poetry2nix/lib.nix +++ b/pkgs/development/tools/poetry2nix/poetry2nix/lib.nix @@ -30,7 +30,25 @@ let in (builtins.foldl' combine initial tokens).state; - readTOML = path: builtins.fromTOML (builtins.readFile path); + fromTOML = toml: if builtins.hasAttr "fromTOML" builtins then builtins.fromTOML toml else + builtins.fromJSON ( + builtins.readFile ( + pkgs.runCommand "from-toml" + { + inherit toml; + allowSubstitutes = false; + preferLocalBuild = true; + } + '' + ${pkgs.remarshal}/bin/remarshal \ + -if toml \ + -i <(echo "$toml") \ + -of json \ + -o $out + '' + ) + ); + readTOML = path: fromTOML (builtins.readFile path); # # Returns the appropriate manylinux dependencies and string representation for the file specified -- cgit 1.4.1