depot/pkgs/applications/display-managers/sddm/default.nix
Luke Granger-Brown 57725ef3ec Squashed 'third_party/nixpkgs/' content from commit 76612b17c0ce
git-subtree-dir: third_party/nixpkgs
git-subtree-split: 76612b17c0ce71689921ca12d9ffdc9c23ce40b2
2024-11-10 23:59:47 +00:00

42 lines
850 B
Nix

{
lib,
callPackage,
runCommand,
layer-shell-qt,
qtwayland,
wrapQtAppsHook,
unwrapped ? callPackage ./unwrapped.nix {},
withWayland ? false,
withLayerShellQt ? false,
extraPackages ? [],
}:
runCommand "sddm-wrapped" {
inherit (unwrapped) version;
buildInputs = unwrapped.buildInputs ++ extraPackages
++ lib.optional withWayland qtwayland
++ lib.optional (withWayland && withLayerShellQt) layer-shell-qt;
nativeBuildInputs = [ wrapQtAppsHook ];
passthru = {
inherit unwrapped;
inherit (unwrapped.passthru) tests;
};
meta = unwrapped.meta;
} ''
mkdir -p $out/bin
cd ${unwrapped}
for i in *; do
if [ "$i" == "bin" ]; then
continue
fi
ln -s ${unwrapped}/$i $out/$i
done
for i in bin/*; do
makeQtWrapper ${unwrapped}/$i $out/$i --set SDDM_GREETER_DIR $out/bin
done
''