mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-12-25 03:17:13 +00:00
d26466c6d8
This impurity caused hsc2hs to start look into /usr/include in any Cabal project that depends on HFuse on systems where /usr/include is present.
25 lines
1.1 KiB
Nix
25 lines
1.1 KiB
Nix
{ 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@ Include-Dirs: /usr/include, /usr/local/include, .@ Include-Dirs: ${fuse}/include@" 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 ];
|
|
};
|
|
})
|