meson: clean up
This commit is contained in:
parent
8d05772134
commit
c19222143e
@ -1,32 +1,20 @@
|
|||||||
{ lib
|
{ lib
|
||||||
, python3Packages
|
, python3
|
||||||
, stdenv
|
, stdenv
|
||||||
, writeTextDir
|
, writeTextDir
|
||||||
, substituteAll
|
, substituteAll
|
||||||
, pkgsHostHost
|
, pkgsHostHost
|
||||||
}:
|
}:
|
||||||
|
|
||||||
python3Packages.buildPythonApplication rec {
|
python3.pkgs.buildPythonApplication rec {
|
||||||
pname = "meson";
|
pname = "meson";
|
||||||
version = "0.54.2";
|
version = "0.54.2";
|
||||||
|
|
||||||
src = python3Packages.fetchPypi {
|
src = python3.pkgs.fetchPypi {
|
||||||
inherit pname version;
|
inherit pname version;
|
||||||
sha256 = "0m84zb0q67vnxmd6ldz477w6yjdnk9c44xhlwh1g1pzqx3m6wwd7";
|
sha256 = "0m84zb0q67vnxmd6ldz477w6yjdnk9c44xhlwh1g1pzqx3m6wwd7";
|
||||||
};
|
};
|
||||||
|
|
||||||
postFixup = ''
|
|
||||||
pushd $out/bin
|
|
||||||
# undo shell wrapper as meson tools are called with python
|
|
||||||
for i in *; do
|
|
||||||
mv ".$i-wrapped" "$i"
|
|
||||||
done
|
|
||||||
popd
|
|
||||||
|
|
||||||
# Do not propagate Python
|
|
||||||
rm $out/nix-support/propagated-build-inputs
|
|
||||||
'';
|
|
||||||
|
|
||||||
patches = [
|
patches = [
|
||||||
# Upstream insists on not allowing bindir and other dir options
|
# Upstream insists on not allowing bindir and other dir options
|
||||||
# outside of prefix for some reason:
|
# outside of prefix for some reason:
|
||||||
@ -68,6 +56,18 @@ python3Packages.buildPythonApplication rec {
|
|||||||
# checkInputs = [ ninja pkgconfig ];
|
# checkInputs = [ ninja pkgconfig ];
|
||||||
# checkPhase = "python ./run_project_tests.py";
|
# checkPhase = "python ./run_project_tests.py";
|
||||||
|
|
||||||
|
postFixup = ''
|
||||||
|
pushd $out/bin
|
||||||
|
# undo shell wrapper as meson tools are called with python
|
||||||
|
for i in *; do
|
||||||
|
mv ".$i-wrapped" "$i"
|
||||||
|
done
|
||||||
|
popd
|
||||||
|
|
||||||
|
# Do not propagate Python
|
||||||
|
rm $out/nix-support/propagated-build-inputs
|
||||||
|
'';
|
||||||
|
|
||||||
meta = with lib; {
|
meta = with lib; {
|
||||||
homepage = "https://mesonbuild.com";
|
homepage = "https://mesonbuild.com";
|
||||||
description = "SCons-like build system that use python as a front-end language and Ninja as a building backend";
|
description = "SCons-like build system that use python as a front-end language and Ninja as a building backend";
|
||||||
|
@ -4645,7 +4645,7 @@ in {
|
|||||||
mesa = callPackage ../development/python-modules/mesa { };
|
mesa = callPackage ../development/python-modules/mesa { };
|
||||||
|
|
||||||
meson = disabledIf (pythonOlder "3.5") (toPythonModule ((pkgs.meson.override {
|
meson = disabledIf (pythonOlder "3.5") (toPythonModule ((pkgs.meson.override {
|
||||||
python3Packages = self;
|
python3 = python;
|
||||||
}).overrideAttrs(oldAttrs: {
|
}).overrideAttrs(oldAttrs: {
|
||||||
# We do not want the setup hook in Python packages
|
# We do not want the setup hook in Python packages
|
||||||
# because the build is performed differently.
|
# because the build is performed differently.
|
||||||
|
Loading…
x
Reference in New Issue
Block a user