2024-02-29 20:09:43 +00:00
|
|
|
{
|
|
|
|
lib,
|
|
|
|
callPackage,
|
|
|
|
runCommand,
|
|
|
|
qtwayland,
|
|
|
|
wrapQtAppsHook,
|
|
|
|
unwrapped ? callPackage ./unwrapped.nix {},
|
|
|
|
withWayland ? false,
|
|
|
|
extraPackages ? [],
|
2020-04-24 23:36:52 +00:00
|
|
|
}:
|
2024-02-29 20:09:43 +00:00
|
|
|
runCommand "sddm-wrapped" {
|
|
|
|
inherit (unwrapped) version;
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2024-02-29 20:09:43 +00:00
|
|
|
buildInputs = unwrapped.buildInputs ++ extraPackages ++ lib.optional withWayland qtwayland;
|
|
|
|
nativeBuildInputs = [ wrapQtAppsHook ];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2024-02-29 20:09:43 +00:00
|
|
|
passthru = {
|
|
|
|
inherit unwrapped;
|
|
|
|
};
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2024-02-29 20:09:43 +00:00
|
|
|
meta = unwrapped.meta;
|
|
|
|
} ''
|
|
|
|
mkdir -p $out/bin
|
2023-07-15 17:15:38 +00:00
|
|
|
|
2024-02-29 20:09:43 +00:00
|
|
|
cd ${unwrapped}
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2024-02-29 20:09:43 +00:00
|
|
|
for i in *; do
|
|
|
|
if [ "$i" == "bin" ]; then
|
|
|
|
continue
|
|
|
|
fi
|
|
|
|
ln -s ${unwrapped}/$i $out/$i
|
|
|
|
done
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2024-02-29 20:09:43 +00:00
|
|
|
for i in bin/*; do
|
|
|
|
makeQtWrapper ${unwrapped}/$i $out/$i --set SDDM_GREETER_DIR $out/bin
|
|
|
|
done
|
|
|
|
''
|