wlroots: 0.6.0 -> 0.7.0

Changelog: https://github.com/swaywm/wlroots/releases/tag/0.7.0
Rootston was removed for this release.
This commit is contained in:
Michael Weiss 2019-08-27 11:09:43 +02:00
parent 9760593a52
commit ad339e91c1
No known key found for this signature in database
GPG Key ID: 5BE487C4D4771D83
1 changed files with 7 additions and 29 deletions

View File

@ -6,18 +6,17 @@
stdenv.mkDerivation rec { stdenv.mkDerivation rec {
pname = "wlroots"; pname = "wlroots";
version = "0.6.0"; version = "0.7.0";
src = fetchFromGitHub { src = fetchFromGitHub {
owner = "swaywm"; owner = "swaywm";
repo = "wlroots"; repo = "wlroots";
rev = version; rev = version;
sha256 = "1rdcmll5b8w242n6yfjpsaprq280ck2jmbz46dxndhignxgda7k4"; sha256 = "0jzxa6psbc7ddxli7rbfqxmv1svxnis51l1vch4hb9fdixqm284a";
}; };
# $out for the library, $bin for rootston, and $examples for the example # $out for the library and $examples for the example programs (in examples):
# programs (in examples) AND rootston outputs = [ "out" "examples" ];
outputs = [ "out" "bin" "examples" ];
nativeBuildInputs = [ meson ninja pkgconfig ]; nativeBuildInputs = [ meson ninja pkgconfig ];
@ -32,31 +31,13 @@ stdenv.mkDerivation rec {
"-Dxcb-icccm=enabled" "-Dxcb-errors=enabled" "-Dxcb-icccm=enabled" "-Dxcb-errors=enabled"
]; ];
postPatch = ''
# It happens from time to time that the version wasn't updated:
sed -iE "s/version: '[0-9]\.[0-9]\.[0-9]'/version: '${version}.0'/" meson.build
'';
postInstall = '' postInstall = ''
# Copy the library to $bin and $examples # Copy the library to $examples
for output in "$bin" "$examples"; do mkdir -p $examples/lib
mkdir -p $output/lib cp -P libwlroots* $examples/lib/
cp -P libwlroots* $output/lib/
done
''; '';
postFixup = '' postFixup = ''
# Install rootston (the reference compositor) to $bin and $examples (this
# has to be done after the fixup phase to prevent broken binaries):
for output in "$bin" "$examples"; do
mkdir -p $output/bin
cp rootston/rootston $output/bin/
patchelf \
--set-rpath "$(patchelf --print-rpath $output/bin/rootston | sed s,$out,$output,g)" \
$output/bin/rootston
mkdir $output/etc
cp ../rootston/rootston.ini.example $output/etc/rootston.ini
done
# Install ALL example programs to $examples: # Install ALL example programs to $examples:
# screencopy dmabuf-capture input-inhibitor layer-shell idle-inhibit idle # screencopy dmabuf-capture input-inhibitor layer-shell idle-inhibit idle
# screenshot output-layout multi-pointer rotation tablet touch pointer # screenshot output-layout multi-pointer rotation tablet touch pointer
@ -65,9 +46,6 @@ stdenv.mkDerivation rec {
cd ./examples cd ./examples
for binary in $(find . -executable -type f -printf '%P\n' | grep -vE '\.so'); do for binary in $(find . -executable -type f -printf '%P\n' | grep -vE '\.so'); do
cp "$binary" "$examples/bin/wlroots-$binary" cp "$binary" "$examples/bin/wlroots-$binary"
patchelf \
--set-rpath "$(patchelf --print-rpath $output/bin/rootston | sed s,$out,$examples,g)" \
"$examples/bin/wlroots-$binary"
done done
''; '';