summary refs log tree commit diff
path: root/pkgs/applications/window-managers/cosmic/settings/default.nix
diff options
context:
space:
mode:
Diffstat (limited to 'pkgs/applications/window-managers/cosmic/settings/default.nix')
-rw-r--r--pkgs/applications/window-managers/cosmic/settings/default.nix14
1 files changed, 10 insertions, 4 deletions
diff --git a/pkgs/applications/window-managers/cosmic/settings/default.nix b/pkgs/applications/window-managers/cosmic/settings/default.nix
index 6767f963846..dcb454b3f82 100644
--- a/pkgs/applications/window-managers/cosmic/settings/default.nix
+++ b/pkgs/applications/window-managers/cosmic/settings/default.nix
@@ -3,8 +3,9 @@
 , fetchFromGitHub
 , rust
 , rustPlatform
-, cargo
 , cmake
+, makeWrapper
+, cosmic-icons
 , just
 , pkg-config
 , libxkbcommon
@@ -19,13 +20,13 @@
 , util-linuxMinimal
 }:
 
-rustPlatform.buildRustPackage {
+rustPlatform.buildRustPackage rec {
   pname = "cosmic-settings";
   version = "unstable-2023-10-26";
 
   src = fetchFromGitHub {
     owner = "pop-os";
-    repo = "cosmic-settings";
+    repo = pname;
     rev = "d15ebbd340dee7adf184831311b5da73faaa80f5";
     hash = "sha256-OlQ2jjT/ygO+hpl5Cc3h8Yp/SVo+pmI/EH7pqvY9GXI=";
   };
@@ -50,7 +51,7 @@ rustPlatform.buildRustPackage {
     substituteInPlace justfile --replace '#!/usr/bin/env' "#!$(command -v env)"
   '';
 
-  nativeBuildInputs = [ cmake just pkg-config which lld util-linuxMinimal ];
+  nativeBuildInputs = [ cmake just pkg-config which lld util-linuxMinimal makeWrapper ];
   buildInputs = [ libxkbcommon libinput fontconfig freetype wayland expat udev ];
 
   dontUseJustBuild = true;
@@ -64,6 +65,11 @@ rustPlatform.buildRustPackage {
     "target/${rust.lib.toRustTargetSpecShort stdenv.hostPlatform}/release/cosmic-settings"
   ];
 
+  postInstall = ''
+    wrapProgram "$out/bin/cosmic-settings" \
+      --suffix XDG_DATA_DIRS : "${cosmic-icons}/share"
+  '';
+
   meta = with lib; {
     homepage = "https://github.com/pop-os/cosmic-settings";
     description = "Settings for the COSMIC Desktop Environment";