From f4c92c603c25d79b8b0a8916d6490327faa151c0 Mon Sep 17 00:00:00 2001 From: Chris Ostrouchov Date: Tue, 16 Oct 2018 16:48:57 -0400 Subject: [PATCH] pythonPackages.gyp: refactor move to python-modules --- .../python-modules/gyp/default.nix | 34 +++++++++++++++++++ pkgs/top-level/python-packages.nix | 30 +--------------- 2 files changed, 35 insertions(+), 29 deletions(-) create mode 100644 pkgs/development/python-modules/gyp/default.nix diff --git a/pkgs/development/python-modules/gyp/default.nix b/pkgs/development/python-modules/gyp/default.nix new file mode 100644 index 000000000000..46b0dde636af --- /dev/null +++ b/pkgs/development/python-modules/gyp/default.nix @@ -0,0 +1,34 @@ +{ stdenv +, buildPythonPackage +, fetchgit +, isPy3k +}: + +buildPythonPackage rec { + pname = "gyp"; + version = "2015-06-11"; + disabled = isPy3k; + + src = fetchgit { + url = "https://chromium.googlesource.com/external/gyp.git"; + rev = "fdc7b812f99e48c00e9a487bd56751bbeae07043"; + sha256 = "1imgxsl4mr1662vsj2mlnpvvrbz71yk00w8p85vi5bkgmc6awgiz"; + }; + + prePatch = stdenv.lib.optionals stdenv.isDarwin '' + sed -i 's/raise.*No Xcode or CLT version detected.*/version = "7.0.0"/' pylib/gyp/xcode_emulation.py + ''; + + patches = stdenv.lib.optionals stdenv.isDarwin [ + ./no-darwin-cflags.patch + ./no-xcode.patch + ]; + + meta = with stdenv.lib; { + description = "A tool to generate native build files"; + homepage = https://chromium.googlesource.com/external/gyp/+/master/README.md; + license = licenses.bsd3; + maintainers = with maintainers; [ codyopel ]; + }; + +} diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index 8b18f7e1e05a..961c4e3dfb15 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -2430,35 +2430,7 @@ in { gspread = callPackage ../development/python-modules/gspread { }; - gyp = buildPythonPackage rec { - name = "gyp-${version}"; - version = "2015-06-11"; - - src = pkgs.fetchgit { - url = "https://chromium.googlesource.com/external/gyp.git"; - rev = "fdc7b812f99e48c00e9a487bd56751bbeae07043"; - sha256 = "1imgxsl4mr1662vsj2mlnpvvrbz71yk00w8p85vi5bkgmc6awgiz"; - }; - - prePatch = optionals pkgs.stdenv.isDarwin '' - sed -i 's/raise.*No Xcode or CLT version detected.*/version = "7.0.0"/' pylib/gyp/xcode_emulation.py - ''; - - patches = optionals pkgs.stdenv.isDarwin [ - ../development/python-modules/gyp/no-darwin-cflags.patch - ../development/python-modules/gyp/no-xcode.patch - ]; - - disabled = isPy3k; - - meta = { - description = "A tool to generate native build files"; - homepage = https://chromium.googlesource.com/external/gyp/+/master/README.md; - license = licenses.bsd3; - maintainers = with maintainers; [ codyopel ]; - platforms = platforms.all; - }; - }; + gyp = callPackage ../development/python-modules/gyp { }; guessit = callPackage ../development/python-modules/guessit { };