From 9115f68bdea5b6202fd0b4b7ffc3bf2abcfee859 Mon Sep 17 00:00:00 2001 From: wisut hantanong Date: Sat, 15 Jul 2017 15:19:17 +0700 Subject: [PATCH] python.pkgs.pytoml: move to separate expression --- .../python-modules/pytoml/default.nix | 24 +++++++++++++++++++ pkgs/top-level/python-packages.nix | 21 +--------------- 2 files changed, 25 insertions(+), 20 deletions(-) create mode 100644 pkgs/development/python-modules/pytoml/default.nix diff --git a/pkgs/development/python-modules/pytoml/default.nix b/pkgs/development/python-modules/pytoml/default.nix new file mode 100644 index 000000000000..55479e76dafd --- /dev/null +++ b/pkgs/development/python-modules/pytoml/default.nix @@ -0,0 +1,24 @@ +{ stdenv, buildPythonPackage, fetchgit +, python }: + +buildPythonPackage rec { + pname = "pytoml"; + version = "0.1.11"; + name = "${pname}-${version}"; + + checkPhase = "${python.interpreter} test/test.py"; + + # fetchgit used to ensure test submodule is available + src = fetchgit { + url = "${meta.homepage}.git"; + rev = "refs/tags/v${version}"; + sha256 = "1jiw04zk9ccynr8kb1vqh9r1p2kh0al7g7b1f94911iazg7dgs9j"; + }; + + meta = with stdenv.lib; { + description = "A TOML parser/writer for Python"; + homepage = https://github.com/avakar/pytoml; + license = licenses.mit; + maintainers = with maintainers; [ peterhoeg ]; + }; +} diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index f74d9baae8c4..ad1aa0eab45d 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -29909,26 +29909,7 @@ EOF }; }; - pytoml = buildPythonPackage rec { - name = "pytoml-${version}"; - version = "0.1.11"; - - checkPhase = "${python.interpreter} test/test.py"; - - # fetchgit used to ensure test submodule is available - src = pkgs.fetchgit { - url = "${meta.homepage}.git"; - rev = "refs/tags/v${version}"; - sha256 = "1jiw04zk9ccynr8kb1vqh9r1p2kh0al7g7b1f94911iazg7dgs9j"; - }; - - meta = { - description = "A TOML parser/writer for Python"; - homepage = https://github.com/avakar/pytoml; - license = licenses.mit; - maintainers = with maintainers; [ peterhoeg ]; - }; - }; + pytoml = callPackage ../development/python-modules/pytoml { }; pypandoc = callPackage ../development/python-modules/pypandoc { };