mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-22 15:03:28 +00:00
Merge pull request #331855 from pbsds/fix-nix-build-top-1722623704
treewide: remove hardcoded /build
This commit is contained in:
commit
c9dd3fb1a3
@ -65,7 +65,7 @@ stdenv.mkDerivation rec {
|
|||||||
];
|
];
|
||||||
|
|
||||||
postPatch = ''
|
postPatch = ''
|
||||||
patchShebangs /build/source/build-aux/meson/postinstall.py
|
patchShebangs build-aux/meson/postinstall.py
|
||||||
'';
|
'';
|
||||||
|
|
||||||
meta = with lib; {
|
meta = with lib; {
|
||||||
|
@ -29,7 +29,7 @@ buildKodiAddon rec {
|
|||||||
'';
|
'';
|
||||||
|
|
||||||
postInstall = ''
|
postInstall = ''
|
||||||
mv /build/source/addon.xml $out${addonDir}/${namespace}/
|
cp -v addon.xml $out${addonDir}/$namespace/
|
||||||
'';
|
'';
|
||||||
|
|
||||||
propagatedBuildInputs = [
|
propagatedBuildInputs = [
|
||||||
|
@ -36,7 +36,7 @@ buildKodiAddon rec {
|
|||||||
'';
|
'';
|
||||||
|
|
||||||
postInstall = ''
|
postInstall = ''
|
||||||
mv /build/source/addon.xml $out${addonDir}/${namespace}/
|
cp -v addon.xml $out${addonDir}/$namespace/
|
||||||
'';
|
'';
|
||||||
|
|
||||||
propagatedBuildInputs = [
|
propagatedBuildInputs = [
|
||||||
|
@ -52,8 +52,8 @@ python3Packages.buildPythonApplication rec {
|
|||||||
];
|
];
|
||||||
|
|
||||||
# wrapGAppsHook4 propogates gtk4 -- which provides gtk4-update-icon-cache instead
|
# wrapGAppsHook4 propogates gtk4 -- which provides gtk4-update-icon-cache instead
|
||||||
preInstall = ''
|
postPatch = ''
|
||||||
substituteInPlace /build/source/meson_post_install.py \
|
substituteInPlace meson_post_install.py \
|
||||||
--replace-fail gtk-update-icon-cache gtk4-update-icon-cache
|
--replace-fail gtk-update-icon-cache gtk4-update-icon-cache
|
||||||
'';
|
'';
|
||||||
|
|
||||||
|
@ -25,7 +25,7 @@ stdenv.mkDerivation rec {
|
|||||||
patchPhase = ''
|
patchPhase = ''
|
||||||
runHook prePatch
|
runHook prePatch
|
||||||
|
|
||||||
patchShebangs --build /build/source/scripts/*
|
patchShebangs --build scripts/*
|
||||||
|
|
||||||
runHook postPatch
|
runHook postPatch
|
||||||
'';
|
'';
|
||||||
|
@ -47,16 +47,19 @@ stdenv.mkDerivation rec {
|
|||||||
"-DCMAKE_RANLIB=${stdenv.cc.cc}/bin/gcc-ranlib"
|
"-DCMAKE_RANLIB=${stdenv.cc.cc}/bin/gcc-ranlib"
|
||||||
];
|
];
|
||||||
|
|
||||||
|
postBuild = ''
|
||||||
|
cd .. # move out of cmakeBuildDir
|
||||||
|
'';
|
||||||
|
|
||||||
doCheck = cliSupport;
|
doCheck = cliSupport;
|
||||||
|
|
||||||
preCheck = ''
|
preCheck = ''
|
||||||
cd ..
|
|
||||||
sed -i tests/runTests.du \
|
sed -i tests/runTests.du \
|
||||||
-e '/http/d'
|
-e '/http/d'
|
||||||
sed -i tests/path/realpath.du \
|
sed -i tests/path/realpath.du \
|
||||||
-e 's/usr/build/g'
|
-e 's/usr/build/g'
|
||||||
sed -i tests/path/isDir.du \
|
sed -i tests/path/isDir.du \
|
||||||
-e 's,/usr/bin,/build/source,' \
|
-e "s,/usr/bin,$PWD," \
|
||||||
-e '/home/d'
|
-e '/home/d'
|
||||||
'';
|
'';
|
||||||
|
|
||||||
@ -67,11 +70,11 @@ stdenv.mkDerivation rec {
|
|||||||
|
|
||||||
installPhase = ''
|
installPhase = ''
|
||||||
mkdir -p $out
|
mkdir -p $out
|
||||||
cp -r /build/source/src/include $out/include
|
cp -r src/include $out/include
|
||||||
mkdir -p $out/lib
|
mkdir -p $out/lib
|
||||||
cp /build/source/build/src/libdictu_api* $out/lib
|
cp build/src/libdictu_api* $out/lib
|
||||||
'' + lib.optionalString cliSupport ''
|
'' + lib.optionalString cliSupport ''
|
||||||
install -Dm755 /build/source/dictu $out/bin/dictu
|
install -Dm755 dictu $out/bin/dictu
|
||||||
'';
|
'';
|
||||||
|
|
||||||
meta = with lib; {
|
meta = with lib; {
|
||||||
|
@ -1,5 +1,6 @@
|
|||||||
{
|
{
|
||||||
buildPythonPackage,
|
buildPythonPackage,
|
||||||
|
python,
|
||||||
fetchFromGitHub,
|
fetchFromGitHub,
|
||||||
lib,
|
lib,
|
||||||
requests,
|
requests,
|
||||||
@ -25,8 +26,10 @@ buildPythonPackage rec {
|
|||||||
|
|
||||||
postPatch = ''
|
postPatch = ''
|
||||||
# fix hardcoded absolute paths
|
# fix hardcoded absolute paths
|
||||||
substituteInPlace **/*.* \
|
substituteInPlace tests/test_SYSTEM*.py \
|
||||||
--replace /Users/ces/Desktop/code/naked /build/source
|
--replace-fail /Users/ces/Desktop/code/naked/tests/ "$PWD"/tests/
|
||||||
|
substituteInPlace lib/Naked/toolshed/c/*.c \
|
||||||
|
--replace-fail /Users/ces/Desktop/code/naked/lib/ $out/${python.sitePackages}/
|
||||||
'';
|
'';
|
||||||
|
|
||||||
nativeBuildInputs = [
|
nativeBuildInputs = [
|
||||||
|
@ -178,7 +178,7 @@ buildPythonPackage rec {
|
|||||||
|
|
||||||
preCheck = ''
|
preCheck = ''
|
||||||
# build/temp* refers to build_ext.build_temp (looked up in the build logs)
|
# build/temp* refers to build_ext.build_temp (looked up in the build logs)
|
||||||
(cd /build/source/python/build/temp* ; ctest)
|
(cd ./build/temp* ; ctest)
|
||||||
|
|
||||||
# For pytestCheckHook
|
# For pytestCheckHook
|
||||||
cd test/unit
|
cd test/unit
|
||||||
|
@ -29,7 +29,7 @@ stdenv.mkDerivation rec {
|
|||||||
cp ./bin/bm $out/bin/
|
cp ./bin/bm $out/bin/
|
||||||
|
|
||||||
substituteInPlace $out/bin/bm \
|
substituteInPlace $out/bin/bm \
|
||||||
--replace /build/source $out/share/bonnmotion
|
--replace-fail "$PWD" $out/share/bonnmotion
|
||||||
|
|
||||||
runHook postInstall
|
runHook postInstall
|
||||||
'';
|
'';
|
||||||
|
@ -546,7 +546,7 @@ in python.pkgs.buildPythonApplication rec {
|
|||||||
];
|
];
|
||||||
|
|
||||||
postPatch = ''
|
postPatch = ''
|
||||||
substituteInPlace tests/test_config.py --replace-fail '"/usr"' '"/build/media"'
|
substituteInPlace tests/test_config.py --replace-fail '"/usr"' "\"$NIX_BUILD_TOP/media\""
|
||||||
|
|
||||||
substituteInPlace pyproject.toml --replace-fail "wheel~=0.43.0" wheel
|
substituteInPlace pyproject.toml --replace-fail "wheel~=0.43.0" wheel
|
||||||
|
|
||||||
@ -676,7 +676,7 @@ in python.pkgs.buildPythonApplication rec {
|
|||||||
export HOME="$TEMPDIR"
|
export HOME="$TEMPDIR"
|
||||||
|
|
||||||
# the tests require the existance of a media dir
|
# the tests require the existance of a media dir
|
||||||
mkdir /build/media
|
mkdir "$NIX_BUILD_TOP"/media
|
||||||
|
|
||||||
# put ping binary into PATH, e.g. for wake_on_lan tests
|
# put ping binary into PATH, e.g. for wake_on_lan tests
|
||||||
export PATH=${inetutils}/bin:$PATH
|
export PATH=${inetutils}/bin:$PATH
|
||||||
|
Loading…
Reference in New Issue
Block a user