diff --git a/pkgs/development/libraries/haskell/singletons/default.nix b/pkgs/development/libraries/haskell/singletons/default.nix index 77087279edf4..aeace4d3fceb 100644 --- a/pkgs/development/libraries/haskell/singletons/default.nix +++ b/pkgs/development/libraries/haskell/singletons/default.nix @@ -9,6 +9,7 @@ cabal.mkDerivation (self: { buildDepends = [ mtl thDesugar ]; testDepends = [ Cabal constraints filepath tasty tastyGolden ]; noHaddock = true; + patches = self.stdenv.lib.optional self.stdenv.isDarwin ./test.patch; meta = { homepage = "http://www.cis.upenn.edu/~eir/packages/singletons"; description = "A framework for generating singleton types"; diff --git a/pkgs/development/libraries/haskell/singletons/test.patch b/pkgs/development/libraries/haskell/singletons/test.patch new file mode 100644 index 000000000000..6979c2c6cb0a --- /dev/null +++ b/pkgs/development/libraries/haskell/singletons/test.patch @@ -0,0 +1,12 @@ +--- a/tests/SingletonsTestSuiteUtils.hs ++++ b/tests/SingletonsTestSuiteUtils.hs +@@ -201,7 +201,7 @@ testCompileAndDumpGroup testDir tests = + filterWithSed :: FilePath -> IO () + filterWithSed file = runProcessWithOpts CreatePipe "sed" + #ifdef darwin_HOST_OS +- [ "-i", "''" ++ [ "-i" + #else + [ "-i" + #endif +