Merge pull request #208912 from LeSuisse/bitwig-studio-libxkbcommon_7-cleanup

bitwig-studio1, bitwig-studio2, libxkbcommon_7: drop
This commit is contained in:
Thomas Gerbet 2023-10-16 10:39:48 +02:00 committed by GitHub
commit e5cfe9ee44
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 3 additions and 158 deletions

View file

@ -1,95 +0,0 @@
{ stdenv, fetchurl, alsa-lib, bzip2, cairo, dpkg, freetype, gdk-pixbuf
, wrapGAppsHook, gtk2, gtk3, harfbuzz, jdk, lib, xorg
, libbsd, libjack2, libpng, ffmpeg
, libxkbcommon
, makeWrapper, pixman, autoPatchelfHook
, xdg-utils, zenity, zlib }:
stdenv.mkDerivation rec {
pname = "bitwig-studio";
version = "1.3.16";
src = fetchurl {
url = "https://downloads.bitwig.com/stable/${version}/bitwig-studio-${version}.deb";
sha256 = "0n0fxh9gnmilwskjcayvjsjfcs3fz9hn00wh7b3gg0cv3qqhich8";
};
nativeBuildInputs = [ dpkg makeWrapper autoPatchelfHook wrapGAppsHook ];
unpackCmd = "mkdir root ; dpkg-deb -x $curSrc root";
dontBuild = true;
dontWrapGApps = true; # we only want $gappsWrapperArgs here
buildInputs = with xorg; [
alsa-lib bzip2.out cairo freetype gdk-pixbuf gtk2 gtk3 harfbuzz libX11 libXau
libXcursor libXdmcp libXext libXfixes libXrender libbsd libjack2 libpng libxcb
libxkbfile pixman xcbutil xcbutilwm zlib
];
installPhase = ''
mkdir -p $out
cp -r opt/bitwig-studio $out/libexec
# Use NixOS versions of these libs instead of the bundled ones.
(
cd $out/libexec/lib/bitwig-studio
rm libbz2.so* libxkbfile.so* libXcursor.so* libXau.so* \
libXdmcp.so* libpng16.so* libxcb*.so* libharfbuzz.so* \
libcairo.so* libfreetype.so*
ln -s ${bzip2.out}/lib/libbz2.so.1.0.6 libbz2.so.1.0
)
# Use our OpenJDK instead of Bitwigs bundled—and commercial!—one.
rm -rf $out/libexec/lib/jre
ln -s ${jdk.home}/jre $out/libexec/lib/jre
mkdir -p $out/bin
ln -s $out/libexec/bitwig-studio $out/bin/bitwig-studio
cp -r usr/share $out/share
substitute usr/share/applications/bitwig-studio.desktop \
$out/share/applications/bitwig-studio.desktop \
--replace /usr/bin/bitwig-studio $out/bin/bitwig-studio
'';
postFixup = ''
# Bitwigs `libx11-windowing-system.so` has several problems:
#
# • has some old version of libxkbcommon linked statically (ಠ_ಠ),
#
# • hardcodes path to `/usr/share/X11/xkb`,
#
# • even if we redirected it with libredirect (after adding
# `eaccess()` to libredirect!), their version of libxkbcommon
# is unable to parse our xkeyboardconfig. Been there, done that.
#
# However, it suffices to override theirs with our libxkbcommon
# in LD_PRELOAD. :-)
find $out -type f -executable \
-not -name '*.so.*' \
-not -name '*.so' \
-not -path '*/resources/*' | \
while IFS= read -r f ; do
wrapProgram $f \
--suffix PATH : "${lib.makeBinPath [ ffmpeg zenity ]}" \
--prefix PATH : "${lib.makeBinPath [ xdg-utils ]}" \
"''${gappsWrapperArgs[@]}" \
--set LD_PRELOAD "${libxkbcommon.out}/lib/libxkbcommon.so" || true
done
'';
meta = with lib; {
description = "A digital audio workstation";
longDescription = ''
Bitwig Studio is a multi-platform music-creation system for
production, performance and DJing, with a focus on flexible
editing tools and a super-fast workflow.
'';
homepage = "https://www.bitwig.com/";
license = licenses.unfree;
platforms = [ "x86_64-linux" ];
maintainers = with maintainers; [ michalrus mrVanDalo ];
};
}

View file

@ -1,16 +0,0 @@
{ fetchurl, bitwig-studio1,
pulseaudio }:
bitwig-studio1.overrideAttrs (oldAttrs: rec {
pname = "bitwig-studio";
version = "2.5";
src = fetchurl {
url = "https://downloads.bitwig.com/stable/${version}/bitwig-studio-${version}.deb";
sha256 = "1zkiz36lhck3qvl0cp0dq6pwbv4lx4sh9wh0ga92kx5zhvbjm098";
};
runtimeDependencies = [
pulseaudio
];
})

View file

