forked from mirrors/nixpkgs
deepin: redefine updateScript to use genericUpdater
This commit is contained in:
parent
6783884389
commit
593c6247ab
|
@ -31,7 +31,7 @@ stdenv.mkDerivation rec {
|
|||
sed -i -e 's:/share/gocode:/share/go:' Makefile
|
||||
'';
|
||||
|
||||
passthru.updateScript = deepin.updateScript { name = "${pname}-${version}"; };
|
||||
passthru.updateScript = deepin.updateScript { inherit pname version src; };
|
||||
|
||||
meta = with stdenv.lib; {
|
||||
description = "Generates static DBus bindings for Golang and QML at build-time";
|
||||
|
|
|
@ -119,7 +119,7 @@ buildGoPackage rec {
|
|||
searchHardCodedPaths $out # debugging
|
||||
'';
|
||||
|
||||
passthru.updateScript = deepin.updateScript { name = "${pname}-${version}"; };
|
||||
passthru.updateScript = deepin.updateScript { inherit pname version src; };
|
||||
|
||||
meta = with stdenv.lib; {
|
||||
description = "Go-lang bindings for dde-daemon";
|
||||
|
|
|
@ -45,7 +45,7 @@ mkDerivation rec {
|
|||
-e "s,/usr/bin/deepin-desktop-ts-convert,deepin-desktop-ts-convert,"
|
||||
'';
|
||||
|
||||
passthru.updateScript = deepin.updateScript { name = "${pname}-${version}"; };
|
||||
passthru.updateScript = deepin.updateScript { inherit pname version src; };
|
||||
|
||||
meta = with stdenv.lib; {
|
||||
description = "Calendar for Deepin Desktop Environment";
|
||||
|
|
|
@ -138,7 +138,7 @@ mkDerivation rec {
|
|||
searchHardCodedPaths $out
|
||||
'';
|
||||
|
||||
passthru.updateScript = deepin.updateScript { name = "${pname}-${version}"; };
|
||||
passthru.updateScript = deepin.updateScript { inherit pname version src; };
|
||||
|
||||
meta = with stdenv.lib; {
|
||||
description = "Control panel of Deepin Desktop Environment";
|
||||
|
|
|
@ -151,7 +151,7 @@ buildGoPackage rec {
|
|||
searchHardCodedPaths $out # debugging
|
||||
'';
|
||||
|
||||
passthru.updateScript = deepin.updateScript { name = "${pname}-${version}"; };
|
||||
passthru.updateScript = deepin.updateScript { inherit pname version src; };
|
||||
|
||||
meta = with stdenv.lib; {
|
||||
description = "Daemon for handling Deepin Desktop Environment session settings";
|
||||
|
|
|
@ -96,7 +96,7 @@ let
|
|||
searchHardCodedPaths $out
|
||||
'';
|
||||
|
||||
passthru.updateScript = deepin.updateScript { name = "${pname}-${version}"; };
|
||||
passthru.updateScript = deepin.updateScript { inherit pname version src; };
|
||||
|
||||
meta = with stdenv.lib; {
|
||||
description = "Dock for Deepin Desktop Environment";
|
||||
|
|
|
@ -286,7 +286,7 @@ mkDerivation rec {
|
|||
searchHardCodedPaths $out
|
||||
'';
|
||||
|
||||
passthru.updateScript = deepin.updateScript { name = "${pname}-${version}"; };
|
||||
passthru.updateScript = deepin.updateScript { inherit pname version src; };
|
||||
|
||||
meta = with stdenv.lib; {
|
||||
description = "File manager and desktop module for Deepin Desktop Environment";
|
||||
|
|
|
@ -130,7 +130,7 @@ mkDerivation rec {
|
|||
|
||||
enableParallelBuilding = true;
|
||||
|
||||
passthru.updateScript = deepin.updateScript { name = "${pname}-${version}"; };
|
||||
passthru.updateScript = deepin.updateScript { inherit pname version src; };
|
||||
|
||||
meta = with stdenv.lib; {
|
||||
description = "KWin configuration for Deepin Desktop Environment";
|
||||
|
|
|
@ -89,7 +89,7 @@ mkDerivation rec {
|
|||
searchHardCodedPaths $out
|
||||
'';
|
||||
|
||||
passthru.updateScript = deepin.updateScript { name = "${pname}-${version}"; };
|
||||
passthru.updateScript = deepin.updateScript { inherit pname version src; };
|
||||
|
||||
meta = with stdenv.lib; {
|
||||
description = "Deepin Desktop Environment launcher module";
|
||||
|
|
|
@ -51,7 +51,7 @@ mkDerivation rec {
|
|||
searchHardCodedPaths $out # for debugging
|
||||
'';
|
||||
|
||||
passthru.updateScript = deepin.updateScript { name = "${pname}-${version}"; };
|
||||
passthru.updateScript = deepin.updateScript { inherit pname version src; };
|
||||
|
||||
meta = with stdenv.lib; {
|
||||
description = "Deepin network utils";
|
||||
|
|
|
@ -48,7 +48,7 @@ mkDerivation rec {
|
|||
searchHardCodedPaths $out
|
||||
'';
|
||||
|
||||
passthru.updateScript = deepin.updateScript { name = "${pname}-${version}"; };
|
||||
passthru.updateScript = deepin.updateScript { inherit pname version src; };
|
||||
|
||||
meta = with stdenv.lib; {
|
||||
description = "PolicyKit agent for Deepin Desktop Environment";
|
||||
|
|
|
@ -31,7 +31,7 @@ stdenv.mkDerivation rec {
|
|||
|
||||
enableParallelBuilding = true;
|
||||
|
||||
passthru.updateScript = deepin.updateScript { name = "${pname}-${version}"; };
|
||||
passthru.updateScript = deepin.updateScript { inherit pname version src; };
|
||||
|
||||
meta = with stdenv.lib; {
|
||||
description = "Qt DBus interface library for Deepin software";
|
||||
|
|
|
@ -145,7 +145,7 @@ mkDerivation rec {
|
|||
searchHardCodedPaths $out # debugging
|
||||
'';
|
||||
|
||||
passthru.updateScript = deepin.updateScript { name = "${pname}-${version}"; };
|
||||
passthru.updateScript = deepin.updateScript { inherit pname version src; };
|
||||
|
||||
meta = with stdenv.lib; {
|
||||
description = "Deepin desktop-environment - Session UI module";
|
||||
|
|
|
@ -70,7 +70,7 @@ mkDerivation rec {
|
|||
searchHardCodedPaths $modsrc # for debugging
|
||||
'';
|
||||
|
||||
passthru.updateScript = deepin.updateScript { name = "${pname}-${version}"; };
|
||||
passthru.updateScript = deepin.updateScript { inherit pname version src; };
|
||||
|
||||
meta = with stdenv.lib; {
|
||||
description = "Deepin file search tool";
|
||||
|
|
|
@ -45,7 +45,7 @@ mkDerivation rec {
|
|||
searchHardCodedPaths $out # debugging
|
||||
'';
|
||||
|
||||
passthru.updateScript = deepin.updateScript { name = "${pname}-${version}"; };
|
||||
passthru.updateScript = deepin.updateScript { inherit pname version src; };
|
||||
|
||||
meta = with stdenv.lib; {
|
||||
description = "Easy to use calculator for Deepin Desktop Environment";
|
||||
|
|
|
@ -48,7 +48,7 @@ stdenv.mkDerivation rec {
|
|||
ln -s ../lib/deepin/desktop-version $out/etc/deepin-version
|
||||
'';
|
||||
|
||||
passthru.updateScript = deepin.updateScript { name = "${pname}-${version}"; };
|
||||
passthru.updateScript = deepin.updateScript { inherit pname version src; };
|
||||
|
||||
meta = with stdenv.lib; {
|
||||
description = "Base assets and definitions for Deepin Desktop Environment";
|
||||
|
|
|
@ -67,7 +67,7 @@ stdenv.mkDerivation rec {
|
|||
searchHardCodedPaths $out
|
||||
'';
|
||||
|
||||
passthru.updateScript = deepin.updateScript { name = "${pname}-${version}"; };
|
||||
passthru.updateScript = deepin.updateScript { inherit pname version src; };
|
||||
|
||||
meta = with stdenv.lib; {
|
||||
description = "GSettings deepin desktop-wide schemas";
|
||||
|
|
|
@ -13,7 +13,6 @@
|
|||
}:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
name = "${pname}-${version}";
|
||||
pname = "deepin-editor";
|
||||
version = "1.2.9.1";
|
||||
|
||||
|
@ -61,7 +60,7 @@ stdenv.mkDerivation rec {
|
|||
searchHardCodedPaths $out # debugging
|
||||
'';
|
||||
|
||||
passthru.updateScript = deepin.updateScript { inherit name; };
|
||||
passthru.updateScript = deepin.updateScript { inherit pname version src; };
|
||||
|
||||
meta = with stdenv.lib; {
|
||||
description = "Simple editor for Deepin Desktop Environment";
|
||||
|
|
|
@ -43,7 +43,7 @@ stdenv.mkDerivation rec {
|
|||
wrapProgram $out/bin/deepin-desktop-ts-convert --set PERL5LIB $PERL5LIB
|
||||
'';
|
||||
|
||||
passthru.updateScript = deepin.updateScript { name = "${pname}-${version}"; };
|
||||
passthru.updateScript = deepin.updateScript { inherit pname version src; };
|
||||
|
||||
meta = with stdenv.lib; {
|
||||
description = "Deepin Internationalization utilities";
|
||||
|
|
|
@ -23,7 +23,7 @@ stdenv.mkDerivation rec {
|
|||
"PREFIX=${placeholder "out"}"
|
||||
];
|
||||
|
||||
passthru.updateScript = deepin.updateScript { name = "${pname}-${version}"; };
|
||||
passthru.updateScript = deepin.updateScript { inherit pname version src; };
|
||||
|
||||
meta = with stdenv.lib; {
|
||||
description = "Deepin GTK Theme";
|
||||
|
|
|
@ -48,7 +48,7 @@ stdenv.mkDerivation rec {
|
|||
cp -a ./Sea ./usr/share/icons/hicolor "$out"/share/icons/
|
||||
'';
|
||||
|
||||
passthru.updateScript = deepin.updateScript { name = "${pname}-${version}"; };
|
||||
passthru.updateScript = deepin.updateScript { inherit pname version src; };
|
||||
|
||||
meta = with stdenv.lib; {
|
||||
description = "Icons for the Deepin Desktop Environment";
|
||||
|
|
|
@ -53,7 +53,7 @@ mkDerivation rec {
|
|||
-e "s,\$\$\[QT_INSTALL_PLUGINS\],$out/$qtPluginPrefix,"
|
||||
'';
|
||||
|
||||
passthru.updateScript = deepin.updateScript { name = "${pname}-${version}"; };
|
||||
passthru.updateScript = deepin.updateScript { inherit pname version src; };
|
||||
|
||||
meta = with stdenv.lib; {
|
||||
description = "Image Viewer for Deepin Desktop Environment";
|
||||
|
|
|
@ -42,7 +42,7 @@ mkDerivation rec {
|
|||
|
||||
enableParallelBuilding = true;
|
||||
|
||||
passthru.updateScript = deepin.updateScript { name = "${pname}-${version}"; };
|
||||
passthru.updateScript = deepin.updateScript { inherit pname version src; };
|
||||
|
||||
meta = with stdenv.lib; {
|
||||
description = "Deepin menu service";
|
||||
|
|
|
@ -73,7 +73,7 @@ mkDerivation rec {
|
|||
--replace "Exec=deepin-movie" "Exec=$out/bin/deepin-movie"
|
||||
'';
|
||||
|
||||
passthru.updateScript = deepin.updateScript { name = "${pname}-${version}"; };
|
||||
passthru.updateScript = deepin.updateScript { inherit pname version src; };
|
||||
|
||||
meta = with stdenv.lib; {
|
||||
description = "Deepin movie player";
|
||||
|
|
|
@ -61,7 +61,7 @@ mkDerivation rec {
|
|||
searchHardCodedPaths $out
|
||||
'';
|
||||
|
||||
passthru.updateScript = deepin.updateScript { name = "${pname}-${version}"; };
|
||||
passthru.updateScript = deepin.updateScript { inherit pname version src; };
|
||||
|
||||
meta = with stdenv.lib; {
|
||||
description = "Easy-to-use screenshot tool for Deepin Desktop Environment";
|
||||
|
|
|
@ -33,7 +33,7 @@ mkDerivation rec {
|
|||
|
||||
enableParallelBuilding = true;
|
||||
|
||||
passthru.updateScript = deepin.updateScript { name = "${pname}-${version}"; };
|
||||
passthru.updateScript = deepin.updateScript { inherit pname version src; };
|
||||
|
||||
meta = with stdenv.lib; {
|
||||
description = "Pop-up shortcut viewer for Deepin applications";
|
||||
|
|
|
@ -18,7 +18,7 @@ stdenv.mkDerivation rec {
|
|||
"PREFIX=${placeholder "out"}"
|
||||
];
|
||||
|
||||
passthru.updateScript = deepin.updateScript { name = "${pname}-${version}"; };
|
||||
passthru.updateScript = deepin.updateScript { inherit pname version src; };
|
||||
|
||||
meta = with stdenv.lib; {
|
||||
description = "Deepin sound theme";
|
||||
|
|
|
@ -100,7 +100,7 @@ stdenv.mkDerivation rec {
|
|||
"-DVERSION=${version}"
|
||||
];
|
||||
|
||||
passthru.updateScript = deepin.updateScript { name = "${pname}-${version}"; };
|
||||
passthru.updateScript = deepin.updateScript { inherit pname version src; };
|
||||
|
||||
meta = with stdenv.lib; {
|
||||
description = "Default terminal emulator for Deepin";
|
||||
|
|
|
@ -38,7 +38,7 @@ mkDerivation rec {
|
|||
searchHardCodedPaths $out # for debugging
|
||||
'';
|
||||
|
||||
passthru.updateScript = deepin.updateScript { name = "${pname}-${version}"; };
|
||||
passthru.updateScript = deepin.updateScript { inherit pname version src; };
|
||||
|
||||
meta = with stdenv.lib; {
|
||||
description = "A daemon that helps to launch applications faster";
|
||||
|
|
|
@ -40,7 +40,7 @@ stdenv.mkDerivation rec {
|
|||
$out/var/cache/image-blur/$(echo -n $out/share/backgrounds/deepin/desktop.jpg | md5sum | cut -d " " -f 1).jpg
|
||||
'';
|
||||
|
||||
passthru.updateScript = deepin.updateScript { name = "${pname}-${version}"; };
|
||||
passthru.updateScript = deepin.updateScript { inherit pname version src; };
|
||||
|
||||
meta = with stdenv.lib; {
|
||||
description = "Wallpapers for Deepin Desktop Environment";
|
||||
|
|
|
@ -3,7 +3,14 @@ let
|
|||
packages = self: with self; {
|
||||
setupHook = ./setup-hook.sh;
|
||||
|
||||
updateScript = callPackage ./update.nix { };
|
||||
# Update script tailored to deepin packages from git repository
|
||||
updateScript = { pname, version, src }:
|
||||
pkgs.genericUpdater {
|
||||
inherit pname version;
|
||||
attrPath = "deepin.${pname}";
|
||||
versionLister = "${pkgs.common-updater-scripts}/bin/list-git-tags ${src.meta.homepage}";
|
||||
ignoredVersions = "^2014(\\.|rc)|^v[0-9]+";
|
||||
};
|
||||
|
||||
dbus-factory = callPackage ./dbus-factory { };
|
||||
dde-api = callPackage ./dde-api { };
|
||||
|
|
|
@ -37,7 +37,7 @@ mkDerivation rec {
|
|||
libdisomaster/libdisomaster.pro
|
||||
'';
|
||||
|
||||
passthru.updateScript = deepin.updateScript { name = "${pname}-${version}"; };
|
||||
passthru.updateScript = deepin.updateScript { inherit pname version src; };
|
||||
|
||||
meta = with stdenv.lib; {
|
||||
description = "A libisoburn wrapper for Qt";
|
||||
|
|
|
@ -37,7 +37,7 @@ stdenv.mkDerivation rec {
|
|||
fixPath $out /usr dpa-ext-gnomekeyring.pro gnomekeyringextention.cpp
|
||||
'';
|
||||
|
||||
passthru.updateScript = deepin.updateScript { name = "${pname}-${version}"; };
|
||||
passthru.updateScript = deepin.updateScript { inherit pname version src; };
|
||||
|
||||
meta = with stdenv.lib; {
|
||||
description = "GNOME keyring extension for dde-polkit-agent";
|
||||
|
|
|
@ -51,7 +51,7 @@ mkDerivation rec {
|
|||
|
||||
enableParallelBuilding = true;
|
||||
|
||||
passthru.updateScript = deepin.updateScript { name = "${pname}-${version}"; };
|
||||
passthru.updateScript = deepin.updateScript { inherit pname version src; };
|
||||
|
||||
meta = with stdenv.lib; {
|
||||
description = "Deepin tool kit core library";
|
||||
|
|
|
@ -53,7 +53,7 @@ mkDerivation rec {
|
|||
|
||||
enableParallelBuilding = true;
|
||||
|
||||
passthru.updateScript = deepin.updateScript { name = "${pname}-${version}"; };
|
||||
passthru.updateScript = deepin.updateScript { inherit pname version src; };
|
||||
|
||||
meta = with stdenv.lib; {
|
||||
description = "Deepin graphical user interface library";
|
||||
|
|
|
@ -46,7 +46,7 @@ mkDerivation rec {
|
|||
"LIB_INSTALL_DIR=${outRef}/lib"
|
||||
];
|
||||
|
||||
passthru.updateScript = deepin.updateScript { name = "${pname}-${version}"; };
|
||||
passthru.updateScript = deepin.updateScript { inherit pname version src; };
|
||||
|
||||
meta = with stdenv.lib; {
|
||||
description = "Deepin graphical user interface library";
|
||||
|
|
|
@ -22,7 +22,7 @@ stdenv.mkDerivation rec {
|
|||
sed -i -e 's:/share/gocode:/share/go:' Makefile
|
||||
'';
|
||||
|
||||
passthru.updateScript = deepin.updateScript { name = "${pname}-${version}"; };
|
||||
passthru.updateScript = deepin.updateScript { inherit pname version src; };
|
||||
|
||||
meta = with stdenv.lib; {
|
||||
description = "GoLang DBus factory for the Deepin Desktop Environment";
|
||||
|
|
|
@ -26,7 +26,7 @@ stdenv.mkDerivation rec {
|
|||
"GOCACHE=$(TMPDIR)/go-cache"
|
||||
];
|
||||
|
||||
passthru.updateScript = deepin.updateScript { name = "${pname}-${version}"; };
|
||||
passthru.updateScript = deepin.updateScript { inherit pname version src; };
|
||||
|
||||
meta = with stdenv.lib; {
|
||||
description = "Convert dbus interfaces to go-lang or qml wrapper code";
|
||||
|
|
|
@ -47,7 +47,7 @@ stdenv.mkDerivation rec {
|
|||
"GOCACHE=$(TMPDIR)/go-cache"
|
||||
];
|
||||
|
||||
passthru.updateScript = deepin.updateScript { name = "${pname}-${version}"; };
|
||||
passthru.updateScript = deepin.updateScript { inherit pname version src; };
|
||||
|
||||
meta = with stdenv.lib; {
|
||||
description = "Generate static golang bindings for GObject";
|
||||
|
|
|
@ -34,7 +34,7 @@ stdenv.mkDerivation rec {
|
|||
rm -r $out/share/go/src/pkg.deepin.io/lib/debian
|
||||
'';
|
||||
|
||||
passthru.updateScript = deepin.updateScript { name = "${pname}-${version}"; };
|
||||
passthru.updateScript = deepin.updateScript { inherit pname version src; };
|
||||
|
||||
meta = with stdenv.lib; {
|
||||
description = "Go bindings for Deepin Desktop Environment development";
|
||||
|
|
|
@ -114,7 +114,7 @@ mkDerivation rec {
|
|||
searchHardCodedPaths $out
|
||||
'';
|
||||
|
||||
passthru.updateScript = deepin.updateScript { name = "${pname}-${version}"; };
|
||||
passthru.updateScript = deepin.updateScript { inherit pname version; src = (builtins.head srcs); };
|
||||
|
||||
meta = with stdenv.lib; {
|
||||
description = "Qt5 binding of Chromium Embedded Framework";
|
||||
|
|
|
@ -53,7 +53,7 @@ mkDerivation rec {
|
|||
|
||||
enableParallelBuilding = true;
|
||||
|
||||
passthru.updateScript = deepin.updateScript { name = "${pname}-${version}"; };
|
||||
passthru.updateScript = deepin.updateScript { inherit pname version; src = (builtins.head srcs); };
|
||||
|
||||
meta = with stdenv.lib; {
|
||||
description = "Qt platform theme integration plugin for DDE";
|
||||
|
|
|
@ -53,7 +53,7 @@ mkDerivation rec {
|
|||
|
||||
enableParallelBuilding = true;
|
||||
|
||||
passthru.updateScript = deepin.updateScript { name = "${pname}-${version}"; };
|
||||
passthru.updateScript = deepin.updateScript { inherit pname version src; };
|
||||
|
||||
meta = with stdenv.lib; {
|
||||
description = "Qt platform theme integration plugins for DDE";
|
||||
|
|
|
@ -37,7 +37,6 @@
|
|||
}:
|
||||
|
||||
buildGoPackage rec {
|
||||
name = "${pname}-${version}";
|
||||
pname = "startdde";
|
||||
version = "5.0.1";
|
||||
|
||||
|
@ -152,7 +151,7 @@ buildGoPackage rec {
|
|||
'';
|
||||
|
||||
passthru = {
|
||||
updateScript = deepin.updateScript { inherit name; };
|
||||
updateScript = deepin.updateScript { inherit pname version src; };
|
||||
providedSessions = [ "deepin" ];
|
||||
};
|
||||
|
||||
|
|
|
@ -34,7 +34,7 @@ mkDerivation rec {
|
|||
searchHardCodedPaths $out
|
||||
'';
|
||||
|
||||
passthru.updateScript = deepin.updateScript { name = "${pname}-${version}"; };
|
||||
passthru.updateScript = deepin.updateScript { inherit pname version src; };
|
||||
|
||||
meta = with stdenv.lib; {
|
||||
description = "UDisks2 D-Bus interfaces binding for Qt5";
|
||||
|
|
|
@ -1,38 +0,0 @@
|
|||
{ stdenv, lib, writeScript, coreutils, curl, gnugrep, gnused, jq, common-updater-scripts, nix }:
|
||||
{ name, ignored-versions ? "^2014(\\.|rc)|^v[0-9]+" }:
|
||||
|
||||
let
|
||||
nameAndVersion = builtins.parseDrvName name;
|
||||
packageVersion = nameAndVersion.version;
|
||||
packageName = nameAndVersion.name;
|
||||
attrPath = "deepin.${packageName}";
|
||||
in
|
||||
|
||||
writeScript "update-${packageName}" ''
|
||||
#!${stdenv.shell}
|
||||
set -o errexit
|
||||
set -x
|
||||
|
||||
# search for the latest version of the package on github
|
||||
PATH=${lib.makeBinPath [ common-updater-scripts coreutils curl gnugrep gnused jq ]}
|
||||
tags=$(curl -s https://api.github.com/repos/linuxdeepin/${packageName}/tags)
|
||||
tags=$(echo "$tags" | jq -r '.[] | .name')
|
||||
echo "# ${name}" >> git-commits.txt
|
||||
echo "# available tags:" >> git-commits.txt
|
||||
echo "$tags" | ${gnused}/bin/sed -e 's/^/# /' >> git-commits.txt
|
||||
if [ -n "${ignored-versions}" ]; then
|
||||
tags=$(echo "$tags" | grep -vE "${ignored-versions}")
|
||||
fi
|
||||
latest_tag=$(echo "$tags" | sort --version-sort | tail -1)
|
||||
|
||||
# generate commands to commit the changes
|
||||
if [ "${packageVersion}" != "$latest_tag" ]; then
|
||||
pfile=$(EDITOR=echo ${nix}/bin/nix edit -f. ${attrPath})
|
||||
echo " git add $pfile " >> git-commits.txt
|
||||
echo " git commit -m \"${attrPath}: ${packageVersion} -> $latest_tag\"" >> git-commits.txt
|
||||
fi
|
||||
|
||||
# update the nix expression
|
||||
update-source-version "${attrPath}" "$latest_tag"
|
||||
echo "" >> git-commits.txt
|
||||
''
|
Loading…
Reference in a new issue