Skip to content
This repository has been archived by the owner on Apr 12, 2021. It is now read-only.

Commit

Permalink
Merge pull request #77538 from adisbladis/poetry2nix-1_2_1
Browse files Browse the repository at this point in the history
poetry2nix: 1.2.0 -> 1.2.1
  • Loading branch information
adisbladis committed Jan 12, 2020
2 parents a7635ad + 1282b60 commit 100012e
Showing 1 changed file with 19 additions and 1 deletion.
20 changes: 19 additions & 1 deletion pkgs/development/tools/poetry2nix/poetry2nix/lib.nix
Expand Up @@ -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
Expand Down

0 comments on commit 100012e

Please sign in to comment.