Peter's XMonad configuration files
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

overrides.nix 1.1KB

123456789101112131415161718192021222324252627282930313233
  1. { pkgs ? import <nixpkgs> {}
  2. }:
  3. with pkgs.lib;
  4. let
  5. # Replace the source attribute so it points at the source found in
  6. # the given JSON file:
  7. replaceSrc = haskell: nix: json:
  8. let src = pkgs.fetchgit (removeAttrs (importJSON json) ["date"]);
  9. mkD = args: haskell.mkDerivation (args // { inherit src; });
  10. in haskell.callPackage nix { mkDerivation = mkD; };
  11. # Use my copy of some packages:
  12. overrides = self: super: with pkgs.haskell.lib; {
  13. playlists = import ./nix/playlists.nix { inherit pkgs; haskell = self; };
  14. playlists-http = import ./nix/playlists-http.nix { inherit pkgs; haskell = self; };
  15. xmonad = replaceSrc self ./nix/xmonad.cabal.nix ./nix/xmonad.json;
  16. xmonad-contrib = replaceSrc self ./nix/xmonad-contrib.cabal.nix ./nix/xmonad-contrib.json;
  17. http-client = if super ? http-client_0_6_2
  18. then super.http-client_0_6_2
  19. else super.http-client;
  20. xmonadrc = self.callPackage ./xmonadrc.nix { };
  21. };
  22. in
  23. # Apply the overrides from above:
  24. pkgs.haskellPackages.override (orig: {
  25. overrides = pkgs.lib.composeExtensions
  26. (orig.overrides or (_: _: {})) overrides; })