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/nix-profiles-library-paths.patch"
"/prefix/compose-search-path.patch" ] "/prefix/compose-search-path.patch" ]
*/ */
readPathsFromFile = rootPath: file: readPathsFromFile = lib.warn "lib.readPathsFromFile is deprecated, use a list instead"
let (rootPath: file:
lines = lib.splitString "\n" (builtins.readFile file); let
removeComments = lib.filter (line: line != "" && !(lib.hasPrefix "#" line)); lines = lib.splitString "\n" (builtins.readFile file);
relativePaths = removeComments lines; removeComments = lib.filter (line: line != "" && !(lib.hasPrefix "#" line));
absolutePaths = builtins.map (path: rootPath + "/${path}") relativePaths; relativePaths = removeComments lines;
in absolutePaths = builtins.map (path: rootPath + "/${path}") relativePaths;
absolutePaths; in
absolutePaths);
/* Read the contents of a file removing the trailing \n /* 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, extra-cmake-modules, shared-mime-info,
boost, kcompletion, kconfigwidgets, kcrash, kdbusaddons, kdesignerplugin, boost, kcompletion, kconfigwidgets, kcrash, kdbusaddons, kdesignerplugin,
ki18n, kiconthemes, kio, kitemmodels, kwindowsystem, mysql, qttools, ki18n, kiconthemes, kio, kitemmodels, kwindowsystem, mysql, qttools,

View File

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

View File

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

View File

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

View File

@ -1,7 +1,6 @@
{ {
mkDerivation, mkDerivation,
lib, lib,
copyPathsToStore,
extra-cmake-modules, extra-cmake-modules,
plymouth, plymouth,
nixos-icons, nixos-icons,
@ -16,19 +15,21 @@
bottomColor ? "black" bottomColor ? "black"
}: }:
let let
validColors = [ "black" "cardboard_grey" "charcoal_grey" "icon_blue" "paper_white" "plasma_blue" "neon_blue" "neon_green" ]; 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; resolvedLogoName = if (logoFile != null && logoName == null) then lib.strings.removeSuffix ".png" (baseNameOf(toString logoFile)) else logoName;
in in
assert lib.asserts.assertOneOf "topColor" topColor validColors; assert lib.asserts.assertOneOf "topColor" topColor validColors;
assert lib.asserts.assertOneOf "bottomColor" bottomColor validColors; assert lib.asserts.assertOneOf "bottomColor" bottomColor validColors;
mkDerivation { mkDerivation {
name = "breeze-plymouth"; name = "breeze-plymouth";
nativeBuildInputs = [ extra-cmake-modules ] ++ lib.optionals (logoFile != null) [ imagemagick netpbm perl ]; nativeBuildInputs = [ extra-cmake-modules ] ++ lib.optionals (logoFile != null) [ imagemagick netpbm perl ];
buildInputs = [ plymouth ]; buildInputs = [ plymouth ];
patches = copyPathsToStore (lib.readPathsFromFile ./. ./series); patches = [
./install-paths.patch
];
cmakeFlags = [] cmakeFlags = []
++ lib.optional (osName != null) "-DDISTRO_NAME=${osName}" ++ lib.optional (osName != null) "-DDISTRO_NAME=${osName}"
++ lib.optional (osVersion != null) "-DDISTRO_VERSION=${osVersion}" ++ lib.optional (osVersion != null) "-DDISTRO_VERSION=${osVersion}"
@ -36,7 +37,7 @@ mkDerivation {
++ lib.optional (topColor != null) "-DBACKGROUND_TOP_COLOR=${topColor}" ++ lib.optional (topColor != null) "-DBACKGROUND_TOP_COLOR=${topColor}"
++ lib.optional (bottomColor != null) "-DBACKGROUND_BOTTOM_COLOR=${bottomColor}" ++ lib.optional (bottomColor != null) "-DBACKGROUND_BOTTOM_COLOR=${bottomColor}"
; ;
postPatch = '' postPatch = ''
substituteInPlace cmake/FindPlymouth.cmake --subst-var out substituteInPlace cmake/FindPlymouth.cmake --subst-var out
'' + lib.optionalString (logoFile != null) '' '' + 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, extra-cmake-modules, kdoctools,
epoxy,libICE, libSM, libinput, libxkbcommon, udev, wayland, xcb-util-cursor, 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, extra-cmake-modules,
kwayland, libXrandr, qtbase, qtx11extras kwayland, libXrandr, qtbase, qtx11extras
}: }:
@ -12,7 +12,9 @@ mkDerivation {
nativeBuildInputs = [ extra-cmake-modules ]; nativeBuildInputs = [ extra-cmake-modules ];
buildInputs = [ kwayland libXrandr qtx11extras ]; buildInputs = [ kwayland libXrandr qtx11extras ];
outputs = [ "out" "dev" ]; outputs = [ "out" "dev" ];
patches = copyPathsToStore (lib.readPathsFromFile ./. ./series); patches = [
./libkscreen-backends-path.patch
];
preConfigure = '' preConfigure = ''
NIX_CFLAGS_COMPILE+=" -DNIXPKGS_LIBKSCREEN_BACKENDS=\"''${!outputBin}/$qtPluginPrefix/kf5/kscreen\"" 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, extra-cmake-modules, kdoctools,
boost, fontconfig, ibus, libXcursor, libXft, libcanberra_kde, libpulseaudio, boost, fontconfig, ibus, libXcursor, libXft, libcanberra_kde, libpulseaudio,
@ -30,7 +30,10 @@ mkDerivation {
ksysguard kwallet kwin plasma-framework plasma-workspace qqc2-desktop-style ksysguard kwallet kwin plasma-framework plasma-workspace qqc2-desktop-style
]; ];
patches = copyPathsToStore (lib.readPathsFromFile ./. ./series); patches = [
./hwclock-path.patch
./tzdir.patch
];
postPatch = '' postPatch = ''
sed '1i#include <cmath>' -i kcms/touchpad/src/backends/x11/synapticstouchpad.cpp 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 { mkDerivation rec {
pname = "grantlee"; pname = "grantlee";
@ -14,7 +14,10 @@ mkDerivation rec {
buildInputs = [ qtbase qtscript ]; buildInputs = [ qtbase qtscript ];
nativeBuildInputs = [ cmake ]; nativeBuildInputs = [ cmake ];
patches = copyPathsToStore (lib.readPathsFromFile ./. ./series); patches = [
./grantlee-nix-profiles.patch
./grantlee-no-canonicalize-filepath.patch
];
outputs = [ "out" "dev" ]; outputs = [ "out" "dev" ];
postFixup = 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 { mkDerivation {
name = "extra-cmake-modules"; name = "extra-cmake-modules";
patches = copyPathsToStore (lib.readPathsFromFile ./. ./series); patches = [
./nix-lib-path.patch
];
outputs = [ "out" ]; # this package has no runtime components 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 extra-cmake-modules, kcoreaddons, polkit-qt, qttools
}: }:
@ -9,7 +9,9 @@ mkDerivation {
nativeBuildInputs = [ extra-cmake-modules ]; nativeBuildInputs = [ extra-cmake-modules ];
buildInputs = [ polkit-qt qttools ]; buildInputs = [ polkit-qt qttools ];
propagatedBuildInputs = [ kcoreaddons ]; propagatedBuildInputs = [ kcoreaddons ];
patches = copyPathsToStore (lib.readPathsFromFile ./. ./series); patches = [
./cmake-install-paths.patch
];
# library stores reference to plugin path, # library stores reference to plugin path,
# separating $out from $bin would create a reference cycle # separating $out from $bin would create a reference cycle
outputs = [ "out" "dev" ]; 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, extra-cmake-modules,
kconfigwidgets, kcoreaddons, kdeclarative, ki18n, kiconthemes, kitemviews, kconfigwidgets, kcoreaddons, kdeclarative, ki18n, kiconthemes, kitemviews,
kpackage, kservice, kxmlgui, qtdeclarative, kpackage, kservice, kxmlgui, qtdeclarative,

View File

@ -1,5 +1,5 @@
{ {
mkDerivation, lib, copyPathsToStore, mkDerivation, lib,
docbook_xml_dtd_45, extra-cmake-modules, kdoctools, docbook_xml_dtd_45, extra-cmake-modules, kdoctools,
kauth, karchive, kcompletion, kconfig, kconfigwidgets, kcoreaddons, kcrash, kauth, karchive, kcompletion, kconfig, kconfigwidgets, kcoreaddons, kcrash,
kdbusaddons, kded, kdesignerplugin, kemoticons, kglobalaccel, kguiaddons, kdbusaddons, kded, kdesignerplugin, kemoticons, kglobalaccel, kguiaddons,
@ -11,7 +11,9 @@
mkDerivation { mkDerivation {
name = "kdelibs4support"; name = "kdelibs4support";
meta = { maintainers = [ lib.maintainers.ttuegel ]; }; meta = { maintainers = [ lib.maintainers.ttuegel ]; };
patches = copyPathsToStore (lib.readPathsFromFile ./. ./series); patches = [
./nix-kde-include-dir.patch
];
setupHook = ./setup-hook.sh; setupHook = ./setup-hook.sh;
nativeBuildInputs = [ extra-cmake-modules qttools ]; nativeBuildInputs = [ extra-cmake-modules qttools ];
propagatedNativeBuildInputs = [ kdoctools ]; 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, extra-cmake-modules,
attr, ebook_tools, exiv2, ffmpeg_3, karchive, kcoreaddons, ki18n, poppler, qtbase, qtmultimedia, taglib 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 attr ebook_tools exiv2 ffmpeg_3 karchive kcoreaddons ki18n poppler qtbase qtmultimedia
taglib 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, extra-cmake-modules,
breeze-icons, karchive, kcoreaddons, kconfigwidgets, ki18n, kitemviews, breeze-icons, karchive, kcoreaddons, kconfigwidgets, ki18n, kitemviews,
qtbase, qtsvg, qttools, qtbase, qtsvg, qttools,
@ -8,7 +8,9 @@
mkDerivation { mkDerivation {
name = "kiconthemes"; name = "kiconthemes";
meta = { maintainers = [ lib.maintainers.ttuegel ]; }; meta = { maintainers = [ lib.maintainers.ttuegel ]; };
patches = copyPathsToStore (lib.readPathsFromFile ./. ./series); patches = [
./default-theme-breeze.patch
];
nativeBuildInputs = [ extra-cmake-modules ]; nativeBuildInputs = [ extra-cmake-modules ];
buildInputs = [ buildInputs = [
breeze-icons karchive kcoreaddons kconfigwidgets ki18n kitemviews 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, extra-cmake-modules, kdoctools,
kconfig, kcrash, ki18n, kio, kparts, kservice, kwindowsystem, plasma-framework 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, extra-cmake-modules, kdoctools, qttools,
karchive, kbookmarks, kcompletion, kconfig, kconfigwidgets, kcoreaddons, karchive, kbookmarks, kcompletion, kconfig, kconfigwidgets, kcoreaddons,
kdbusaddons, ki18n, kiconthemes, kitemviews, kjobwidgets, knotifications, kdbusaddons, ki18n, kiconthemes, kitemviews, kjobwidgets, knotifications,
@ -21,5 +21,8 @@ mkDerivation {
kxmlgui qtbase qttools solid kxmlgui qtbase qttools solid
]; ];
outputs = [ "out" "dev" ]; 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, extra-cmake-modules, kdoctools,
karchive, kconfig, kcoreaddons, ki18n, qtbase, karchive, kconfig, kcoreaddons, ki18n, qtbase,
}: }:
@ -9,5 +9,8 @@ mkDerivation {
meta = { maintainers = [ lib.maintainers.ttuegel ]; }; meta = { maintainers = [ lib.maintainers.ttuegel ]; };
nativeBuildInputs = [ extra-cmake-modules kdoctools ]; nativeBuildInputs = [ extra-cmake-modules kdoctools ];
buildInputs = [ karchive kconfig kcoreaddons ki18n qtbase ]; 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, bison, extra-cmake-modules, flex,
kconfig, kcoreaddons, kcrash, kdbusaddons, kdoctools, ki18n, kwindowsystem, kconfig, kcoreaddons, kcrash, kdbusaddons, kdoctools, ki18n, kwindowsystem,
qtbase, shared-mime-info, qtbase, shared-mime-info,
@ -15,5 +15,8 @@ mkDerivation {
]; ];
propagatedBuildInputs = [ kconfig kcoreaddons ]; propagatedBuildInputs = [ kconfig kcoreaddons ];
propagatedUserEnvPkgs = [ shared-mime-info ]; # for kbuildsycoca5 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, extra-cmake-modules,
libpthreadstubs, libXdmcp, libpthreadstubs, libXdmcp,
qtbase, qttools, qtx11extras qtbase, qttools, qtx11extras
@ -14,7 +14,9 @@ mkDerivation {
nativeBuildInputs = [ extra-cmake-modules ]; nativeBuildInputs = [ extra-cmake-modules ];
buildInputs = [ libpthreadstubs libXdmcp qttools qtx11extras ]; buildInputs = [ libpthreadstubs libXdmcp qttools qtx11extras ];
propagatedBuildInputs = [ qtbase ]; propagatedBuildInputs = [ qtbase ];
patches = copyPathsToStore (lib.readPathsFromFile ./. ./series); patches = [
./platform-plugins-path.patch
];
preConfigure = '' preConfigure = ''
NIX_CFLAGS_COMPILE+=" -DNIXPKGS_QT_PLUGIN_PATH=\"''${!outputBin}/$qtPluginPrefix\"" NIX_CFLAGS_COMPILE+=" -DNIXPKGS_QT_PLUGIN_PATH=\"''${!outputBin}/$qtPluginPrefix\""
''; '';

View File

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