trivial-builders: init deepLinkIntoOwnPackage
This commit is contained in:
parent
f296d8df93
commit
a380bd04c4
|
@ -1,4 +1,5 @@
|
|||
{ lib
|
||||
, deepLinkIntoOwnPackage
|
||||
, rmDbusServicesInPlace
|
||||
, runCommandLocalOverridable
|
||||
, stdenv
|
||||
|
@ -15,6 +16,8 @@
|
|||
"runHook preBuild"
|
||||
buildPhase
|
||||
"runHook postBuild"
|
||||
"runHook postInstall"
|
||||
"runHook postFixup"
|
||||
];
|
||||
};
|
||||
# given some package and a path, extract the item at `${package}/${path}` into
|
||||
|
@ -30,7 +33,6 @@
|
|||
mkdir -p "$out/$(dirname $item)"
|
||||
cp -a "${pkg}/$item" "$out/$item"
|
||||
done
|
||||
runHook postFixup
|
||||
'';
|
||||
|
||||
linkIntoOwnPackage = pkg: path: let
|
||||
|
@ -42,20 +44,23 @@
|
|||
mkdir -p "$out/$(dirname $item)"
|
||||
ln -s "${pkg}/$item" "$out/$item"
|
||||
done
|
||||
'';
|
||||
|
||||
deepLinkIntoOwnPackage = pkg: symlinkJoin {
|
||||
name = pkg.pname or pkg.name;
|
||||
paths = [ pkg ];
|
||||
meta = pkg.meta or {};
|
||||
postBuild = ''
|
||||
runHook postBuild
|
||||
runHook postInstall
|
||||
runHook postFixup
|
||||
'';
|
||||
};
|
||||
|
||||
# given some package, create a new package which symlinks every file of the original
|
||||
# *except* for its dbus files.
|
||||
# in addition, edit its .desktop files to clarify that it can't be "dbus activated".
|
||||
rmDbusServices = pkg: rmDbusServicesInPlace (symlinkJoin {
|
||||
name = pkg.name or pkg.pname;
|
||||
paths = [ pkg ];
|
||||
postBuild = ''
|
||||
runHook postFixup
|
||||
'';
|
||||
meta = pkg.meta or {};
|
||||
});
|
||||
rmDbusServices = pkg: rmDbusServicesInPlace (deepLinkIntoOwnPackage pkg);
|
||||
|
||||
# like rmDbusServices, but do it by patching the derivation instead of wrapping it.
|
||||
# unlike `rmDbusServices`, this won't work on *all* derivation types (e.g. runCommand), so you should
|
||||
|
|
|
@ -90,6 +90,7 @@ let
|
|||
wvkbd-mk = callPackage ./additional/wvkbd-mk { };
|
||||
inherit (trivial-builders)
|
||||
copyIntoOwnPackage
|
||||
deepLinkIntoOwnPackage
|
||||
linkIntoOwnPackage
|
||||
rmDbusServices
|
||||
rmDbusServicesInPlace
|
||||
|
|
Loading…
Reference in New Issue
Block a user