cosmic-session: install the cosmic dconf profile file (#392654)

authored by Gaétan Lepage and committed by GitHub e0c31b27 4dd1b8b7

+16 -2
+16 -2
pkgs/by-name/co/cosmic-session/package.nix
··· 24 24 cargoHash = "sha256-iYObxjWJUKgZKGTkqtYgQK4758k0EYZGhIAM/oLxxso="; 25 25 26 26 postPatch = '' 27 - substituteInPlace Justfile \ 28 - --replace-fail '{{cargo-target-dir}}/release/cosmic-session' 'target/${stdenv.hostPlatform.rust.cargoShortTarget}/release/cosmic-session' 29 27 substituteInPlace data/start-cosmic \ 30 28 --replace-fail '/usr/bin/cosmic-session' "${placeholder "out"}/bin/cosmic-session" \ 31 29 --replace-fail '/usr/bin/dbus-run-session' "${lib.getBin dbus}/bin/dbus-run-session" ··· 45 43 "--set" 46 44 "cosmic_dconf_profile" 47 45 "cosmic" 46 + "--set" 47 + "cargo-target-dir" 48 + "target/${stdenv.hostPlatform.rust.cargoShortTarget}" 48 49 ]; 49 50 50 51 env.XDP_COSMIC = "${xdg-desktop-portal-cosmic}/libexec/xdg-desktop-portal-cosmic"; 51 52 53 + postInstall = '' 54 + dconf_profile_dst=$out/etc/dconf/profile/cosmic 55 + if [ ! -f $dconf_profile_dst ]; then 56 + install -Dm0644 data/dconf/profile/cosmic $dconf_profile_dst 57 + else 58 + # future proofing 59 + echo 'The Justfile is now correctly installing the dconf profile.' 60 + echo 'Please remove the dconf profile from the `postInstall` phase.' 61 + exit 1 62 + fi 63 + ''; 64 + 52 65 passthru.providedSessions = [ "cosmic" ]; 53 66 54 67 meta = { ··· 60 73 a-kenji 61 74 nyabinary 62 75 thefossguy 76 + HeitorAugustoLN 63 77 ]; 64 78 platforms = lib.platforms.linux; 65 79 };