mirror of
https://github.com/lopsided98/nix-ros-overlay.git
synced 2025-06-12 02:34:50 +03:00
eloquent: foonathan-memory-vendor: work around the poorly designed build system
This commit is contained in:
parent
8555484451
commit
2c19fe0545
3 changed files with 33 additions and 1 deletions
|
@ -2,4 +2,22 @@
|
|||
self:
|
||||
# Distro package set
|
||||
rosSelf: rosSuper: with rosSelf.lib; {
|
||||
# This build system contains fractal levels of stupidity
|
||||
foonathan-memory-vendor = patchVendorGit rosSuper.foonathan-memory-vendor {
|
||||
url = "https://github.com/foonathan/memory.git";
|
||||
sha256 = "1n7xxi61wzpixb3kldnl826syb4yml613q4i38d0cciydhy1gwzl";
|
||||
fetchgitArgs = {
|
||||
# Needed by the postFetch, then removed there
|
||||
leaveDotGit = true;
|
||||
# Prevent the build system from trying to download random files
|
||||
postFetch = ''
|
||||
cd "$out/cmake/comp"
|
||||
git fetch https://github.com/foonathan/compatibility.git
|
||||
git checkout -f cf13bff238397aab0d8c49b7f6263233cf8a2396
|
||||
sed -i 's|\(set(COMP_REMOTE_URL\s\).*|\1"file://''${CMAKE_CURRENT_LIST_DIR}/")|' \
|
||||
comp_base.cmake
|
||||
rm -rf "$out/.git"
|
||||
'';
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
|
@ -13,7 +13,7 @@ rosSelf: rosSuper: with rosSelf.lib; {
|
|||
];
|
||||
});
|
||||
|
||||
# If anyone actually needs this package, its your problem to get it to
|
||||
# If anyone actually needs this package, it's your problem to get it to
|
||||
# compile.
|
||||
astra-camera = null;
|
||||
|
||||
|
|
|
@ -16,6 +16,20 @@ with lib;
|
|||
'' + postPatch;
|
||||
});
|
||||
|
||||
patchVendorGit = pkg: {
|
||||
url, sha256,
|
||||
file ? "CMakeLists.txt",
|
||||
fetchgitArgs ? {}
|
||||
}: pkg.overrideAttrs ({
|
||||
postPatch ? "", ...
|
||||
}: {
|
||||
postPatch = ''
|
||||
sed -i '\|GIT_REPOSITORY\s.*${escapeShellArg url}|c\
|
||||
URL "${self.fetchgit ({ inherit url sha256; } // fetchgitArgs)}"' \
|
||||
'${file}'
|
||||
'' + postPatch;
|
||||
});
|
||||
|
||||
patchBoostPython = pkg: pkg.overrideAttrs ({
|
||||
postPatch ? "", ...
|
||||
}: {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue