zim: fixed build; it also runs find now but the solution is hacky

This commit is contained in:
Pascal Wittmann 2014-09-04 23:53:54 +02:00
parent 42bb59a8a6
commit 701cd70502

View file

@ -20,8 +20,8 @@ buildPythonPackage rec {
propagatedBuildInputs = [ pythonPackages.sqlite3 pygtk /*pythonPackages.pyxdg*/ pygobject ];
preBuild = ''
mkdir -p $tmp/home
export HOME="$tmp/home"
mkdir -p /tmp/home
export HOME="/tmp/home"
'';
setupPyInstallFlags = ["--skip-xdg-cmd"];
@ -69,6 +69,27 @@ buildPythonPackage rec {
runHook postInstall
'';
# FIXME: this is quick and dirty hack, because zim expects the
# path to the executable in argv[0] therefore the wrapper is
# modified accordingly.
postFixup = ''
wrapPythonPrograms
sed -i "s#sys\.argv\[0\] = 'zim'#sys.argv[0] = '$out/bin/zim'#g" \
$out/bin/.zim-wrapped
if test -e $out/nix-support/propagated-build-inputs; then
ln -s $out/nix-support/propagated-build-inputs $out/nix-support/propagated-user-env-packages
fi
createBuildInputsPth build-inputs "$buildInputStrings"
for inputsfile in propagated-build-inputs propagated-native-build-inputs; do
if test -e $out/nix-support/$inputsfile; then
createBuildInputsPth $inputsfile "$(cat $out/nix-support/$inputsfile)"
fi
done
'';
# Testing fails.
doCheck = false;