deepin-desktop-schemas: init at 5.10.11

This commit is contained in:
rewine 2023-01-12 15:50:55 +08:00 committed by rewine
parent e0b99fe0fe
commit 4cf00ef65c
No known key found for this signature in database
GPG key ID: AABB329787290824
2 changed files with 58 additions and 0 deletions

View file

@ -51,6 +51,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;
};
}