nix-conf-xmonad/modules/xmonad/buildXmonad.nix
2022-04-07 09:26:09 +03:00

32 lines
907 B
Nix

# 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";
src = "${xmonad-masser}/share/x86_64-linux-ghc-9.0.2/xmonad-masser-0.1.0.0/dhall";
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