summary refs log tree commit diff
path: root/pkgs/development/libraries/haskell/HFuse/default.nix
blob: bbb145fd8bf82e677fe8727af40c9118121c903b (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
{ cabal, fuse }:

cabal.mkDerivation (self: {
  pname = "HFuse";
  version = "0.2.4.1";
  sha256 = "12k04dvh92kk2i68bcb70xnk378qxmh46f241k06di5rkcgwyg1k";
  extraLibraries = [ fuse ];
  preConfigure = ''
    sed -i -e "s@  Extra-Lib-Dirs:         /usr/local/lib@  Extra-Lib-Dirs:         ${fuse}/lib@" HFuse.cabal
    sed -i -e "s/LANGUAGE FlexibleContexts/LANGUAGE FlexibleContexts, RankNTypes/" System/Fuse.hsc
    sed -i -e "s/E(Exception/E(catch, Exception, IOException/" System/Fuse.hsc
    sed -i -e "s/IO(catch,/IO(/" System/Fuse.hsc
    sed -i -e "s/IO.catch/ E.catch/" System/Fuse.hsc
    sed -i -e "s/const exitFailure/\\\\(_ :: IOException) -> exitFailure/" System/Fuse.hsc
  '';
  meta = {
    homepage = "https://github.com/toothbrush/hfuse";
    description = "HFuse is a binding for the Linux FUSE library";
    license = self.stdenv.lib.licenses.bsd3;
    platforms = self.ghc.meta.platforms;
    maintainers = [ self.stdenv.lib.maintainers.andres ];
  };
})