monkeysphere: Replace a hardcoded path and fix more tests

This commit is contained in:
Michael Weiss
2018-10-19 10:31:49 +02:00
parent f90009cbd7
commit 58a36edd20
+8 -6
View File
@@ -1,6 +1,6 @@
{ stdenv, fetchurl, makeWrapper { stdenv, fetchurl, makeWrapper
, perl, libassuan, libgcrypt , perl, libassuan, libgcrypt
, perlPackages, lockfileProgs, gnupg , perlPackages, lockfileProgs, gnupg, coreutils
# For the tests: # For the tests:
, bash, openssh, which, socat, cpio, hexdump , bash, openssh, which, socat, cpio, hexdump
}: }:
@@ -16,10 +16,14 @@ stdenv.mkDerivation rec {
patches = [ ./monkeysphere.patch ]; patches = [ ./monkeysphere.patch ];
postPatch = ''
sed -i "s,/usr/bin/env,${coreutils}/bin/env," src/share/ma/update_users
'';
nativeBuildInputs = [ makeWrapper ]; nativeBuildInputs = [ makeWrapper ];
buildInputs = [ perl libassuan libgcrypt ] buildInputs = [ perl libassuan libgcrypt ]
++ stdenv.lib.optional doCheck ++ stdenv.lib.optional doCheck
([ gnupg openssh which socat cpio hexdump ] ++ ([ gnupg openssh which socat cpio hexdump lockfileProgs ] ++
(with perlPackages; [ CryptOpenSSLRSA CryptOpenSSLBignum ])); (with perlPackages; [ CryptOpenSSLRSA CryptOpenSSLBignum ]));
makeFlags = '' makeFlags = ''
@@ -31,10 +35,8 @@ stdenv.mkDerivation rec {
# entropy (apparently GnuPG still uses /dev/random). # entropy (apparently GnuPG still uses /dev/random).
doCheck = false; doCheck = false;
preCheck = '' preCheck = ''
patchShebangs tests/keytrans patchShebangs tests/
patchShebangs src/share/keytrans patchShebangs src/
patchShebangs src/share/checkperms
sed -i "s,/usr/bin/env\ bash,${bash}/bin/bash," tests/basic
sed -i "s,/usr/sbin/sshd,${openssh}/bin/sshd," tests/basic sed -i "s,/usr/sbin/sshd,${openssh}/bin/sshd," tests/basic
sed -i "s/<(hd/<(hexdump/" tests/keytrans sed -i "s/<(hd/<(hexdump/" tests/keytrans
''; '';