Loading pkgs/by-name/co/cosmic-comp/package.nix +10 −41 Original line number Diff line number Diff line Loading @@ -3,20 +3,17 @@ stdenv, rustPlatform, fetchFromGitHub, makeBinaryWrapper, pixman, libcosmicAppHook, pkg-config, libinput, libglvnd, libxkbcommon, libgbm, libinput, pixman, seatd, udev, xwayland, wayland, xorg, useXWayland ? true, systemd, useXWayland ? true, useSystemd ? lib.meta.availableOn stdenv.hostPlatform systemd, }: Loading @@ -37,34 +34,21 @@ rustPlatform.buildRustPackage (finalAttrs: { separateDebugInfo = true; nativeBuildInputs = [ makeBinaryWrapper libcosmicAppHook pkg-config ]; buildInputs = [ libglvnd libinput libxkbcommon libgbm libinput pixman seatd udev wayland ] ++ lib.optional useSystemd systemd; # Only default feature is systemd buildNoDefaultFeatures = !useSystemd; # Force linking to libEGL, which is always dlopen()ed, and to # libwayland-client, which is always dlopen()ed except by the # obscure winit backend. RUSTFLAGS = map (a: "-C link-arg=${a}") [ "-Wl,--push-state,--no-as-needed" "-lEGL" "-lwayland-client" "-Wl,--pop-state" ]; makeFlags = [ "prefix=${placeholder "out"}" "CARGO_TARGET_DIR=target/${stdenv.hostPlatform.rust.cargoShortTarget}" Loading @@ -72,23 +56,8 @@ rustPlatform.buildRustPackage (finalAttrs: { dontCargoInstall = true; # These libraries are only used by the X11 backend, which will not # be the common case, so just make them available, don't link them. postInstall = '' wrapProgramArgs=(--prefix LD_LIBRARY_PATH : ${ lib.makeLibraryPath [ xorg.libX11 xorg.libXcursor xorg.libXi ] }) '' + lib.optionalString useXWayland '' wrapProgramArgs+=(--prefix PATH : ${lib.makeBinPath [ xwayland ]}) '' + '' wrapProgram $out/bin/cosmic-comp "''${wrapProgramArgs[@]}" preFixup = lib.optionalString useXWayland '' libcosmicAppWrapperArgs+=(--prefix PATH : ${lib.makeBinPath [ xwayland ]}) ''; meta = { Loading Loading
pkgs/by-name/co/cosmic-comp/package.nix +10 −41 Original line number Diff line number Diff line Loading @@ -3,20 +3,17 @@ stdenv, rustPlatform, fetchFromGitHub, makeBinaryWrapper, pixman, libcosmicAppHook, pkg-config, libinput, libglvnd, libxkbcommon, libgbm, libinput, pixman, seatd, udev, xwayland, wayland, xorg, useXWayland ? true, systemd, useXWayland ? true, useSystemd ? lib.meta.availableOn stdenv.hostPlatform systemd, }: Loading @@ -37,34 +34,21 @@ rustPlatform.buildRustPackage (finalAttrs: { separateDebugInfo = true; nativeBuildInputs = [ makeBinaryWrapper libcosmicAppHook pkg-config ]; buildInputs = [ libglvnd libinput libxkbcommon libgbm libinput pixman seatd udev wayland ] ++ lib.optional useSystemd systemd; # Only default feature is systemd buildNoDefaultFeatures = !useSystemd; # Force linking to libEGL, which is always dlopen()ed, and to # libwayland-client, which is always dlopen()ed except by the # obscure winit backend. RUSTFLAGS = map (a: "-C link-arg=${a}") [ "-Wl,--push-state,--no-as-needed" "-lEGL" "-lwayland-client" "-Wl,--pop-state" ]; makeFlags = [ "prefix=${placeholder "out"}" "CARGO_TARGET_DIR=target/${stdenv.hostPlatform.rust.cargoShortTarget}" Loading @@ -72,23 +56,8 @@ rustPlatform.buildRustPackage (finalAttrs: { dontCargoInstall = true; # These libraries are only used by the X11 backend, which will not # be the common case, so just make them available, don't link them. postInstall = '' wrapProgramArgs=(--prefix LD_LIBRARY_PATH : ${ lib.makeLibraryPath [ xorg.libX11 xorg.libXcursor xorg.libXi ] }) '' + lib.optionalString useXWayland '' wrapProgramArgs+=(--prefix PATH : ${lib.makeBinPath [ xwayland ]}) '' + '' wrapProgram $out/bin/cosmic-comp "''${wrapProgramArgs[@]}" preFixup = lib.optionalString useXWayland '' libcosmicAppWrapperArgs+=(--prefix PATH : ${lib.makeBinPath [ xwayland ]}) ''; meta = { Loading