1{ lib
2, stdenv
3, buildPythonPackage
4, fetchFromGitiles
5, six
6, python
7}:
8
9buildPythonPackage {
10 pname = "gyp";
11 version = "unstable-2022-04-01";
12
13 src = fetchFromGitiles {
14 url = "https://chromium.googlesource.com/external/gyp";
15 rev = "9ecf45e37677743503342ee4c6a76eaee80e4a7f";
16 hash = "sha256-LUlF2VhRnuDwJLdITgmXIQV/IuKdx1KXQkiPVHKrl4Q=";
17 };
18
19 patches = lib.optionals stdenv.isDarwin [
20 ./no-darwin-cflags.patch
21 ./no-xcode.patch
22 ];
23
24 propagatedBuildInputs = [
25 six
26 ];
27
28 pythonImportsCheck = [ "gyp" "gyp.generator" ];
29
30 # Make mac_tool.py executable so that patchShebangs hook processes it. This
31 # file is copied and run by builds using gyp on macOS
32 preFixup = ''
33 chmod +x "$out/${python.sitePackages}/gyp/mac_tool.py"
34 '';
35
36 meta = with lib; {
37 description = "A tool to generate native build files";
38 homepage = "https://gyp.gsrc.io";
39 license = licenses.bsd3;
40 maintainers = with maintainers; [ codyopel ];
41 };
42}