2024-06-05 15:53:02 +00:00
|
|
|
{
|
|
|
|
lib,
|
|
|
|
stdenv,
|
|
|
|
buildPythonPackage,
|
|
|
|
fetchFromGitiles,
|
|
|
|
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
|
|
|
};
|
|
|
|
|
2024-09-26 11:04:55 +00:00
|
|
|
patches = lib.optionals stdenv.hostPlatform.isDarwin [
|
2020-04-24 23:36:52 +00:00
|
|
|
./no-darwin-cflags.patch
|
|
|
|
./no-xcode.patch
|
|
|
|
];
|
|
|
|
|
2024-06-05 15:53:02 +00:00
|
|
|
propagatedBuildInputs = [ six ];
|
2022-06-26 10:26:21 +00:00
|
|
|
|
2024-06-05 15:53:02 +00:00
|
|
|
pythonImportsCheck = [
|
|
|
|
"gyp"
|
|
|
|
"gyp.generator"
|
|
|
|
];
|
2022-06-26 10:26:21 +00:00
|
|
|
|
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; {
|
2024-06-20 14:57:18 +00:00
|
|
|
description = "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 ];
|
|
|
|
};
|
|
|
|
}
|