From 01a3f1a169c45dbf9c2bb67c08e5fa329827e6a7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jos=C3=A9=20Romildo?= Date: Mon, 30 Oct 2023 15:50:48 -0300 Subject: [PATCH 1/3] graphite-kde-theme: 2022-02-08 -> unstable-2023-10-25 --- .../themes/graphite-kde-theme/default.nix | 21 ++++++++++++------- 1 file changed, 13 insertions(+), 8 deletions(-) diff --git a/pkgs/data/themes/graphite-kde-theme/default.nix b/pkgs/data/themes/graphite-kde-theme/default.nix index dd3a215a0385..4ffcc318357f 100644 --- a/pkgs/data/themes/graphite-kde-theme/default.nix +++ b/pkgs/data/themes/graphite-kde-theme/default.nix @@ -5,28 +5,33 @@ stdenv.mkDerivation rec { pname = "graphite-kde-theme"; - version = "2022-02-08"; + version = "unstable-2023-10-25"; src = fetchFromGitHub { owner = "vinceliuice"; repo = pname; - rev = version; - sha256 = "0pnn5s1vfdgkpsy5sc838731ly1imi8pbyd4asibw4zi238l0nvf"; + rev = "33cc85c49c424dfcba73e6ee84b0dc7fb9e52566"; + hash = "sha256-iQGT2x0wY2EIuYw/a1MB8rT9BxiqWrOyBo6EGIJwsFw="; }; - installPhase = '' - runHook preInstall - + postPatch = '' patchShebangs install.sh substituteInPlace install.sh \ --replace '$HOME/.local' $out \ --replace '$HOME/.config' $out/share - name= ./install.sh --dest $out/share/themes + substituteInPlace sddm/*/Main.qml \ + --replace /usr $out + ''; + + installPhase = '' + runHook preInstall + + name= ./install.sh mkdir -p $out/share/sddm/themes - cp -a sddm/Graphite $out/share/sddm/themes/ + cp -a sddm/Graphite* $out/share/sddm/themes/ runHook postInstall ''; From 8fd860844114f7c380a25cdc7ef4500d62906d83 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jos=C3=A9=20Romildo?= Date: Mon, 30 Oct 2023 15:58:22 -0300 Subject: [PATCH 2/3] graphite-kde-theme: propagate sddm theme dependencies to user env --- pkgs/data/themes/graphite-kde-theme/default.nix | 11 +++++++++++ pkgs/top-level/all-packages.nix | 4 +++- 2 files changed, 14 insertions(+), 1 deletion(-) diff --git a/pkgs/data/themes/graphite-kde-theme/default.nix b/pkgs/data/themes/graphite-kde-theme/default.nix index 4ffcc318357f..a50c5908491e 100644 --- a/pkgs/data/themes/graphite-kde-theme/default.nix +++ b/pkgs/data/themes/graphite-kde-theme/default.nix @@ -1,6 +1,9 @@ { stdenv , lib , fetchFromGitHub +, kdeclarative +, plasma-framework +, plasma-workspace }: stdenv.mkDerivation rec { @@ -14,6 +17,14 @@ stdenv.mkDerivation rec { hash = "sha256-iQGT2x0wY2EIuYw/a1MB8rT9BxiqWrOyBo6EGIJwsFw="; }; + # Propagate sddm theme dependencies to user env otherwise sddm does + # not find them. Putting them in buildInputs is not enough. + propagatedUserEnvPkgs = [ + kdeclarative.bin + plasma-framework + plasma-workspace + ]; + postPatch = '' patchShebangs install.sh diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 546e6a6e66d8..3cee478d2772 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -29374,7 +29374,9 @@ with pkgs; graphite-gtk-theme = callPackage ../data/themes/graphite-gtk-theme { }; - graphite-kde-theme = callPackage ../data/themes/graphite-kde-theme { }; + graphite-kde-theme = callPackage ../data/themes/graphite-kde-theme { + inherit (libsForQt5) kdeclarative plasma-framework plasma-workspace; + }; greybird = callPackage ../data/themes/greybird { }; From 6375c59c02bc492874d42ca016c1ad0c7ea537bf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jos=C3=A9=20Romildo?= Date: Mon, 30 Oct 2023 15:58:53 -0300 Subject: [PATCH 3/3] graphite-kde-theme: add update script --- pkgs/data/themes/graphite-kde-theme/default.nix | 3 +++ 1 file changed, 3 insertions(+) diff --git a/pkgs/data/themes/graphite-kde-theme/default.nix b/pkgs/data/themes/graphite-kde-theme/default.nix index a50c5908491e..d098cf6aab45 100644 --- a/pkgs/data/themes/graphite-kde-theme/default.nix +++ b/pkgs/data/themes/graphite-kde-theme/default.nix @@ -4,6 +4,7 @@ , kdeclarative , plasma-framework , plasma-workspace +, gitUpdater }: stdenv.mkDerivation rec { @@ -47,6 +48,8 @@ stdenv.mkDerivation rec { runHook postInstall ''; + passthru.updateScript = gitUpdater { }; + meta = with lib; { description = "A flat Design theme for KDE Plasma desktop"; homepage = "https://github.com/vinceliuice/Graphite-kde-theme";