@ -1,39 +0,0 @@
{ lib, stdenv, fetchurl, pkg-config, bison, flex, xkeyboard_config, libxcb, libX11 }:
stdenv.mkDerivation rec {
pname = "libxkbcommon";
version = "0.7.2";
src = fetchurl {
url = "http://xkbcommon.org/download/libxkbcommon-${version}.tar.xz";
sha256 = "1n5rv5n210kjnkyrvbh04gfwaa7zrmzy1393p8nyqfw66lkxr918";
};
outputs = [ "out" "dev" ];
nativeBuildInputs = [ pkg-config ];
buildInputs = [ bison flex xkeyboard_config libxcb ];
configureFlags = [
"--with-xkb-config-root=${xkeyboard_config}/etc/X11/xkb"
"--with-x-locale-root=${libX11.out}/share/X11/locale"
];
env.NIX_CFLAGS_COMPILE = toString [
# Needed with GCC 12
"-Wno-error=array-bounds"
];
preBuild = lib.optionalString stdenv.isDarwin ''
sed -i 's/,--version-script=.*$//' Makefile
'';
meta = with lib; {
description = "A library to handle keyboard descriptions";
homepage = "https://xkbcommon.org";
license = licenses.mit;
maintainers = with maintainers; [ ttuegel ];
mainProgram = "xkbcli";
platforms = with platforms; unix;
};
}

View file

@ -89,6 +89,8 @@ mapAliases ({
bazel_3 = throw "bazel 3 is past end of life as it is not an lts version"; # Added 2023-02-02 bazel_3 = throw "bazel 3 is past end of life as it is not an lts version"; # Added 2023-02-02
bedup = throw "bedup was removed because it was broken and abandoned upstream"; # added 2023-02-04 bedup = throw "bedup was removed because it was broken and abandoned upstream"; # added 2023-02-04
bird2 = bird; # Added 2022-02-21 bird2 = bird; # Added 2022-02-21
bitwig-studio1 = throw "bitwig-studio1 has been removed, you can upgrade to 'bitwig-studio'"; # Added 2023-01-03
bitwig-studio2 = throw "bitwig-studio2 has been removed, you can upgrade to 'bitwig-studio'"; # Added 2023-01-03
ddclient = throw "ddclient has been removed on the request of the upstream maintainer because it is unmaintained and has bugs. Please switch to a different software like `inadyn` or `knsupdate`."; # Added 2023-07-04 ddclient = throw "ddclient has been removed on the request of the upstream maintainer because it is unmaintained and has bugs. Please switch to a different software like `inadyn` or `knsupdate`."; # Added 2023-07-04
bluezFull = throw "'bluezFull' has been renamed to/replaced by 'bluez'"; # Converted to throw 2023-09-10 bluezFull = throw "'bluezFull' has been renamed to/replaced by 'bluez'"; # Converted to throw 2023-09-10
boost168 = throw "boost168 has been deprecated in favor of the latest version"; # Added 2023-06-08 boost168 = throw "boost168 has been deprecated in favor of the latest version"; # Added 2023-06-08
@ -453,6 +455,7 @@ mapAliases ({
libwnck3 = libwnck; libwnck3 = libwnck;
libyamlcpp = yaml-cpp; # Added 2023-01-29 libyamlcpp = yaml-cpp; # Added 2023-01-29
libyamlcpp_0_3 = yaml-cpp_0_3; # Added 2023-01-29 libyamlcpp_0_3 = yaml-cpp_0_3; # Added 2023-01-29
libxkbcommon_7 = throw "libxkbcommon_7 has been removed because it is impacted by security issues and not used in nixpkgs, move to 'libxkbcommon'"; # Added 2023-01-03
lightdm_gtk_greeter = lightdm-gtk-greeter; # Added 2022-08-01 lightdm_gtk_greeter = lightdm-gtk-greeter; # Added 2022-08-01
llama = walk; # Added 2023-01-23 llama = walk; # Added 2023-01-23

View file

@ -23714,7 +23714,6 @@ with pkgs;
libxkbcommon = libxkbcommon_8; libxkbcommon = libxkbcommon_8;
libxkbcommon_8 = callPackage ../development/libraries/libxkbcommon { }; libxkbcommon_8 = callPackage ../development/libraries/libxkbcommon { };
libxkbcommon_7 = callPackage ../development/libraries/libxkbcommon/libxkbcommon_7.nix { };
libxklavier = callPackage ../development/libraries/libxklavier { }; libxklavier = callPackage ../development/libraries/libxklavier { };
@ -30637,13 +30636,6 @@ with pkgs;
bitscope = recurseIntoAttrs bitscope = recurseIntoAttrs
(callPackage ../applications/science/electronics/bitscope/packages.nix { }); (callPackage ../applications/science/electronics/bitscope/packages.nix { });
bitwig-studio1 = callPackage ../applications/audio/bitwig-studio/bitwig-studio1.nix {
inherit (gnome) zenity;
libxkbcommon = libxkbcommon_7;
};
bitwig-studio2 = callPackage ../applications/audio/bitwig-studio/bitwig-studio2.nix {
inherit bitwig-studio1;
};
bitwig-studio3 = callPackage ../applications/audio/bitwig-studio/bitwig-studio3.nix { }; bitwig-studio3 = callPackage ../applications/audio/bitwig-studio/bitwig-studio3.nix { };
bitwig-studio4 = callPackage ../applications/audio/bitwig-studio/bitwig-studio4.nix { bitwig-studio4 = callPackage ../applications/audio/bitwig-studio/bitwig-studio4.nix {
libjpeg = libjpeg8; libjpeg = libjpeg8;