[taffybar] Refactor nix files

This commit is contained in:
Ivan Malison 2019-06-19 21:56:34 -07:00
parent ebd55fba34
commit 919bc2be07
No known key found for this signature in database
GPG Key ID: 62530EFBE99DC2F8
3 changed files with 26 additions and 12 deletions

View 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"]
)
{ };
});
});
})
];
}

View File

@ -1,6 +1 @@
let
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 { }
(import ./base.nix).haskellPackages.imalison-taffybar

View File

@ -1,7 +1,7 @@
let
pkgs = (import ./taffybar/nixpkgs.nix) { overlays = [
(import ./taffybar/overlay.nix) (import ../xmonad/overlay.nix)
]; };
source = pkgs.lib.sourceByRegex ./. ["taffybar.hs" "imalison-taffybar.cabal"];
imalison-taffybar = pkgs.haskellPackages.callCabal2nix "imalison-taffybar" source { };
in pkgs.haskellPackages.shellFor { packages = _: [imalison-taffybar pkgs.haskellPackages.taffybar]; }
pkgs = (import ./base.nix);
in pkgs.haskellPackages.shellFor {
packages = _: [
pkgs.haskellPackages.imalison-taffybar pkgs.haskellPackages.taffybar
];
}