Merge pull request #280549 from wineee/deepin-icon

deepin: move distribution.info back to deepin-desktop-base
This commit is contained in:
Weijia Wang 2024-01-30 14:50:13 +01:00 committed by GitHub
commit 5116ea824d
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 12 additions and 14 deletions

View file

@ -96,18 +96,10 @@ in
"/share/dde-daemon"
"/share/dsg"
"/share/deepin-themes"
"/share/deepin"
];
environment.etc = {
"distribution.info".text = ''
[Distribution]
Name=NixOS
WebsiteName=www.nixos.org
Website=https://www.nixos.org
Logo=${pkgs.nixos-icons}/share/icons/hicolor/96x96/apps/nix-snowflake.png
LogoLight=${pkgs.nixos-icons}/share/icons/hicolor/32x32/apps/nix-snowflake.png
LogoTransparent=${pkgs.deepin.deepin-desktop-base}/share/pixmaps/distribution_logo_transparent.svg
'';
"deepin-installer.conf".text = ''
system_info_vendor_name="Copyright (c) 2003-2023 NixOS contributors"
'';
@ -156,6 +148,7 @@ in
deepin-sound-theme
deepin-gtk-theme
deepin-wallpapers
deepin-desktop-base
startdde
dde-dock

View file

@ -32,11 +32,6 @@ stdenv.mkDerivation rec {
./fix-pri-path.patch
];
postPatch = ''
substituteInPlace src/dsysinfo.cpp \
--replace "/usr/share/deepin/distribution.info" "/etc/distribution.info" \
'';
nativeBuildInputs = [
cmake
pkg-config

View file

@ -1,6 +1,7 @@
{ stdenvNoCC
, lib
, fetchFromGitHub
, nixos-icons
}:
stdenvNoCC.mkDerivation rec {
pname = "deepin-desktop-base";
@ -24,6 +25,15 @@ stdenvNoCC.mkDerivation rec {
mv $out/usr/* $out/
rm -r $out/usr
install -D ${./distribution_logo_transparent.svg} $out/share/pixmaps/distribution_logo_transparent.svg
cat > $out/share/deepin/distribution.info <<EOF
[Distribution]
Name=NixOS
WebsiteName=www.nixos.org
Website=https://www.nixos.org
Logo=${nixos-icons}/share/icons/hicolor/96x96/apps/nix-snowflake.png
LogoLight=${nixos-icons}/share/icons/hicolor/32x32/apps/nix-snowflake.png
LogoTransparent=$out/share/pixmaps/distribution_logo_transparent.svg
EOF
'';
meta = with lib; {