diff options
author | Matthew Bauer <mjbauer95@gmail.com> | 2018-11-28 12:11:41 -0600 |
---|---|---|
committer | Matthew Bauer <mjbauer95@gmail.com> | 2018-11-28 20:14:44 -0600 |
commit | 38f1b48232347d1a6e21a2c603c516b9a7128502 (patch) | |
tree | 0d5072e4da724f11c79bde8fd44b3b4f1e275cca /pkgs/tools | |
parent | 5d9b3a8e8b43b8a769ea1e0f9f4b5541ed4b6108 (diff) | |
download | nixlib-38f1b48232347d1a6e21a2c603c516b9a7128502.tar nixlib-38f1b48232347d1a6e21a2c603c516b9a7128502.tar.gz nixlib-38f1b48232347d1a6e21a2c603c516b9a7128502.tar.bz2 nixlib-38f1b48232347d1a6e21a2c603c516b9a7128502.tar.lz nixlib-38f1b48232347d1a6e21a2c603c516b9a7128502.tar.xz nixlib-38f1b48232347d1a6e21a2c603c516b9a7128502.tar.zst nixlib-38f1b48232347d1a6e21a2c603c516b9a7128502.zip |
tightvnc: use imake setup hook
Diffstat (limited to 'pkgs/tools')
-rw-r--r-- | pkgs/tools/admin/tightvnc/default.nix | 38 |
1 files changed, 19 insertions, 19 deletions
diff --git a/pkgs/tools/admin/tightvnc/default.nix b/pkgs/tools/admin/tightvnc/default.nix index 4027b3d531c3..5a76b500d149 100644 --- a/pkgs/tools/admin/tightvnc/default.nix +++ b/pkgs/tools/admin/tightvnc/default.nix @@ -10,15 +10,14 @@ stdenv.mkDerivation { }; # for the builder script - inherit xauth fontDirectories perl; - gcc = stdenv.cc.cc; + inherit fontDirectories; hardeningDisable = [ "format" ]; buildInputs = [ xlibsWrapper zlib libjpeg imake gccmakedep libXmu libXaw libXpm libXp xauth openssh ]; - patchPhase = '' + postPatch = '' fontPath= for i in $fontDirectories; do for j in $(find $i -name fonts.dir); do @@ -27,37 +26,38 @@ stdenv.mkDerivation { done sed -i "s@/usr/bin/ssh@${openssh}/bin/ssh@g" vncviewer/vncviewer.h - ''; - buildPhase = '' - xmkmf - make World sed -e 's@/usr/bin/perl@${perl}/bin/perl@' \ -e 's@unix/:7100@'$fontPath'@' \ -i vncserver - cd Xvnc - sed -e 's@.* CppCmd .*@#define CppCmd '$gcc'/bin/cpp@' -i config/cf/linux.cf - sed -e 's@.* CppCmd .*@#define CppCmd '$gcc'/bin/cpp@' -i config/cf/Imake.tmpl + sed -e 's@.* CppCmd .*@#define CppCmd cpp@' -i Xvnc/config/cf/linux.cf + sed -e 's@.* CppCmd .*@#define CppCmd cpp@' -i Xvnc/config/cf/Imake.tmpl sed -i \ -e 's@"uname","xauth","Xvnc","vncpasswd"@"uname","Xvnc","vncpasswd"@g' \ -e "s@\<xauth\>@${xauth}/bin/xauth@g" \ - ../vncserver - ./configure - make - cd .. + vncserver ''; - installPhase = '' + preInstall = '' mkdir -p $out/bin mkdir -p $out/share/man/man1 + ''; + + installPhase = '' + runHook preInstall + ./vncinstall $out/bin $out/share/man + runHook postInstall + ''; + + postInstall = '' # fix HTTP client: - t=$out/share/tightvnc - mkdir -p $t - sed -i "s@/usr/local/vnc/classes@$out/vnc/classes@g" $out/bin/vncserver - cp -r classes $t + mkdir -p $out/share/tightvnc + cp -r classes $out/share/tightvnc + substituteInPlace $out/bin/vncserver \ + --replace /usr/local/vnc/classes $out/share/tightvnc/classes ''; meta = { |