Merge pull request #96269 from deviant/remove-quilt-series

treewide: convert patch series files to Nix expressions
This commit is contained in:
Silvan Mosberger 2020-09-03 23:19:26 +02:00 committed by GitHub
commit 8272eff97a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
35 changed files with 75 additions and 65 deletions

View File

@ -689,14 +689,15 @@ rec {
"/prefix/nix-profiles-library-paths.patch"
"/prefix/compose-search-path.patch" ]
*/
readPathsFromFile = rootPath: file:
let
lines = lib.splitString "\n" (builtins.readFile file);
removeComments = lib.filter (line: line != "" && !(lib.hasPrefix "#" line));
relativePaths = removeComments lines;
absolutePaths = builtins.map (path: rootPath + "/${path}") relativePaths;
in
absolutePaths;
readPathsFromFile = lib.warn "lib.readPathsFromFile is deprecated, use a list instead"
(rootPath: file:
let
lines = lib.splitString "\n" (builtins.readFile file);
removeComments = lib.filter (line: line != "" && !(lib.hasPrefix "#" line));
relativePaths = removeComments lines;
absolutePaths = builtins.map (path: rootPath + "/${path}") relativePaths;
in
absolutePaths);
/* Read the contents of a file removing the trailing \n

View File

@ -1,5 +1,5 @@
{
mkDerivation, copyPathsToStore, lib, kdepimTeam,
mkDerivation, lib, kdepimTeam,
extra-cmake-modules, shared-mime-info,
boost, kcompletion, kconfigwidgets, kcrash, kdbusaddons, kdesignerplugin,
ki18n, kiconthemes, kio, kitemmodels, kwindowsystem, mysql, qttools,

View File

@ -1,5 +1,5 @@
{
mkDerivation, copyPathsToStore, lib, kdepimTeam,
mkDerivation, lib, kdepimTeam,
extra-cmake-modules, kdoctools,
grantlee, ki18n, kiconthemes, knewstuff, kservice, kxmlgui, qtbase,
}:

View File

@ -1,5 +1,5 @@
{
mkDerivation, copyPathsToStore, lib, kdepimTeam,
mkDerivation, lib, kdepimTeam,
extra-cmake-modules, kdoctools,
akonadi, akonadi-contacts, grantlee, grantleetheme, kconfig, kconfigwidgets,
kcontacts, ki18n, kiconthemes, kio, libkleo, pimcommon, prison,

View File

@ -1,5 +1,5 @@
{
mkDerivation, copyPathsToStore, lib, kdepimTeam,
mkDerivation, lib, kdepimTeam,
extra-cmake-modules, kdoctools,
shared-mime-info,
akonadi, akonadi-calendar, akonadi-contacts, akonadi-mime, akonadi-notes,

View File

@ -1,7 +1,6 @@
{
mkDerivation,
lib,
copyPathsToStore,
extra-cmake-modules,
plymouth,
nixos-icons,
@ -16,19 +15,21 @@
bottomColor ? "black"
}:
let
let
validColors = [ "black" "cardboard_grey" "charcoal_grey" "icon_blue" "paper_white" "plasma_blue" "neon_blue" "neon_green" ];
resolvedLogoName = if (logoFile != null && logoName == null) then lib.strings.removeSuffix ".png" (baseNameOf(toString logoFile)) else logoName;
in
assert lib.asserts.assertOneOf "topColor" topColor validColors;
assert lib.asserts.assertOneOf "bottomColor" bottomColor validColors;
mkDerivation {
name = "breeze-plymouth";
nativeBuildInputs = [ extra-cmake-modules ] ++ lib.optionals (logoFile != null) [ imagemagick netpbm perl ];
buildInputs = [ plymouth ];
patches = copyPathsToStore (lib.readPathsFromFile ./. ./series);
patches = [
./install-paths.patch
];
cmakeFlags = []
++ lib.optional (osName != null) "-DDISTRO_NAME=${osName}"
++ lib.optional (osVersion != null) "-DDISTRO_VERSION=${osVersion}"
@ -36,7 +37,7 @@ mkDerivation {
++ lib.optional (topColor != null) "-DBACKGROUND_TOP_COLOR=${topColor}"
++ lib.optional (bottomColor != null) "-DBACKGROUND_BOTTOM_COLOR=${bottomColor}"
;
postPatch = ''
substituteInPlace cmake/FindPlymouth.cmake --subst-var out
'' + lib.optionalString (logoFile != null) ''

View File

@ -1 +0,0 @@
install-paths.patch

View File

@ -1,5 +1,5 @@
{
mkDerivation, lib, copyPathsToStore,
mkDerivation, lib,
extra-cmake-modules, kdoctools,
epoxy,libICE, libSM, libinput, libxkbcommon, udev, wayland, xcb-util-cursor,

View File

@ -1,5 +1,5 @@
{
mkDerivation, lib, copyPathsToStore, propagate,
mkDerivation, lib, propagate,
extra-cmake-modules,
kwayland, libXrandr, qtbase, qtx11extras
}:
@ -12,7 +12,9 @@ mkDerivation {
nativeBuildInputs = [ extra-cmake-modules ];
buildInputs = [ kwayland libXrandr qtx11extras ];
outputs = [ "out" "dev" ];
patches = copyPathsToStore (lib.readPathsFromFile ./. ./series);
patches = [
./libkscreen-backends-path.patch
];
preConfigure = ''
NIX_CFLAGS_COMPILE+=" -DNIXPKGS_LIBKSCREEN_BACKENDS=\"''${!outputBin}/$qtPluginPrefix/kf5/kscreen\""
'';

View File

@ -1 +0,0 @@
libkscreen-backends-path.patch

View File

@ -1,5 +1,5 @@
{
mkDerivation, lib, copyPathsToStore,
mkDerivation, lib,
extra-cmake-modules, kdoctools,
boost, fontconfig, ibus, libXcursor, libXft, libcanberra_kde, libpulseaudio,
@ -30,7 +30,10 @@ mkDerivation {
ksysguard kwallet kwin plasma-framework plasma-workspace qqc2-desktop-style
];
patches = copyPathsToStore (lib.readPathsFromFile ./. ./series);
patches = [
./hwclock-path.patch
./tzdir.patch
];
postPatch = ''
sed '1i#include <cmath>' -i kcms/touchpad/src/backends/x11/synapticstouchpad.cpp
'';

View File

@ -1,2 +0,0 @@
hwclock-path.patch
tzdir.patch

View File

@ -1,4 +1,4 @@
{ mkDerivation, lib, copyPathsToStore, fetchurl, qtbase, qtscript, cmake }:
{ mkDerivation, lib, fetchurl, qtbase, qtscript, cmake }:
mkDerivation rec {
pname = "grantlee";
@ -14,7 +14,10 @@ mkDerivation rec {
buildInputs = [ qtbase qtscript ];
nativeBuildInputs = [ cmake ];
patches = copyPathsToStore (lib.readPathsFromFile ./. ./series);
patches = [
./grantlee-nix-profiles.patch
./grantlee-no-canonicalize-filepath.patch
];
outputs = [ "out" "dev" ];
postFixup =

View File

@ -1,2 +0,0 @@
grantlee-nix-profiles.patch
grantlee-no-canonicalize-filepath.patch

View File

@ -1,9 +1,11 @@
{ mkDerivation, lib, copyPathsToStore, cmake, pkgconfig }:
{ mkDerivation, lib, cmake, pkgconfig }:
mkDerivation {
name = "extra-cmake-modules";
patches = copyPathsToStore (lib.readPathsFromFile ./. ./series);
patches = [
./nix-lib-path.patch
];
outputs = [ "out" ]; # this package has no runtime components

View File

@ -1 +0,0 @@
nix-lib-path.patch

View File

@ -1,5 +1,5 @@
{
mkDerivation, lib, copyPathsToStore, propagate,
mkDerivation, lib, propagate,
extra-cmake-modules, kcoreaddons, polkit-qt, qttools
}:
@ -9,7 +9,9 @@ mkDerivation {
nativeBuildInputs = [ extra-cmake-modules ];
buildInputs = [ polkit-qt qttools ];
propagatedBuildInputs = [ kcoreaddons ];
patches = copyPathsToStore (lib.readPathsFromFile ./. ./series);
patches = [
./cmake-install-paths.patch
];
# library stores reference to plugin path,
# separating $out from $bin would create a reference cycle
outputs = [ "out" "dev" ];

View File

@ -1 +0,0 @@
cmake-install-paths.patch

View File

@ -1,5 +1,5 @@
{
mkDerivation, lib, copyPathsToStore,
mkDerivation, lib,
extra-cmake-modules,
kconfigwidgets, kcoreaddons, kdeclarative, ki18n, kiconthemes, kitemviews,
kpackage, kservice, kxmlgui, qtdeclarative,

View File

@ -1,5 +1,5 @@
{
mkDerivation, lib, copyPathsToStore,
mkDerivation, lib,
docbook_xml_dtd_45, extra-cmake-modules, kdoctools,
kauth, karchive, kcompletion, kconfig, kconfigwidgets, kcoreaddons, kcrash,
kdbusaddons, kded, kdesignerplugin, kemoticons, kglobalaccel, kguiaddons,
@ -11,7 +11,9 @@
mkDerivation {
name = "kdelibs4support";
meta = { maintainers = [ lib.maintainers.ttuegel ]; };
patches = copyPathsToStore (lib.readPathsFromFile ./. ./series);
patches = [
./nix-kde-include-dir.patch
];
setupHook = ./setup-hook.sh;
nativeBuildInputs = [ extra-cmake-modules qttools ];
propagatedNativeBuildInputs = [ kdoctools ];

View File

@ -1 +0,0 @@
nix-kde-include-dir.patch

View File

@ -1,5 +1,5 @@
{
mkDerivation, lib, copyPathsToStore,
mkDerivation, lib,
extra-cmake-modules,
attr, ebook_tools, exiv2, ffmpeg_3, karchive, kcoreaddons, ki18n, poppler, qtbase, qtmultimedia, taglib
}:
@ -12,5 +12,7 @@ mkDerivation {
attr ebook_tools exiv2 ffmpeg_3 karchive kcoreaddons ki18n poppler qtbase qtmultimedia
taglib
];
patches = copyPathsToStore (lib.readPathsFromFile ./. ./series);
patches = [
./cmake-install-paths.patch
];
}

View File

@ -1 +0,0 @@
cmake-install-paths.patch

View File

@ -1,5 +1,5 @@
{
mkDerivation, lib, copyPathsToStore,
mkDerivation, lib,
extra-cmake-modules,
breeze-icons, karchive, kcoreaddons, kconfigwidgets, ki18n, kitemviews,
qtbase, qtsvg, qttools,
@ -8,7 +8,9 @@
mkDerivation {
name = "kiconthemes";
meta = { maintainers = [ lib.maintainers.ttuegel ]; };
patches = copyPathsToStore (lib.readPathsFromFile ./. ./series);
patches = [
./default-theme-breeze.patch
];
nativeBuildInputs = [ extra-cmake-modules ];
buildInputs = [
breeze-icons karchive kcoreaddons kconfigwidgets ki18n kitemviews

View File

@ -1 +0,0 @@
default-theme-breeze.patch

View File

@ -1,5 +1,5 @@
{
mkDerivation, lib, copyPathsToStore, writeScript,
mkDerivation, lib, writeScript,
extra-cmake-modules, kdoctools,
kconfig, kcrash, ki18n, kio, kparts, kservice, kwindowsystem, plasma-framework
}:

View File

@ -1,3 +0,0 @@
kinit-libpath.patch
start_kdeinit-path.patch
kdeinit-extra_libs.patch

View File

@ -1,5 +1,5 @@
{
mkDerivation, lib, copyPathsToStore,
mkDerivation, lib,
extra-cmake-modules, kdoctools, qttools,
karchive, kbookmarks, kcompletion, kconfig, kconfigwidgets, kcoreaddons,
kdbusaddons, ki18n, kiconthemes, kitemviews, kjobwidgets, knotifications,
@ -21,5 +21,8 @@ mkDerivation {
kxmlgui qtbase qttools solid
];
outputs = [ "out" "dev" ];
patches = (copyPathsToStore (lib.readPathsFromFile ./. ./series));
patches = [
./samba-search-path.patch
./kio-debug-module-loader.patch
];
}

View File

@ -1,2 +0,0 @@
samba-search-path.patch
kio-debug-module-loader.patch

View File

@ -1,5 +1,5 @@
{
mkDerivation, lib, copyPathsToStore,
mkDerivation, lib,
extra-cmake-modules, kdoctools,
karchive, kconfig, kcoreaddons, ki18n, qtbase,
}:
@ -9,5 +9,8 @@ mkDerivation {
meta = { maintainers = [ lib.maintainers.ttuegel ]; };
nativeBuildInputs = [ extra-cmake-modules kdoctools ];
buildInputs = [ karchive kconfig kcoreaddons ki18n qtbase ];
patches = copyPathsToStore (lib.readPathsFromFile ./. ./series);
patches = [
./allow-external-paths.patch
./qdiriterator-follow-symlinks.patch
];
}

View File

@ -1,2 +0,0 @@
allow-external-paths.patch
qdiriterator-follow-symlinks.patch

View File

@ -1,5 +1,5 @@
{
mkDerivation, lib, copyPathsToStore,
mkDerivation, lib,
bison, extra-cmake-modules, flex,
kconfig, kcoreaddons, kcrash, kdbusaddons, kdoctools, ki18n, kwindowsystem,
qtbase, shared-mime-info,
@ -15,5 +15,8 @@ mkDerivation {
];
propagatedBuildInputs = [ kconfig kcoreaddons ];
propagatedUserEnvPkgs = [ shared-mime-info ]; # for kbuildsycoca5
patches = copyPathsToStore (lib.readPathsFromFile ./. ./series);
patches = [
./qdiriterator-follow-symlinks.patch
./no-canonicalize-path.patch
];
}

View File

@ -1,2 +0,0 @@
qdiriterator-follow-symlinks.patch
no-canonicalize-path.patch

View File

@ -1,5 +1,5 @@
{
mkDerivation, lib, copyPathsToStore,
mkDerivation, lib,
extra-cmake-modules,
libpthreadstubs, libXdmcp,
qtbase, qttools, qtx11extras
@ -14,7 +14,9 @@ mkDerivation {
nativeBuildInputs = [ extra-cmake-modules ];
buildInputs = [ libpthreadstubs libXdmcp qttools qtx11extras ];
propagatedBuildInputs = [ qtbase ];
patches = copyPathsToStore (lib.readPathsFromFile ./. ./series);
patches = [
./platform-plugins-path.patch
];
preConfigure = ''
NIX_CFLAGS_COMPILE+=" -DNIXPKGS_QT_PLUGIN_PATH=\"''${!outputBin}/$qtPluginPrefix\""
'';

View File

@ -1 +0,0 @@
platform-plugins-path.patch