2022-06-26 10:26:21 +00:00
|
|
|
{ lib
|
|
|
|
, stdenv
|
2020-04-24 23:36:52 +00:00
|
|
|
, buildPythonPackage
|
|
|
|
, fetchFromGitiles
|
2022-06-26 10:26:21 +00:00
|
|
|
, six
|
|
|
|
, python
|
2020-04-24 23:36:52 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage {
|
|
|
|
pname = "gyp";
|
2022-06-26 10:26:21 +00:00
|
|
|
version = "unstable-2022-04-01";
|
2024-01-02 11:29:13 +00:00
|
|
|
format = "setuptools";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = fetchFromGitiles {
|
|
|
|
url = "https://chromium.googlesource.com/external/gyp";
|
2022-06-26 10:26:21 +00:00
|
|
|
rev = "9ecf45e37677743503342ee4c6a76eaee80e4a7f";
|
|
|
|
hash = "sha256-LUlF2VhRnuDwJLdITgmXIQV/IuKdx1KXQkiPVHKrl4Q=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2021-02-05 17:12:51 +00:00
|
|
|
patches = lib.optionals stdenv.isDarwin [
|
2020-04-24 23:36:52 +00:00
|
|
|
./no-darwin-cflags.patch
|
|
|
|
./no-xcode.patch
|
|
|
|
];
|
|
|
|
|
2022-06-26 10:26:21 +00:00
|
|
|
propagatedBuildInputs = [
|
|
|
|
six
|
|
|
|
];
|
|
|
|
|
|
|
|
pythonImportsCheck = [ "gyp" "gyp.generator" ];
|
|
|
|
|
2023-10-09 19:29:22 +00:00
|
|
|
# Make mac_tool.py executable so that patchShebangs hook processes it. This
|
|
|
|
# file is copied and run by builds using gyp on macOS
|
|
|
|
preFixup = ''
|
|
|
|
chmod +x "$out/${python.sitePackages}/gyp/mac_tool.py"
|
|
|
|
'';
|
|
|
|
|
2021-01-15 22:18:51 +00:00
|
|
|
meta = with lib; {
|
2020-04-24 23:36:52 +00:00
|
|
|
description = "A tool to generate native build files";
|
2024-04-21 15:54:59 +00:00
|
|
|
mainProgram = "gyp";
|
2022-06-26 10:26:21 +00:00
|
|
|
homepage = "https://gyp.gsrc.io";
|
2020-04-24 23:36:52 +00:00
|
|
|
license = licenses.bsd3;
|
|
|
|
maintainers = with maintainers; [ codyopel ];
|
|
|
|
};
|
|
|
|
}
|