1
0
Fork 1
mirror of https://github.com/NixOS/nixpkgs.git synced 2024-11-20 04:31:52 +00:00

Merge pull request #82714 from delroth/s3tc

libtxc_dxtn{,_s2tc}: remove from nixpkgs + hardware.opengl options
This commit is contained in:
Léo Gaspard 2020-04-20 13:41:47 +02:00 committed by GitHub
commit 203955fa0c
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
8 changed files with 10 additions and 78 deletions

View file

@ -10,14 +10,6 @@ let
videoDrivers = config.services.xserver.videoDrivers;
makePackage = p: pkgs.buildEnv {
name = "mesa-drivers+txc-${p.mesa.version}";
paths =
[ p.mesa.drivers
(if cfg.s3tcSupport then p.libtxc_dxtn else p.libtxc_dxtn_s2tc)
];
};
package = pkgs.buildEnv {
name = "opengl-drivers";
paths = [ cfg.package ] ++ cfg.extraPackages;
@ -34,6 +26,9 @@ in
imports = [
(mkRenamedOptionModule [ "services" "xserver" "vaapiDrivers" ] [ "hardware" "opengl" "extraPackages" ])
(mkRemovedOptionModule [ "hardware" "opengl" "s3tcSupport" ] ''
S3TC support is now always enabled in Mesa.
'')
];
options = {
@ -74,17 +69,6 @@ in
'';
};
s3tcSupport = mkOption {
type = types.bool;
default = false;
description = ''
Make S3TC(S3 Texture Compression) via libtxc_dxtn available
to OpenGL drivers instead of the patent-free S2TC replacement.
Using this library may require a patent license depending on your location.
'';
};
package = mkOption {
type = types.package;
internal = true;
@ -166,8 +150,8 @@ in
environment.sessionVariables.LD_LIBRARY_PATH = mkIf cfg.setLdLibraryPath
([ "/run/opengl-driver/lib" ] ++ optional cfg.driSupport32Bit "/run/opengl-driver-32/lib");
hardware.opengl.package = mkDefault (makePackage pkgs);
hardware.opengl.package32 = mkDefault (makePackage pkgs.pkgsi686Linux);
hardware.opengl.package = mkDefault pkgs.mesa.drivers;
hardware.opengl.package32 = mkDefault pkgs.pkgsi686Linux.mesa.drivers;
boot.extraModulePackages = optional (elem "virtualbox" videoDrivers) kernelPackages.virtualboxGuestAdditions;
};

View file

@ -94,7 +94,7 @@ in buildFHSUserEnv {
libsndfile libtheora libogg libvorbis libopus libGLU libpcap libpulseaudio
libao libusb libevdev udev libgcrypt libxml2 libusb libpng libmpeg2 libv4l
libjpeg libxkbcommon libass libcdio libjack2 libsamplerate libzip libmad libaio
libcap libtiff libva libgphoto2 libxslt libtxc_dxtn libsndfile giflib zlib glib
libcap libtiff libva libgphoto2 libxslt libsndfile giflib zlib glib
alsaLib zziplib bash dbus keyutils zip cabextract freetype unzip coreutils
readline gcc SDL SDL2 curl graphite2 gtk2 gtk3 udev ncurses wayland libglvnd
vulkan-loader xdg_utils sqlite gnutls libbsd

View file

@ -1,23 +0,0 @@
{ stdenv, fetchurl, autoreconfHook, libGL, libGLU }:
let version = "1.0.1"; in
stdenv.mkDerivation rec {
pname = "libtxc_dxtn";
inherit version;
src = fetchurl {
url = "https://people.freedesktop.org/~cbrill/libtxc_dxtn/${pname}-${version}.tar.bz2";
sha256 = "0q5fjaknl7s0z206dd8nzk9bdh8g4p23bz7784zrllnarl90saa5";
};
nativeBuildInputs = [ autoreconfHook ];
buildInputs = [ libGL libGLU ];
meta = with stdenv.lib; {
homepage = "http://dri.freedesktop.org/wiki/S3TC";
repositories.git = "git://people.freedesktop.org/~mareko/libtxc_dxtn";
license = licenses.mit;
platforms = platforms.unix;
};
}

View file

@ -1,25 +0,0 @@
{ stdenv, fetchurl, autoreconfHook, libGL, libGLU }:
let version = "1.0"; in
stdenv.mkDerivation {
pname = "libtxc_dxtn_s2tc";
inherit version;
src = fetchurl {
url = "https://github.com/divVerent/s2tc/archive/v${version}.tar.gz";
sha256 = "0ibfdib277fhbqvxzan0bmglwnsl1y1rw2g8skvz82l1sfmmn752";
};
nativeBuildInputs = [ autoreconfHook ];
buildInputs = [ libGL libGLU ];
meta = {
description = "A patent-free S3TC compatible implementation";
homepage = "https://github.com/divVerent/s2tc";
repositories.git = "https://github.com/divVerent/s2tc.git";
license = stdenv.lib.licenses.mit;
platforms = stdenv.lib.platforms.linux;
maintainers = [ stdenv.lib.maintainers.cpages ];
};
}

View file

@ -9,7 +9,6 @@
{ lib, stdenv, callPackage,
wineRelease ? "stable",
wineBuild ? if stdenv.hostPlatform.system == "x86_64-linux" then "wineWow" else "wine32",
libtxc_dxtn_Name ? "libtxc_dxtn_s2tc",
pngSupport ? false,
jpegSupport ? false,
tiffSupport ? false,
@ -63,7 +62,6 @@ let wine-build = build: release:
in if wineRelease == "staging" then
callPackage ./staging.nix {
inherit libtxc_dxtn_Name;
wineUnstable = wine-build wineBuild "unstable";
}
else

View file

@ -1,4 +1,4 @@
{ stdenv, callPackage, wineUnstable, libtxc_dxtn_Name }:
{ stdenv, callPackage, wineUnstable }:
with callPackage ./util.nix {};
@ -8,7 +8,7 @@ let patch = (callPackage ./sources.nix {}).staging;
in assert stdenv.lib.getVersion wineUnstable == patch.version;
stdenv.lib.overrideDerivation wineUnstable (self: {
buildInputs = build-inputs [ "perl" "utillinux" "autoconf" libtxc_dxtn_Name ] self.buildInputs;
buildInputs = build-inputs [ "perl" "utillinux" "autoconf" ] self.buildInputs;
name = "${self.name}-staging";

View file

@ -245,6 +245,8 @@ mapAliases ({
librecad2 = librecad; # backwards compatibility alias, added 2015-10
libsysfs = sysfsutils; # added 2018-04-25
libtidy = html-tidy; # added 2014-12-21
libtxc_dxtn = throw "removed 2020-03-16, now integrated in Mesa";
libtxc_dxtn_s2tc = throw "removed 2020-03-16, now integrated in Mesa";
libudev = udev; # added 2018-04-25
libsexy = throw "libsexy has been removed from nixpkgs, as it's abandoned and no package needed it."; # 2019-12-10
links = links2; # added 2016-01-31

View file

@ -13278,10 +13278,6 @@ in
libtsm = callPackage ../development/libraries/libtsm { };
libtxc_dxtn = callPackage ../development/libraries/libtxc_dxtn { };
libtxc_dxtn_s2tc = callPackage ../development/libraries/libtxc_dxtn_s2tc { };
libgeotiff = callPackage ../development/libraries/libgeotiff { };
libu2f-host = callPackage ../development/libraries/libu2f-host { };