summary refs log tree commit diff
diff options
context:
space:
mode:
authorobadz <obadz-git@obadz.com>2016-06-09 08:51:40 +0100
committerobadz <obadz-git@obadz.com>2016-06-09 08:53:47 +0100
commitfcb0023e8030074f140c69013a6b339880cd24de (patch)
treecc7639518618ae3a80a1d2f2d2a50fe149042009
parenta357edc0c69f24f3d82a79f736e55ffe8991bdce (diff)
downloadnixpkgs-fcb0023e8030074f140c69013a6b339880cd24de.tar
nixpkgs-fcb0023e8030074f140c69013a6b339880cd24de.tar.gz
nixpkgs-fcb0023e8030074f140c69013a6b339880cd24de.tar.bz2
nixpkgs-fcb0023e8030074f140c69013a6b339880cd24de.tar.lz
nixpkgs-fcb0023e8030074f140c69013a6b339880cd24de.tar.xz
nixpkgs-fcb0023e8030074f140c69013a6b339880cd24de.tar.zst
nixpkgs-fcb0023e8030074f140c69013a6b339880cd24de.zip
haskellPackages.intero: fix tests (thanks @rvl)
-rw-r--r--pkgs/development/haskell-modules/configuration-common.nix10
1 files changed, 7 insertions, 3 deletions
diff --git a/pkgs/development/haskell-modules/configuration-common.nix b/pkgs/development/haskell-modules/configuration-common.nix
index b5ccb3d8f3a..3d9606298dc 100644
--- a/pkgs/development/haskell-modules/configuration-common.nix
+++ b/pkgs/development/haskell-modules/configuration-common.nix
@@ -1027,13 +1027,17 @@ self: super: {
   cairo = addBuildTool super.cairo self.gtk2hs-buildtools;
   pango = addBuildTool super.pango self.gtk2hs-buildtools;
 
-  # Tests fail with "Couldn't launch intero process."
-  intero = dontCheck super.intero;
+  # Fix tests which would otherwise fail with "Couldn't launch intero process."
+  intero = overrideCabal super.intero (drv: {
+    postPatch = (drv.postPatch or "") + ''
+      substituteInPlace src/test/Main.hs --replace "\"intero\"" "\"$PWD/dist/build/intero/intero\""
+    '';
+  });
 
   # libmpd has an upper-bound on time which doesn't seem to be a real build req
   libmpd = dontCheck (overrideCabal super.libmpd (drv: {
     postPatch = (drv.postPatch or "") + ''
-      substituteInPlace ./libmpd.cabal --replace "time >=1.5 && <1.6" "time >=1.5"
+      substituteInPlace libmpd.cabal --replace "time >=1.5 && <1.6" "time >=1.5"
     '';
   }));
 }