nix-conf-xmonad/modules/xmonad/buildXmonad.nix

32 lines
907 B
Nix
Raw Normal View History

2021-11-19 20:15:27 +02:00
# Create the xmonad.dhall end result with all the binaries resolved
#
# Use it as such: callPackage ./buildXmonad.nix {} ./xmonad.dhall { inherit teams; }
{ lib, xmonad-masser, dhallPackages, runCommand }:
path:
packages:
let
xmonadDeps = with dhallPackages;
buildDhallDirectoryPackage {
name = "xmonad-masser";
2022-04-07 09:26:09 +03:00
src = "${xmonad-masser}/share/x86_64-linux-ghc-9.0.2/xmonad-masser-0.1.0.0/dhall";
2021-11-19 20:15:27 +02:00
file = "package.dhall";
source = false;
document = false;
dependencies = [ (Prelude.overridePackage { file = "package.dhall"; }) ];
};
xmonadInput = runCommand "packages.dhall"
packages
''
substituteAll ${path} $out
'';
xmonadConfig = with dhallPackages; buildDhallPackage {
name = "xmonad.dhall";
code = xmonadInput;
dependencies = [ Prelude xmonadDeps ];
source = true;
};
in xmonadConfig