git.iko.soy/typeable/cabal2nix
on master help sign in
PostProcess.hs: fixed broken wxc installation

The self-made Setup.hs file of that project fails to install the library it has built. Don't ask me why. I reported the problem upstream, but until that's remedied we fix the issue ourselves with a postInstall hook.

commit958d97d91ba6732410d75420ffc125f7b2f017dc authorPeter Simons <simons@cryp.to> dateTue 17 Apr 2012, 15:51 (14 years ago) parent1504303
1 file changed+8−1
src/Cabal2Nix/PostProcess.hs+8−1
src/Cabal2Nix/PostProcess.hs+8−1
@@ -39,7 +39,7 @@ postProcess deriv@(MkDerivation {..})
3939 | pname == "threadscope" = deriv { configureFlags = "--ghc-options=-rtsopts":configureFlags }
4040 | pname == "vacuum" = deriv { extraLibs = "ghcPaths":extraLibs }
4141 | pname == "wxcore" = deriv { extraLibs = "wxGTK":"mesa":"libX11":extraLibs }
42− | pname == "wxc" = deriv { extraLibs = "wxGTK":"mesa":"libX11":extraLibs }
42+ | pname == "wxc" = deriv { extraLibs = "wxGTK":"mesa":"libX11":extraLibs, postInstall = wxcPostInstall }
4343 | pname == "X11" && version >= (Version [1,6] [])
4444 = deriv { extraLibs = "libXinerama":"libXext":"libXrender":extraLibs }
4545 | pname == "X11" = deriv { extraLibs = "libXinerama":"libXext":extraLibs }
@@ -59,3 +59,10 @@ ghcModPostInstall = unlines
5959 , " mv $pname-$version emacs/site-lisp"
6060 , " '';"
6161 ]
62+
63+wxcPostInstall :: String
64+wxcPostInstall = unlines
65+ [ "postInstall = ''"
66+ , " cp -v dist/build/libwxc.so.${self.version} $out/lib/libwxc.so"
67+ , " '';"
68+ ]