about summary refs log tree commit diff
path: root/pkgs/games/mnemosyne
diff options
context:
space:
mode:
authorWeijia Wang <9713184+wegank@users.noreply.github.com>2023-03-06 17:03:36 +0200
committerWeijia Wang <9713184+wegank@users.noreply.github.com>2023-03-06 17:03:36 +0200
commit4056bd515fcf848a63c3e009c078f51f06b1cd07 (patch)
tree3f97c83aeb3d7f1715d06e98acd2e72764fcdeb6 /pkgs/games/mnemosyne
parent27390e6807788f7da8150dab9a55277d0ff1c1b8 (diff)
mnemosyne: fix build on darwin
Diffstat (limited to 'pkgs/games/mnemosyne')
-rw-r--r--pkgs/games/mnemosyne/default.nix12
1 files changed, 6 insertions, 6 deletions
diff --git a/pkgs/games/mnemosyne/default.nix b/pkgs/games/mnemosyne/default.nix
index 4a92b8c1014a6..33392d6ca05dd 100644
--- a/pkgs/games/mnemosyne/default.nix
+++ b/pkgs/games/mnemosyne/default.nix
@@ -1,5 +1,7 @@
-{ fetchurl
+{ lib
+, stdenv
 , python
+, fetchurl
 , anki
 }:
 
@@ -29,18 +31,16 @@ python.pkgs.buildPythonApplication rec {
   ];
 
   prePatch = ''
-    substituteInPlace setup.py --replace /usr $out
-    find . -type f -exec grep -H sys.exec_prefix {} ';' | cut -d: -f1 | xargs sed -i s,sys.exec_prefix,\"$out\",
+    substituteInPlace setup.py \
+      --replace '("", ["/usr/local/bin/mplayer"])' ""
   '';
 
-  # No tests/ directrory in tarball
+  # No tests/ directory in tarball
   doCheck = false;
 
   postInstall = ''
     mkdir -p $out/share/applications
-    mv $out/${python.sitePackages}/$out/share/locale $out/share
     mv mnemosyne.desktop $out/share/applications
-    rm -r $out/${python.sitePackages}/nix
   '';
 
   dontWrapQtApps = true;