Merge pull request #217458 from wineee/deepin-desktop-schemas

This commit is contained in:
Sandro 2023-02-27 00:38:56 +01:00 committed by GitHub
commit 582a3fdb1e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 58 additions and 0 deletions

View File

@ -54,6 +54,7 @@ let
go-dbus-factory = callPackage ./go-package/go-dbus-factory { };
dde-api = callPackage ./go-package/dde-api { inherit replaceAll; };
deepin-pw-check = callPackage ./go-package/deepin-pw-check { };
deepin-desktop-schemas = callPackage ./go-package/deepin-desktop-schemas { };
#### TOOLS
deepin-gettext-tools = callPackage ./tools/deepin-gettext-tools { };

View File

@ -0,0 +1,57 @@
{ stdenv
, lib
, fetchFromGitHub
, buildGoPackage
, go-lib
, glib
}:
buildGoPackage rec {
pname = "deepin-desktop-schemas";
version = "5.10.11";
goPackagePath = "github.com/linuxdeepin/deepin-desktop-schemas";
src = fetchFromGitHub {
owner = "linuxdeepin";
repo = pname;
rev = version;
sha256 = "sha256-MboNj0zC3azavDUsmeNNafCcUa0GeoySl610+WOtNww=";
};
nativeBuildInputs = [ glib ];
buildInputs = [ go-lib ];
postPatch = ''
# Relocate files path for backgrounds and wallpapers
for file in $(grep -rl "/usr/share")
do
substituteInPlace $file \
--replace "/usr/share" "/run/current-system/sw/share"
done
'';
buildPhase = ''
runHook preBuild
GOPATH="$GOPATH:${go-lib}/share/gocode"
make ARCH=${stdenv.targetPlatform.linuxArch} -C go/src/${goPackagePath}
runHook postBuild
'';
installPhase = ''
runHook preInstall
make install DESTDIR="$out" PREFIX="/" -C go/src/${goPackagePath}
runHook postInstall
'';
preFixup = ''
glib-compile-schemas ${glib.makeSchemaPath "$out" "${pname}-${version}"}
'';
meta = with lib; {
description = "GSettings deepin desktop-wide schemas";
homepage = "https://github.com/linuxdeepin/deepin-desktop-schemas";
license = licenses.gpl3Plus;
platforms = platforms.linux;
maintainers = teams.deepin.members;
};
}