{ pkgs ? import (import ./nix/sources.nix).nixpkgs { } }: let haskellPackages = pkgs.haskellPackages.override { overrides = self: super: { astatusbar = self.callCabal2nix "astatusbar" ./. { }; sh = pkgs.haskell.lib.dontCheck (self.callCabal2nix "sh" (import ./nix/sources.nix).sh { }); statvfs = pkgs.haskell.lib.markUnbroken (super.statvfs.overrideAttrs (oldAtts: { patches = [ (pkgs.writers.writeText "statvfs.patch" '' diff --git a/Setup.hs b/Setup.hs index 7cf9bfd..54f57d6 100644 --- a/Setup.hs +++ b/Setup.hs @@ -3,4 +3,4 @@ module Main (main) where import Distribution.Simple main :: IO () -main = defaultMainWithHooks defaultUserHooks +main = defaultMainWithHooks autoconfUserHooks '') ]; })); X11 = (self.callCabal2nix "X11" (pkgs.fetchFromGitHub { owner = "xmonad"; repo = "X11"; rev = "1ead9698c89e78884ac771c93822447999a1dc46"; hash = "sha256-OAZ3gnUezsumBC8VwhcsKq+Nrq44L4xY/z6exK7InLo="; }) { }).overrideAttrs (oldAttrs: { preConfigure = oldAttrs.preConfigure or "" + '' ${pkgs.autoconf}/bin/autoreconf''; patches = oldAttrs.patches or [ ] ++ [ (pkgs.writers.writeText "X11-safe-select.patch" '' diff --git a/Graphics/X11/Xlib/Event.hsc b/Graphics/X11/Xlib/Event.hsc index 842fc2f..869aba8 100644 --- a/Graphics/X11/Xlib/Event.hsc +++ b/Graphics/X11/Xlib/Event.hsc @@ -419,7 +419,7 @@ newtype FdSet = FdSet (Ptr FdSet) foreign import ccall unsafe "HsXlib.h" fdZero :: Ptr FdSet -> IO () foreign import ccall unsafe "HsXlib.h" fdSet :: CInt -> Ptr FdSet -> IO () -foreign import ccall unsafe "HsXlib.h" select :: +foreign import ccall safe "HsXlib.h" select :: CInt -> Ptr FdSet -> Ptr FdSet -> Ptr FdSet -> Ptr TimeVal -> IO CInt -- | This function is somewhat compatible with Win32's @TimeGetTime()@ '') ]; }); }; }; in rec { inherit haskellPackages; inherit (haskellPackages) astatusbar; shell = haskellPackages.shellFor { packages = _: [ haskellPackages.astatusbar ]; buildInputs = [ pkgs.cabal-install pkgs.niv pkgs.ormolu ]; withHoogle = true; }; }