5 pkg: packageRequires: addPackageRequiresWhen pkg packageRequires (finalAttrs: previousAttrs: true);
7 addPackageRequiresIfOlder =
8 pkg: packageRequires: version:
9 addPackageRequiresWhen pkg packageRequires (
10 finalAttrs: previousAttrs: lib.versionOlder finalAttrs.version version
13 addPackageRequiresWhen =
14 pkg: packageRequires: predicate:
16 finalAttrs: previousAttrs: {
18 if predicate finalAttrs previousAttrs then
19 previousAttrs.packageRequires or [ ] ++ packageRequires
21 previousAttrs.packageRequires or null;
27 pkg.overrideAttrs (previousAttrs: {
28 nativeBuildInputs = previousAttrs.nativeBuildInputs or [ ] ++ [ pkgs.git ];
31 dontConfigure = pkg: pkg.overrideAttrs { dontConfigure = true; };
35 pkg.overrideAttrs (previousAttrs: {
36 inherit (epkg) src version;
37 propagatedUserEnvPkgs = previousAttrs.propagatedUserEnvPkgs or [ ] ++ [ epkg ];
40 fix-rtags = pkg: dontConfigure (externalSrc pkg pkgs.rtags);
44 pkg.overrideAttrs (previousAttrs: {
46 previousAttrs.postPatch or ""
49 substituteInPlace $ename.el \
50 --replace-fail "(require 'helm)" "(require 'helm-core)"
54 ignoreCompilationError = pkg: ignoreCompilationErrorWhen pkg (finalAttrs: previousAttrs: true);
56 ignoreCompilationErrorIfOlder =
58 ignoreCompilationErrorWhen pkg (
59 finalAttrs: previousAttrs: lib.versionOlder finalAttrs.version version
62 ignoreCompilationErrorWhen =
65 finalAttrs: previousAttrs: {
66 ignoreCompilationError = predicate finalAttrs previousAttrs;
72 pkg.overrideAttrs (previousAttrs: {
73 meta = previousAttrs.meta or { } // {
78 mkHome = pkg: mkHomeWhen pkg (finalAttrs: previousAttrs: true);
82 mkHomeWhen pkg (finalAttrs: previousAttrs: lib.versionOlder finalAttrs.version version);
87 finalAttrs: previousAttrs: {
89 if predicate finalAttrs previousAttrs then
93 + previousAttrs.preInstall or ""
95 previousAttrs.preInstall or null;