mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-12-05 05:13:04 +00:00
38 lines
691 B
Nix
38 lines
691 B
Nix
{
|
|
lib,
|
|
callPackage,
|
|
runCommand,
|
|
qtwayland,
|
|
wrapQtAppsHook,
|
|
unwrapped ? callPackage ./unwrapped.nix {},
|
|
withWayland ? false,
|
|
extraPackages ? [],
|
|
}:
|
|
runCommand "sddm-wrapped" {
|
|
inherit (unwrapped) version;
|
|
|
|
buildInputs = unwrapped.buildInputs ++ extraPackages ++ lib.optional withWayland qtwayland;
|
|
nativeBuildInputs = [ wrapQtAppsHook ];
|
|
|
|
passthru = {
|
|
inherit unwrapped;
|
|
};
|
|
|
|
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
|
|
''
|