forked from colonelpanic/dotfiles
[taffybar] Refactor nix files
This commit is contained in:
parent
ebd55fba34
commit
919bc2be07
19
dotfiles/config/taffybar/base.nix
Normal file
19
dotfiles/config/taffybar/base.nix
Normal file
@ -0,0 +1,19 @@
|
|||||||
|
(import ./taffybar/nixpkgs.nix) {
|
||||||
|
overlays = [
|
||||||
|
(import ./taffybar/overlay.nix)
|
||||||
|
(import ../xmonad/overlay.nix)
|
||||||
|
(_: super: {
|
||||||
|
haskellPackages = super.haskellPackages.override (old: {
|
||||||
|
overrides = super.lib.composeExtensions (old.overrides or (_: _: {})) (self: _: {
|
||||||
|
imalison-taffybar =
|
||||||
|
self.callCabal2nix "imalison-taffybar"
|
||||||
|
(
|
||||||
|
super.lib.sourceByRegex ./.
|
||||||
|
["taffybar.hs" "imalison-taffybar.cabal"]
|
||||||
|
)
|
||||||
|
{ };
|
||||||
|
});
|
||||||
|
});
|
||||||
|
})
|
||||||
|
];
|
||||||
|
}
|
@ -1,6 +1 @@
|
|||||||
let
|
(import ./base.nix).haskellPackages.imalison-taffybar
|
||||||
pkgs = (import ./taffybar/nixpkgs.nix) { overlays = [
|
|
||||||
(import ./taffybar/overlay.nix) (import ../xmonad/overlay.nix)
|
|
||||||
]; };
|
|
||||||
source = pkgs.lib.sourceByRegex ./. ["taffybar.hs" "imalison-taffybar.cabal"];
|
|
||||||
in pkgs.haskellPackages.callCabal2nix "imalison-taffybar" source { }
|
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
let
|
let
|
||||||
pkgs = (import ./taffybar/nixpkgs.nix) { overlays = [
|
pkgs = (import ./base.nix);
|
||||||
(import ./taffybar/overlay.nix) (import ../xmonad/overlay.nix)
|
in pkgs.haskellPackages.shellFor {
|
||||||
]; };
|
packages = _: [
|
||||||
source = pkgs.lib.sourceByRegex ./. ["taffybar.hs" "imalison-taffybar.cabal"];
|
pkgs.haskellPackages.imalison-taffybar pkgs.haskellPackages.taffybar
|
||||||
imalison-taffybar = pkgs.haskellPackages.callCabal2nix "imalison-taffybar" source { };
|
];
|
||||||
in pkgs.haskellPackages.shellFor { packages = _: [imalison-taffybar pkgs.haskellPackages.taffybar]; }
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user