treewide: use $out instead of $bin with buildGoPackage
This commit is contained in:
@@ -47,8 +47,8 @@ in buildGoPackage rec {
|
||||
|
||||
# DataDog use paths relative to the agent binary, so fix these.
|
||||
postPatch = ''
|
||||
sed -e "s|PyChecksPath =.*|PyChecksPath = \"$bin/${python.sitePackages}\"|" \
|
||||
-e "s|distPath =.*|distPath = \"$bin/share/datadog-agent\"|" \
|
||||
sed -e "s|PyChecksPath =.*|PyChecksPath = \"$out/${python.sitePackages}\"|" \
|
||||
-e "s|distPath =.*|distPath = \"$out/share/datadog-agent\"|" \
|
||||
-i cmd/agent/common/common_nix.go
|
||||
sed -e "s|/bin/hostname|${lib.getBin hostname}/bin/hostname|" \
|
||||
-i pkg/util/hostname_nix.go
|
||||
@@ -57,14 +57,14 @@ in buildGoPackage rec {
|
||||
# Install the config files and python modules from the "dist" dir
|
||||
# into standard paths.
|
||||
postInstall = ''
|
||||
mkdir -p $bin/${python.sitePackages} $bin/share/datadog-agent
|
||||
cp -R $src/cmd/agent/dist/conf.d $bin/share/datadog-agent
|
||||
cp -R $src/cmd/agent/dist/{checks,utils,config.py} $bin/${python.sitePackages}
|
||||
mkdir -p $out/${python.sitePackages} $out/share/datadog-agent
|
||||
cp -R $src/cmd/agent/dist/conf.d $out/share/datadog-agent
|
||||
cp -R $src/cmd/agent/dist/{checks,utils,config.py} $out/${python.sitePackages}
|
||||
|
||||
cp -R $src/pkg/status/dist/templates $bin/share/datadog-agent
|
||||
cp -R $src/pkg/status/dist/templates $out/share/datadog-agent
|
||||
|
||||
wrapProgram "$bin/bin/agent" \
|
||||
--set PYTHONPATH "$bin/${python.sitePackages}" \
|
||||
wrapProgram "$out/bin/agent" \
|
||||
--set PYTHONPATH "$out/${python.sitePackages}" \
|
||||
--prefix LD_LIBRARY_PATH : ${systemd.lib}/lib
|
||||
'';
|
||||
|
||||
|
||||
Reference in New Issue
Block a user