2022-06-01 23:05:39 +00:00
|
|
|
{ lib
|
|
|
|
, stdenv
|
2018-10-16 20:48:57 +00:00
|
|
|
, buildPythonPackage
|
2019-12-02 22:29:40 +00:00
|
|
|
, fetchFromGitiles
|
2022-06-01 23:05:39 +00:00
|
|
|
, six
|
|
|
|
, python
|
2018-10-16 20:48:57 +00:00
|
|
|
}:
|
|
|
|
|
2019-08-13 21:52:01 +00:00
|
|
|
buildPythonPackage {
|
2018-10-16 20:48:57 +00:00
|
|
|
pname = "gyp";
|
2022-06-01 23:05:39 +00:00
|
|
|
version = "unstable-2022-04-01";
|
2018-10-16 20:48:57 +00:00
|
|
|
|
2019-12-02 22:29:40 +00:00
|
|
|
src = fetchFromGitiles {
|
|
|
|
url = "https://chromium.googlesource.com/external/gyp";
|
2022-06-01 23:05:39 +00:00
|
|
|
rev = "9ecf45e37677743503342ee4c6a76eaee80e4a7f";
|
|
|
|
hash = "sha256-LUlF2VhRnuDwJLdITgmXIQV/IuKdx1KXQkiPVHKrl4Q=";
|
2018-10-16 20:48:57 +00:00
|
|
|
};
|
|
|
|
|
2021-01-24 00:29:22 +00:00
|
|
|
patches = lib.optionals stdenv.isDarwin [
|
2018-10-16 20:48:57 +00:00
|
|
|
./no-darwin-cflags.patch
|
|
|
|
./no-xcode.patch
|
|
|
|
];
|
|
|
|
|
2022-06-01 23:05:39 +00:00
|
|
|
propagatedBuildInputs = [
|
|
|
|
six
|
|
|
|
];
|
|
|
|
|
|
|
|
pythonImportsCheck = [ "gyp" "gyp.generator" ];
|
|
|
|
|
2023-08-12 11:30:36 +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-11 07:54:33 +00:00
|
|
|
meta = with lib; {
|
2018-10-16 20:48:57 +00:00
|
|
|
description = "A tool to generate native build files";
|
2022-06-01 23:05:39 +00:00
|
|
|
homepage = "https://gyp.gsrc.io";
|
2018-10-16 20:48:57 +00:00
|
|
|
license = licenses.bsd3;
|
|
|
|
maintainers = with maintainers; [ codyopel ];
|
|
|
|
};
|
|
|
|
}
|