Skip to content

Commit

Permalink
Merge pull request #8 from epics-extensions/dont-make-install-twice
Browse files Browse the repository at this point in the history
mkEpicsPackage: don't manually make install
  • Loading branch information
minijackson authored May 16, 2023
2 parents 83a0395 + e8a41f6 commit 1d548a8
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 11 deletions.
27 changes: 16 additions & 11 deletions pkgs/build-support/mk-epics-package.nix
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@
buildInputs ? [],
makeFlags ? [],
preBuild ? "",
postInstall ? "",
postFixup ? "",
...
} @ attrs:
Expand Down Expand Up @@ -55,6 +54,7 @@ in

setupHook = ./setup-hook.sh;

# Defaults to true, EPICS' Makefile framework does usually support parallel builds
enableParallelBuilding = attrs.enableParallelBuilding or true;

dontConfigure = true;
Expand Down Expand Up @@ -113,17 +113,22 @@ in
# Automatically create binaries directly in `bin/` that calls the ones that
# are in `bin/linux-x86_64/`
# TODO: we should probably do the same for libraries
postInstall =
''
if [[ -d "$out/bin/${host_arch}" ]]; then
for file in "$out/bin/${host_arch}/"*; do
[[ -x "$file" ]] || continue
#
# Don't do a manual `make install`, `make` already installs
# everything into `INSTALL_LOCATION`.
installPhase = ''
runHook preInstall
makeWrapper "$file" "$out/bin/$(basename "$file")"
done
fi
''
+ postInstall;
if [[ -d "$out/bin/${host_arch}" ]]; then
for file in "$out/bin/${host_arch}/"*; do
[[ -x "$file" ]] || continue
makeWrapper "$file" "$out/bin/$(basename "$file")"
done
fi
runHook postInstall
'';

doCheck = attrs.doCheck or true;
checkTarget = "runtests";
Expand Down
2 changes: 2 additions & 0 deletions pkgs/epnix/tools/procServ/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,8 @@ stdenv.mkDerivation rec {
# without doc for now...
configureFlags = ["--disable-doc"];

enableParallelBuilding = true;

meta = {
description = "Wrapper to start arbitrary interactive commands in the background, with telnet or Unix domain socket access to stdin/stdout";
homepage = "https://github.com/ralphlange/procServ";
Expand Down

0 comments on commit 1d548a8

Please sign in to comment.