Fix tarball build

replaceDependency is based on IFD so it cannot be used in packages.
Thankfully what we are doing with libhandy can be easily achieved with sed.
This commit is contained in:
Jan Tojnar 2021-04-28 11:47:37 +02:00
parent 26e044b14a
commit 588e05ddff
No known key found for this signature in database
GPG key ID: 7FAB2A15F7A607A4

View file

@ -22,7 +22,7 @@
, at-spi2-core
, gnome3
, libhandy
, replaceDependency
, runCommand
}:
stdenv.mkDerivation rec {
@ -102,11 +102,11 @@ stdenv.mkDerivation rec {
libhandyWithGlade = libhandy.override {
enableGlade = true;
};
in (replaceDependency {
drv = libhandyWithGlade.glade;
oldDependency = libhandyWithGlade.out;
newDependency = libhandy.out;
});
in runCommand "${libhandy.name}-glade" {} ''
cp -r "${libhandyWithGlade.glade}" "$out"
chmod -R +w "$out"
sed -e "s#${libhandyWithGlade.out}#${libhandy.out}#g" -e "s#${libhandyWithGlade.glade}#$out#g" -i $(find "$out" -type f)
'';
};
meta = with lib; {