uboot: (firmwareOdroidC2/C4) don't invoke patch tool, use patches = [] instead
https://github.com/NixOS/nixpkgs/blob/master/pkgs/stdenv/generic/setup.sh#L948 this can do it nicely. Signed-off-by: Anton Arapov <anton@deadbeef.mx>
This commit is contained in:
commit
56de2bcd43
30691 changed files with 3076956 additions and 0 deletions
|
|
@ -0,0 +1,25 @@
|
|||
{ lib, stdenv, fetchurl }:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "b43-fwcutter";
|
||||
version = "019";
|
||||
|
||||
src = fetchurl {
|
||||
url = "https://bues.ch/b43/fwcutter/b43-fwcutter-${version}.tar.bz2";
|
||||
sha256 = "1ki1f5fy3yrw843r697f8mqqdz0pbsbqnvg4yzkhibpn1lqqbsnn";
|
||||
};
|
||||
|
||||
patches = [ ./no-root-install.patch ];
|
||||
|
||||
makeFlags = [
|
||||
"PREFIX=$(out)"
|
||||
"CC=${stdenv.cc.targetPrefix}cc"
|
||||
];
|
||||
|
||||
meta = {
|
||||
description = "Firmware extractor for cards supported by the b43 kernel module";
|
||||
homepage = "http://wireless.kernel.org/en/users/Drivers/b43";
|
||||
license = lib.licenses.free;
|
||||
platforms = lib.platforms.linux;
|
||||
};
|
||||
}
|
||||
|
|
@ -0,0 +1,18 @@
|
|||
diff -Naur b43-fwcutter-015-orig/Makefile b43-fwcutter-015/Makefile
|
||||
--- b43-fwcutter-015-orig/Makefile 2011-08-21 08:17:01.000000000 -0400
|
||||
+++ b43-fwcutter-015/Makefile 2012-07-13 17:57:53.002154557 -0400
|
||||
@@ -51,10 +51,10 @@
|
||||
$(QUIET_CC) $(CFLAGS) -o $(BIN) $(call OBJS,$(SRCS)) $(LDFLAGS)
|
||||
|
||||
install: all
|
||||
- install -d -o 0 -g 0 -m 755 $(PREFIX)/bin/
|
||||
- install -o 0 -g 0 -m 755 $(BIN) $(PREFIX)/bin/
|
||||
- install -d -o 0 -g 0 -m 755 $(PREFIX)/man/man1/
|
||||
- install -o 0 -g 0 -m 644 $(BIN).1 $(PREFIX)/man/man1/
|
||||
+ install -d -m 755 $(PREFIX)/bin/
|
||||
+ install -m 755 $(BIN) $(PREFIX)/bin/
|
||||
+ install -d -m 755 $(PREFIX)/man/man1/
|
||||
+ install -m 644 $(BIN).1 $(PREFIX)/man/man1/
|
||||
|
||||
clean:
|
||||
-rm -Rf obj dep *.orig *.rej *~
|
||||
27
pkgs/os-specific/linux/firmware/b43-firmware/5.1.138.nix
Normal file
27
pkgs/os-specific/linux/firmware/b43-firmware/5.1.138.nix
Normal file
|
|
@ -0,0 +1,27 @@
|
|||
{ lib, stdenv, fetchurl, b43FirmwareCutter }:
|
||||
|
||||
let version = "5.100.138"; in
|
||||
|
||||
stdenv.mkDerivation {
|
||||
pname = "b43-firmware";
|
||||
inherit version;
|
||||
|
||||
src = fetchurl {
|
||||
url = "http://www.lwfinger.com/b43-firmware/broadcom-wl-${version}.tar.bz2";
|
||||
sha256 = "0vz4ka8gycf72gmnaq61k8rh8y17j1wm2k3fidxvcqjvmix0drzi";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [ b43FirmwareCutter ];
|
||||
|
||||
installPhase = ''
|
||||
mkdir -p $out/lib/firmware
|
||||
b43-fwcutter -w $out/lib/firmware linux/wl_apsta.o
|
||||
'';
|
||||
|
||||
meta = {
|
||||
description = "Firmware for cards supported by the b43 kernel module";
|
||||
homepage = "https://wireless.wiki.kernel.org/en/users/drivers/b43";
|
||||
license = lib.licenses.unfree;
|
||||
};
|
||||
}
|
||||
|
||||
27
pkgs/os-specific/linux/firmware/b43-firmware/6.30.163.46.nix
Normal file
27
pkgs/os-specific/linux/firmware/b43-firmware/6.30.163.46.nix
Normal file
|
|
@ -0,0 +1,27 @@
|
|||
{ lib, stdenv, fetchurl, b43FirmwareCutter }:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "b43-firmware";
|
||||
version = "6.30.163.46";
|
||||
|
||||
src = fetchurl {
|
||||
url = "http://www.lwfinger.com/b43-firmware/broadcom-wl-${version}.tar.bz2";
|
||||
sha256 = "0baw6gcnrhxbb447msv34xg6rmlcj0gm3ahxwvdwfcvq4xmknz50";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [ b43FirmwareCutter ];
|
||||
|
||||
sourceRoot = ".";
|
||||
|
||||
installPhase = ''
|
||||
mkdir -p $out/lib/firmware
|
||||
b43-fwcutter -w $out/lib/firmware *.wl_apsta.o
|
||||
'';
|
||||
|
||||
meta = with lib; {
|
||||
description = "Firmware for cards supported by the b43 kernel module";
|
||||
homepage = "https://wireless.wiki.kernel.org/en/users/drivers/b43";
|
||||
downloadPage = "http://www.lwfinger.com/b43-firmware";
|
||||
license = licenses.unfree;
|
||||
};
|
||||
}
|
||||
|
|
@ -0,0 +1,46 @@
|
|||
{ lib, stdenv, fetchurl, cabextract, bt-fw-converter }:
|
||||
|
||||
# Kernels between 4.2 and 4.7 will not work with
|
||||
# this packages as they expect the firmware to be named "BCM.hcd"
|
||||
# see: https://github.com/NixOS/nixpkgs/pull/25478#issuecomment-299034865
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "broadcom-bt-firmware";
|
||||
version = "12.0.1.1012";
|
||||
|
||||
src = fetchurl {
|
||||
url = "http://download.windowsupdate.com/c/msdownload/update/driver/drvs/2017/04/852bb503-de7b-4810-a7dd-cbab62742f09_7cf83a4c194116648d17707ae37d564f9c70bec2.cab";
|
||||
sha256 = "1b1qjwxjk4y91l3iz157kms8601n0mmiik32cs6w9b1q4sl4pxx9";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [ cabextract bt-fw-converter ];
|
||||
|
||||
unpackCmd = ''
|
||||
mkdir -p ${pname}-${version}
|
||||
cabextract $src --directory ${pname}-${version}
|
||||
'';
|
||||
|
||||
installPhase = ''
|
||||
mkdir -p $out/lib/firmware/brcm
|
||||
bt-fw-converter -f bcbtums.inf -o $out/lib/firmware/brcm
|
||||
for filename in $out/lib/firmware/brcm/*.hcd
|
||||
do
|
||||
linkname=$(basename $filename | awk 'match($0,/^(BCM)[0-9A-Z]+(-[0-9a-z]{4}-[0-9a-z]{4}\.hcd)$/,c) { print c[1]c[2] }')
|
||||
if ! [ -z $linkname ]
|
||||
then
|
||||
ln -s --relative -T $filename $out/lib/firmware/brcm/$linkname
|
||||
fi
|
||||
done
|
||||
'';
|
||||
|
||||
outputHashMode = "recursive";
|
||||
outputHashAlgo = "sha256";
|
||||
outputHash = "042frb2dmrqfj8q83h5p769q6hg2b3i8fgnyvs9r9a71z7pbsagq";
|
||||
|
||||
meta = with lib; {
|
||||
description = "Firmware for Broadcom WIDCOMM® Bluetooth devices";
|
||||
homepage = "https://www.catalog.update.microsoft.com/Search.aspx?q=Broadcom+bluetooth";
|
||||
license = licenses.unfree;
|
||||
platforms = platforms.linux;
|
||||
maintainers = with maintainers; [ zraexy ];
|
||||
};
|
||||
}
|
||||
35
pkgs/os-specific/linux/firmware/bt-fw-converter/default.nix
Normal file
35
pkgs/os-specific/linux/firmware/bt-fw-converter/default.nix
Normal file
|
|
@ -0,0 +1,35 @@
|
|||
{ lib, stdenv, fetchurl, makeWrapper, perl, perlPackages, bluez }:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "bt-fw-converter";
|
||||
version = "2017-02-19";
|
||||
rev = "2d8b34402df01c6f7f4b8622de9e8b82fadf4153";
|
||||
|
||||
src = fetchurl {
|
||||
url = "https://raw.githubusercontent.com/winterheart/broadcom-bt-firmware/${rev}/tools/bt-fw-converter.pl";
|
||||
sha256 = "c259b414a4a273c89a0fa7159b3ef73d1ea62b6de91c3a7c2fcc832868e39f4b";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [ makeWrapper ];
|
||||
|
||||
buildInputs = [ perl perlPackages.RegexpGrammars bluez ];
|
||||
|
||||
unpackCmd = ''
|
||||
mkdir -p ${pname}-${version}
|
||||
cp $src ${pname}-${version}/bt-fw-converter.pl
|
||||
'';
|
||||
|
||||
installPhase = ''
|
||||
install -D -m755 bt-fw-converter.pl $out/bin/bt-fw-converter
|
||||
substituteInPlace $out/bin/bt-fw-converter --replace /usr/bin/hex2hcd ${bluez}/bin/hex2hcd
|
||||
wrapProgram $out/bin/bt-fw-converter --set PERL5LIB $PERL5LIB
|
||||
'';
|
||||
|
||||
meta = with lib; {
|
||||
homepage = "https://github.com/winterheart/broadcom-bt-firmware/";
|
||||
description = "A tool that converts hex to hcd based on inf file";
|
||||
license = licenses.mit;
|
||||
platforms = platforms.linux;
|
||||
maintainers = with maintainers; [ zraexy ];
|
||||
};
|
||||
}
|
||||
|
|
@ -0,0 +1,62 @@
|
|||
{ lib, stdenv, fetchurl, unrar-wrapper, pkgs }:
|
||||
|
||||
let
|
||||
|
||||
version = "5.1.5769";
|
||||
|
||||
|
||||
# Described on https://github.com/patjak/facetimehd/wiki/Extracting-the-sensor-calibration-files
|
||||
|
||||
# From the wiki page, range extracted with binwalk:
|
||||
zipUrl = "https://download.info.apple.com/Mac_OS_X/031-30890-20150812-ea191174-4130-11e5-a125-930911ba098f/bootcamp${version}.zip";
|
||||
zipRange = "2338085-3492508"; # the whole download is 518MB, this deflate stream is 1.2MB
|
||||
|
||||
# CRC and length from the ZIP entry header (not strictly necessary, but makes it extract cleanly):
|
||||
gzFooter = ''\x51\x1f\x86\x78\xcf\x5b\x12\x00'';
|
||||
|
||||
# Also from the wiki page:
|
||||
calibrationFiles = [
|
||||
{ file = "1771_01XX.dat"; offset = "1644880"; size = "19040"; }
|
||||
{ file = "1871_01XX.dat"; offset = "1606800"; size = "19040"; }
|
||||
{ file = "1874_01XX.dat"; offset = "1625840"; size = "19040"; }
|
||||
{ file = "9112_01XX.dat"; offset = "1663920"; size = "33060"; }
|
||||
];
|
||||
|
||||
in
|
||||
|
||||
stdenv.mkDerivation {
|
||||
|
||||
pname = "facetimehd-calibration";
|
||||
inherit version;
|
||||
src = fetchurl {
|
||||
url = zipUrl;
|
||||
sha256 = "1dzyv457fp6d8ly29sivqn6llwj5ydygx7p8kzvdnsp11zvid2xi";
|
||||
curlOpts = "-r ${zipRange}";
|
||||
};
|
||||
|
||||
dontUnpack = true;
|
||||
dontInstall = true;
|
||||
|
||||
buildInputs = [ unrar-wrapper ];
|
||||
|
||||
buildPhase = ''
|
||||
{ printf '\x1f\x8b\x08\x00\x00\x00\x00\x00\x00\x00'
|
||||
cat $src
|
||||
printf '${gzFooter}'
|
||||
} | zcat > AppleCamera64.exe
|
||||
unrar x AppleCamera64.exe AppleCamera.sys
|
||||
|
||||
mkdir -p $out/lib/firmware/facetimehd
|
||||
'' + lib.concatMapStrings ({file, offset, size}: ''
|
||||
dd bs=1 skip=${offset} count=${size} if=AppleCamera.sys of=$out/lib/firmware/facetimehd/${file}
|
||||
'') calibrationFiles;
|
||||
|
||||
meta = with lib; {
|
||||
description = "facetimehd calibration";
|
||||
homepage = "https://support.apple.com/kb/DL1837";
|
||||
license = licenses.unfree;
|
||||
maintainers = with maintainers; [ alexshpilkin womfoo grahamc ];
|
||||
platforms = [ "i686-linux" "x86_64-linux" ];
|
||||
};
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,66 @@
|
|||
{ lib, stdenv, fetchurl, cpio, xz, pkgs }:
|
||||
|
||||
let
|
||||
|
||||
version = "1.43_5";
|
||||
|
||||
|
||||
# Updated according to https://github.com/patjak/bcwc_pcie/pull/81/files
|
||||
# and https://github.com/patjak/bcwc_pcie/blob/5a7083bd98b38ef3bd223f7ee531d58f4fb0fe7c/firmware/Makefile#L3-L9
|
||||
# and https://github.com/patjak/bcwc_pcie/blob/5a7083bd98b38ef3bd223f7ee531d58f4fb0fe7c/firmware/extract-firmware.sh
|
||||
|
||||
# From the Makefile:
|
||||
dmgUrl = "https://updates.cdn-apple.com/2019/cert/041-88431-20191011-e7ee7d98-2878-4cd9-bc0a-d98b3a1e24b1/OSXUpd10.11.5.dmg";
|
||||
dmgRange = "204909802-207733123"; # the whole download is 1.3GB, this cuts it down to 2MB
|
||||
# Notes:
|
||||
# 1. Be sure to update the sha256 below in the fetch_url
|
||||
# 2. Be sure to update the homepage in the meta
|
||||
|
||||
# Also from the Makefile (OS_DRV, OS_DRV_DIR), but seems to not change:
|
||||
firmwareIn = "./System/Library/Extensions/AppleCameraInterface.kext/Contents/MacOS/AppleCameraInterface";
|
||||
firmwareOut = "firmware.bin";
|
||||
|
||||
# The following are from the extract-firmware.sh
|
||||
firmwareOffset = "81920"; # Variable: firmw_offsets
|
||||
firmwareSize = "603715"; # Variable: firmw_sizes
|
||||
|
||||
|
||||
# separated this here as the script will fail without the 'exit 0'
|
||||
unpack = pkgs.writeScriptBin "unpack" ''
|
||||
xzcat -Q $src | cpio --format odc -i -d ${firmwareIn}
|
||||
exit 0
|
||||
'';
|
||||
|
||||
in
|
||||
|
||||
stdenv.mkDerivation {
|
||||
|
||||
pname = "facetimehd-firmware";
|
||||
inherit version;
|
||||
src = fetchurl {
|
||||
url = dmgUrl;
|
||||
sha256 = "0s8crlh8rvpanzk1w4z3hich0a3mw0m5xhpcg07bxy02calhpdk1";
|
||||
curlOpts = "-r ${dmgRange}";
|
||||
};
|
||||
|
||||
dontUnpack = true;
|
||||
dontInstall = true;
|
||||
|
||||
buildInputs = [ cpio xz ];
|
||||
|
||||
buildPhase = ''
|
||||
${unpack}/bin/unpack
|
||||
dd bs=1 skip=${firmwareOffset} count=${firmwareSize} if=${firmwareIn} of=${firmwareOut}.gz &> /dev/null
|
||||
mkdir -p $out/lib/firmware/facetimehd
|
||||
gunzip -c ${firmwareOut}.gz > $out/lib/firmware/facetimehd/${firmwareOut}
|
||||
'';
|
||||
|
||||
meta = with lib; {
|
||||
description = "facetimehd firmware";
|
||||
homepage = "https://support.apple.com/kb/DL1877";
|
||||
license = licenses.unfree;
|
||||
maintainers = with maintainers; [ womfoo grahamc ];
|
||||
platforms = [ "i686-linux" "x86_64-linux" ];
|
||||
};
|
||||
|
||||
}
|
||||
38
pkgs/os-specific/linux/firmware/firmware-manager/default.nix
Normal file
38
pkgs/os-specific/linux/firmware/firmware-manager/default.nix
Normal file
|
|
@ -0,0 +1,38 @@
|
|||
{ rustPlatform, lib, fetchFromGitHub, xz, pkg-config, openssl, dbus, glib, udev, cairo, pango, atk, gdk-pixbuf, gtk3, wrapGAppsHook }:
|
||||
rustPlatform.buildRustPackage rec {
|
||||
pname = "firmware-manager";
|
||||
version = "0.1.2";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "pop-os";
|
||||
repo = pname;
|
||||
rev = version;
|
||||
sha256 = "sha256-aKatdjHa/k7j48upkR1O6PFxCUfJYE3KhhzZ9Ohe0Jc=";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [ pkg-config wrapGAppsHook ];
|
||||
|
||||
buildInputs = [ xz openssl dbus glib udev cairo pango atk gdk-pixbuf gtk3 ];
|
||||
|
||||
depsExtraArgs.postPatch = "make prefix='$(out)' toml-gen";
|
||||
|
||||
postPatch = ''
|
||||
sed -i 's|etc|$(prefix)/etc|' Makefile
|
||||
'';
|
||||
|
||||
buildPhase = "make prefix='$(out)'";
|
||||
|
||||
installPhase = "make prefix='$(out)' install";
|
||||
|
||||
cargoSha256 = "sha256-BUo77ERHvuc8IkDdU3Z/gZZicNHT26IbAgEBnVM3O4U=";
|
||||
|
||||
doCheck = false;
|
||||
|
||||
meta = {
|
||||
description = "Graphical frontend for firmware management";
|
||||
homepage = "https://github.com/pop-os/firmware-manager";
|
||||
license = lib.licenses.gpl3;
|
||||
maintainers = [ lib.maintainers.shlevy ];
|
||||
platforms = lib.platforms.linux;
|
||||
};
|
||||
}
|
||||
27
pkgs/os-specific/linux/firmware/firmware-updater/default.nix
Normal file
27
pkgs/os-specific/linux/firmware/firmware-updater/default.nix
Normal file
|
|
@ -0,0 +1,27 @@
|
|||
{ lib
|
||||
, flutter
|
||||
, fetchFromGitHub
|
||||
}:
|
||||
|
||||
flutter.mkFlutterApp {
|
||||
pname = "firmware-updater";
|
||||
version = "unstable";
|
||||
|
||||
vendorHash = "sha256-L8am4vTx4KlMHUdIhrUsCxGc27vkolawS/9DyFCPOJQ=";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "canonical";
|
||||
repo = "firmware-updater";
|
||||
rev = "a51817a2551e29895352618a91df9cf93d944af1";
|
||||
sha256 = "6uhks6a9JcyIC5o0VssqfBlE4pqKiQ7d3KOb6feNTvU=";
|
||||
fetchSubmodules = true;
|
||||
};
|
||||
|
||||
meta = with lib; {
|
||||
description = "Firmware Updater for Linux";
|
||||
homepage = "https://github.com/canonical/firmware-updater";
|
||||
license = licenses.gpl3Only;
|
||||
maintainers = with maintainers; [ mkg20001 ];
|
||||
platforms = platforms.linux;
|
||||
};
|
||||
}
|
||||
56
pkgs/os-specific/linux/firmware/fwupd-efi/default.nix
Normal file
56
pkgs/os-specific/linux/firmware/fwupd-efi/default.nix
Normal file
|
|
@ -0,0 +1,56 @@
|
|||
{ lib
|
||||
, stdenv
|
||||
, fetchurl
|
||||
, fetchFromGitHub
|
||||
, substituteAll
|
||||
, pkg-config
|
||||
, meson
|
||||
, ninja
|
||||
, gnu-efi
|
||||
, python3
|
||||
}:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "fwupd-efi";
|
||||
version = "1.2";
|
||||
|
||||
src = fetchurl {
|
||||
url = "https://people.freedesktop.org/~hughsient/releases/${pname}-${version}.tar.xz";
|
||||
sha256 = "sha256-aRx38RwhAQSNjauvY8bQ/iLPrQ5dQyIEHJurzrr86z8=";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [
|
||||
meson
|
||||
ninja
|
||||
pkg-config
|
||||
python3
|
||||
];
|
||||
|
||||
buildInputs = [
|
||||
gnu-efi
|
||||
];
|
||||
|
||||
postPatch = ''
|
||||
patchShebangs \
|
||||
efi/generate_binary.py \
|
||||
efi/generate_sbat.py
|
||||
'';
|
||||
|
||||
mesonFlags = [
|
||||
"-Defi-includedir=${gnu-efi}/include/efi"
|
||||
"-Defi-libdir=${gnu-efi}/lib"
|
||||
"-Defi-ldsdir=${gnu-efi}/lib"
|
||||
"-Defi_sbat_distro_id=nixos"
|
||||
"-Defi_sbat_distro_summary=NixOS"
|
||||
"-Defi_sbat_distro_pkgname=${pname}"
|
||||
"-Defi_sbat_distro_version=${version}"
|
||||
"-Defi_sbat_distro_url=https://search.nixos.org/packages?channel=unstable&show=fwupd-efi&from=0&size=50&sort=relevance&query=fwupd-efi"
|
||||
];
|
||||
|
||||
meta = with lib; {
|
||||
homepage = "https://fwupd.org/";
|
||||
maintainers = with maintainers; [ maxeaubrey ];
|
||||
license = licenses.lgpl21Plus;
|
||||
platforms = platforms.linux;
|
||||
};
|
||||
}
|
||||
|
|
@ -0,0 +1,183 @@
|
|||
diff --git a/data/meson.build b/data/meson.build
|
||||
index 2ae29ce5..342cac92 100644
|
||||
--- a/data/meson.build
|
||||
+++ b/data/meson.build
|
||||
@@ -26,7 +26,7 @@ endif
|
||||
|
||||
if build_standalone
|
||||
install_data(['daemon.conf'],
|
||||
- install_dir : join_paths(sysconfdir, 'fwupd')
|
||||
+ install_dir : join_paths(sysconfdir_install, 'fwupd')
|
||||
)
|
||||
install_data(['power.quirk', 'cfi.quirk'],
|
||||
install_dir: join_paths(datadir, 'fwupd', 'quirks.d'))
|
||||
diff --git a/data/pki/meson.build b/data/pki/meson.build
|
||||
index 2a7d0f24..091981f7 100644
|
||||
--- a/data/pki/meson.build
|
||||
+++ b/data/pki/meson.build
|
||||
@@ -12,13 +12,13 @@ install_data([
|
||||
'GPG-KEY-Linux-Foundation-Firmware',
|
||||
'GPG-KEY-Linux-Vendor-Firmware-Service',
|
||||
],
|
||||
- install_dir : join_paths(sysconfdir, 'pki', 'fwupd')
|
||||
+ install_dir : join_paths(sysconfdir_install, 'pki', 'fwupd')
|
||||
)
|
||||
install_data([
|
||||
'GPG-KEY-Linux-Foundation-Metadata',
|
||||
'GPG-KEY-Linux-Vendor-Firmware-Service',
|
||||
],
|
||||
- install_dir : join_paths(sysconfdir, 'pki', 'fwupd-metadata')
|
||||
+ install_dir : join_paths(sysconfdir_install, 'pki', 'fwupd-metadata')
|
||||
)
|
||||
endif
|
||||
|
||||
@@ -26,11 +26,11 @@ if supported_pkcs7 == '1'
|
||||
install_data([
|
||||
'LVFS-CA.pem',
|
||||
],
|
||||
- install_dir : join_paths(sysconfdir, 'pki', 'fwupd')
|
||||
+ install_dir : join_paths(sysconfdir_install, 'pki', 'fwupd')
|
||||
)
|
||||
install_data([
|
||||
'LVFS-CA.pem',
|
||||
],
|
||||
- install_dir : join_paths(sysconfdir, 'pki', 'fwupd-metadata')
|
||||
+ install_dir : join_paths(sysconfdir_install, 'pki', 'fwupd-metadata')
|
||||
)
|
||||
endif
|
||||
diff --git a/data/remotes.d/meson.build b/data/remotes.d/meson.build
|
||||
index 02d8777b..2c89d593 100644
|
||||
--- a/data/remotes.d/meson.build
|
||||
+++ b/data/remotes.d/meson.build
|
||||
@@ -2,7 +2,7 @@ if build_standalone and get_option('lvfs') != 'false'
|
||||
install_data([
|
||||
'lvfs-testing.conf',
|
||||
],
|
||||
- install_dir : join_paths(sysconfdir, 'fwupd', 'remotes.d')
|
||||
+ install_dir : join_paths(sysconfdir_install, 'fwupd', 'remotes.d')
|
||||
)
|
||||
con3 = configuration_data()
|
||||
if get_option('lvfs') == 'disabled'
|
||||
@@ -15,7 +15,7 @@ if build_standalone and get_option('lvfs') != 'false'
|
||||
output : 'lvfs.conf',
|
||||
configuration : con3,
|
||||
install: true,
|
||||
- install_dir: join_paths(sysconfdir, 'fwupd', 'remotes.d'),
|
||||
+ install_dir: join_paths(sysconfdir_install, 'fwupd', 'remotes.d'),
|
||||
)
|
||||
i18n.merge_file(
|
||||
input: 'lvfs.metainfo.xml',
|
||||
@@ -49,12 +49,12 @@ configure_file(
|
||||
output : 'vendor.conf',
|
||||
configuration : con2,
|
||||
install: true,
|
||||
- install_dir: join_paths(sysconfdir, 'fwupd', 'remotes.d'),
|
||||
+ install_dir: join_paths(sysconfdir_install, 'fwupd', 'remotes.d'),
|
||||
)
|
||||
configure_file(
|
||||
input : 'vendor-directory.conf',
|
||||
output : 'vendor-directory.conf',
|
||||
configuration : con2,
|
||||
install: true,
|
||||
- install_dir: join_paths(sysconfdir, 'fwupd', 'remotes.d'),
|
||||
+ install_dir: join_paths(sysconfdir_install, 'fwupd', 'remotes.d'),
|
||||
)
|
||||
diff --git a/meson.build b/meson.build
|
||||
index 394f40fa..7b602c73 100644
|
||||
--- a/meson.build
|
||||
+++ b/meson.build
|
||||
@@ -187,6 +187,12 @@ endif
|
||||
mandir = join_paths(prefix, get_option('mandir'))
|
||||
localedir = join_paths(prefix, get_option('localedir'))
|
||||
|
||||
+if get_option('sysconfdir_install') != ''
|
||||
+ sysconfdir_install = join_paths(prefix, get_option('sysconfdir_install'))
|
||||
+else
|
||||
+ sysconfdir_install = sysconfdir
|
||||
+endif
|
||||
+
|
||||
diffcmd = find_program('diff')
|
||||
gio = dependency('gio-2.0', version : '>= 2.45.8')
|
||||
giounix = dependency('gio-unix-2.0', version : '>= 2.45.8', required: false)
|
||||
diff --git a/meson_options.txt b/meson_options.txt
|
||||
index c1b483cb..047dbdd8 100644
|
||||
--- a/meson_options.txt
|
||||
+++ b/meson_options.txt
|
||||
@@ -1,3 +1,4 @@
|
||||
+option('sysconfdir_install', type: 'string', value: '', description: 'sysconfdir to use during installation')
|
||||
option('build', type : 'combo', choices : ['all', 'standalone', 'library'], value : 'all', description : 'build type')
|
||||
option('consolekit', type : 'boolean', value : true, description : 'enable ConsoleKit support')
|
||||
option('static_analysis', type : 'boolean', value : false, description : 'enable GCC static analysis support')
|
||||
diff --git a/plugins/dell-esrt/meson.build b/plugins/dell-esrt/meson.build
|
||||
index e9f12879..a0126dbb 100644
|
||||
--- a/plugins/dell-esrt/meson.build
|
||||
+++ b/plugins/dell-esrt/meson.build
|
||||
@@ -38,6 +38,6 @@ configure_file(
|
||||
output : 'dell-esrt.conf',
|
||||
configuration : con2,
|
||||
install: true,
|
||||
- install_dir: join_paths(sysconfdir, 'fwupd', 'remotes.d'),
|
||||
+ install_dir: join_paths(sysconfdir_install, 'fwupd', 'remotes.d'),
|
||||
)
|
||||
endif
|
||||
diff --git a/plugins/msr/meson.build b/plugins/msr/meson.build
|
||||
index 3ea47456..40dbd116 100644
|
||||
--- a/plugins/msr/meson.build
|
||||
+++ b/plugins/msr/meson.build
|
||||
@@ -12,7 +12,7 @@ install_data(['fwupd-msr.conf'],
|
||||
endif
|
||||
|
||||
install_data(['msr.conf'],
|
||||
- install_dir: join_paths(sysconfdir, 'fwupd')
|
||||
+ install_dir: join_paths(sysconfdir_install, 'fwupd')
|
||||
)
|
||||
shared_module('fu_plugin_msr',
|
||||
fu_hash,
|
||||
diff --git a/plugins/redfish/meson.build b/plugins/redfish/meson.build
|
||||
index 4a0a8664..7d9ba77d 100644
|
||||
--- a/plugins/redfish/meson.build
|
||||
+++ b/plugins/redfish/meson.build
|
||||
@@ -53,7 +53,7 @@ shared_module('fu_plugin_redfish',
|
||||
)
|
||||
|
||||
install_data(['redfish.conf'],
|
||||
- install_dir: join_paths(sysconfdir, 'fwupd'),
|
||||
+ install_dir: join_paths(sysconfdir_install, 'fwupd'),
|
||||
)
|
||||
|
||||
if get_option('tests')
|
||||
diff --git a/plugins/thunderbolt/meson.build b/plugins/thunderbolt/meson.build
|
||||
index 1ba9562f..c074f770 100644
|
||||
--- a/plugins/thunderbolt/meson.build
|
||||
+++ b/plugins/thunderbolt/meson.build
|
||||
@@ -37,7 +37,7 @@ fu_plugin_thunderbolt = shared_module('fu_plugin_thunderbolt',
|
||||
)
|
||||
|
||||
install_data(['thunderbolt.conf'],
|
||||
- install_dir: join_paths(sysconfdir, 'fwupd')
|
||||
+ install_dir: join_paths(sysconfdir_install, 'fwupd')
|
||||
)
|
||||
# we use functions from 2.52 in the tests
|
||||
if get_option('tests') and umockdev.found() and gio.version().version_compare('>= 2.52')
|
||||
diff --git a/plugins/uefi-capsule/meson.build b/plugins/uefi-capsule/meson.build
|
||||
index 04cbd51a..9a8c43de 100644
|
||||
--- a/plugins/uefi-capsule/meson.build
|
||||
+++ b/plugins/uefi-capsule/meson.build
|
||||
@@ -21,7 +21,7 @@ if host_machine.system() == 'linux'
|
||||
output : '35_fwupd',
|
||||
configuration : con2,
|
||||
install: true,
|
||||
- install_dir: join_paths(sysconfdir, 'grub.d')
|
||||
+ install_dir: join_paths(sysconfdir_install, 'grub.d')
|
||||
)
|
||||
elif host_machine.system() == 'freebsd'
|
||||
backend_srcs += 'fu-uefi-backend-freebsd.c'
|
||||
@@ -114,7 +114,7 @@ if get_option('compat_cli') and get_option('man')
|
||||
endif
|
||||
|
||||
install_data(['uefi_capsule.conf'],
|
||||
- install_dir: join_paths(sysconfdir, 'fwupd')
|
||||
+ install_dir: join_paths(sysconfdir_install, 'fwupd')
|
||||
)
|
||||
|
||||
# add all the .po files as inputs to watch
|
||||
384
pkgs/os-specific/linux/firmware/fwupd/default.nix
Normal file
384
pkgs/os-specific/linux/firmware/fwupd/default.nix
Normal file
|
|
@ -0,0 +1,384 @@
|
|||
# Updating? Keep $out/etc synchronized with passthru keys
|
||||
|
||||
{ stdenv
|
||||
, lib
|
||||
, fetchurl
|
||||
, fetchFromGitHub
|
||||
, gtk-doc
|
||||
, pkg-config
|
||||
, gobject-introspection
|
||||
, gettext
|
||||
, libgudev
|
||||
, polkit
|
||||
, libxmlb
|
||||
, glib
|
||||
, gusb
|
||||
, sqlite
|
||||
, libarchive
|
||||
, curl
|
||||
, libjcat
|
||||
, libxslt
|
||||
, elfutils
|
||||
, libsmbios
|
||||
, efivar
|
||||
, valgrind
|
||||
, meson
|
||||
, libuuid
|
||||
, colord
|
||||
, docbook_xml_dtd_43
|
||||
, docbook-xsl-nons
|
||||
, ninja
|
||||
, gcab
|
||||
, gnutls
|
||||
, protobufc
|
||||
, python3
|
||||
, wrapGAppsHook
|
||||
, json-glib
|
||||
, bash-completion
|
||||
, shared-mime-info
|
||||
, umockdev
|
||||
, vala
|
||||
, makeFontsConf
|
||||
, freefont_ttf
|
||||
, pango
|
||||
, tpm2-tss
|
||||
, bubblewrap
|
||||
, efibootmgr
|
||||
, flashrom
|
||||
, tpm2-tools
|
||||
, fwupd-efi
|
||||
, nixosTests
|
||||
, runCommand
|
||||
, unstableGitUpdater
|
||||
, modemmanager
|
||||
, libqmi
|
||||
, libmbim
|
||||
, libcbor
|
||||
, xz
|
||||
}:
|
||||
|
||||
let
|
||||
python = python3.withPackages (p: with p; [
|
||||
pygobject3
|
||||
setuptools
|
||||
]);
|
||||
|
||||
isx86 = stdenv.hostPlatform.isx86;
|
||||
|
||||
# Dell isn't supported on Aarch64
|
||||
haveDell = isx86;
|
||||
|
||||
# only redfish for x86_64
|
||||
haveRedfish = stdenv.isx86_64;
|
||||
|
||||
# only use msr if x86 (requires cpuid)
|
||||
haveMSR = isx86;
|
||||
|
||||
# # Currently broken on Aarch64
|
||||
# haveFlashrom = isx86;
|
||||
# Experimental
|
||||
haveFlashrom = false;
|
||||
|
||||
runPythonCommand = name: buildCommandPython: runCommand name {
|
||||
nativeBuildInputs = [ python3 ];
|
||||
inherit buildCommandPython;
|
||||
} ''
|
||||
exec python3 -c "$buildCommandPython"
|
||||
'';
|
||||
|
||||
test-firmware =
|
||||
let
|
||||
version = "unstable-2021-11-02";
|
||||
src = fetchFromGitHub {
|
||||
name = "fwupd-test-firmware-${version}";
|
||||
owner = "fwupd";
|
||||
repo = "fwupd-test-firmware";
|
||||
rev = "aaa2f9fd68a40684c256dd85b86093cba38ffd9d";
|
||||
sha256 = "Slk7CNfkmvmOh3WtIBkPs3NYT96co6i8PwqcbpeVFgA=";
|
||||
passthru = {
|
||||
inherit src version; # For update script
|
||||
updateScript = unstableGitUpdater {
|
||||
url = "${test-firmware.meta.homepage}.git";
|
||||
};
|
||||
};
|
||||
};
|
||||
in
|
||||
src // {
|
||||
meta = src.meta // {
|
||||
# For update script
|
||||
position =
|
||||
let
|
||||
pos = builtins.unsafeGetAttrPos "updateScript" test-firmware;
|
||||
in
|
||||
pos.file + ":" + toString pos.line;
|
||||
};
|
||||
};
|
||||
|
||||
|
||||
self = stdenv.mkDerivation rec {
|
||||
pname = "fwupd";
|
||||
version = "1.8.0";
|
||||
|
||||
# libfwupd goes to lib
|
||||
# daemon, plug-ins and libfwupdplugin go to out
|
||||
# CLI programs go to out
|
||||
outputs = [ "out" "lib" "dev" "devdoc" "man" "installedTests" ];
|
||||
|
||||
src = fetchurl {
|
||||
url = "https://people.freedesktop.org/~hughsient/releases/fwupd-${version}.tar.xz";
|
||||
sha256 = "LAliLnOSowtORQQ0M4z2cNQzKMLyE/RsX//xAWifrps=";
|
||||
};
|
||||
|
||||
patches = [
|
||||
# Since /etc is the domain of NixOS, not Nix,
|
||||
# we cannot install files there.
|
||||
# Let’s install the files to $prefix/etc
|
||||
# while still reading them from /etc.
|
||||
# NixOS module for fwupd will take take care of copying the files appropriately.
|
||||
./add-option-for-installation-sysconfdir.patch
|
||||
|
||||
# Install plug-ins and libfwupdplugin to $out output,
|
||||
# they are not really part of the library.
|
||||
./install-fwupdplugin-to-out.patch
|
||||
|
||||
# Installed tests are installed to different output
|
||||
# we also cannot have fwupd-tests.conf in $out/etc since it would form a cycle.
|
||||
./installed-tests-path.patch
|
||||
|
||||
# EFI capsule is located in fwupd-efi now.
|
||||
./efi-app-path.patch
|
||||
];
|
||||
|
||||
nativeBuildInputs = [
|
||||
meson
|
||||
ninja
|
||||
gtk-doc
|
||||
pkg-config
|
||||
gobject-introspection
|
||||
gettext
|
||||
shared-mime-info
|
||||
valgrind
|
||||
gcab
|
||||
gnutls
|
||||
docbook_xml_dtd_43
|
||||
docbook-xsl-nons
|
||||
libxslt
|
||||
protobufc # for protoc
|
||||
python
|
||||
wrapGAppsHook
|
||||
vala
|
||||
];
|
||||
|
||||
buildInputs = [
|
||||
polkit
|
||||
libxmlb
|
||||
gusb
|
||||
sqlite
|
||||
libarchive
|
||||
curl
|
||||
elfutils
|
||||
libgudev
|
||||
colord
|
||||
libjcat
|
||||
libuuid
|
||||
json-glib
|
||||
umockdev
|
||||
bash-completion
|
||||
pango
|
||||
tpm2-tss
|
||||
efivar
|
||||
fwupd-efi
|
||||
protobufc
|
||||
modemmanager
|
||||
libmbim
|
||||
libcbor
|
||||
libqmi
|
||||
xz # for liblzma.
|
||||
] ++ lib.optionals haveDell [
|
||||
libsmbios
|
||||
] ++ lib.optionals haveFlashrom [
|
||||
flashrom
|
||||
];
|
||||
|
||||
mesonFlags = [
|
||||
"-Ddocs=gtkdoc"
|
||||
"-Dplugin_dummy=true"
|
||||
# We are building the official releases.
|
||||
"-Dsupported_build=enabled"
|
||||
# Would dlopen libsoup to preserve compatibility with clients linking against older fwupd.
|
||||
# https://github.com/fwupd/fwupd/commit/173d389fa59d8db152a5b9da7cc1171586639c97
|
||||
"-Dsoup_session_compat=false"
|
||||
"-Dudevdir=lib/udev"
|
||||
"-Dsystemd_root_prefix=${placeholder "out"}"
|
||||
"-Dinstalled_test_prefix=${placeholder "installedTests"}"
|
||||
"--localstatedir=/var"
|
||||
"--sysconfdir=/etc"
|
||||
"-Dsysconfdir_install=${placeholder "out"}/etc"
|
||||
"-Defi_os_dir=nixos"
|
||||
"-Dplugin_modem_manager=enabled"
|
||||
|
||||
# We do not want to place the daemon into lib (cyclic reference)
|
||||
"--libexecdir=${placeholder "out"}/libexec"
|
||||
# Our builder only adds $lib/lib to rpath but some things link
|
||||
# against libfwupdplugin which is in $out/lib.
|
||||
"-Dc_link_args=-Wl,-rpath,${placeholder "out"}/lib"
|
||||
] ++ lib.optionals (!haveDell) [
|
||||
"-Dplugin_dell=disabled"
|
||||
"-Dplugin_synaptics_mst=disabled"
|
||||
] ++ lib.optionals (!haveRedfish) [
|
||||
"-Dplugin_redfish=disabled"
|
||||
] ++ lib.optionals (!haveFlashrom) [
|
||||
"-Dplugin_flashrom=disabled"
|
||||
] ++ lib.optionals (!haveMSR) [
|
||||
"-Dplugin_msr=disabled"
|
||||
];
|
||||
|
||||
# TODO: wrapGAppsHook wraps efi capsule even though it is not ELF
|
||||
dontWrapGApps = true;
|
||||
|
||||
# /etc/os-release not available in sandbox
|
||||
# doCheck = true;
|
||||
|
||||
# Environment variables
|
||||
|
||||
# Fontconfig error: Cannot load default config file
|
||||
FONTCONFIG_FILE =
|
||||
let
|
||||
fontsConf = makeFontsConf {
|
||||
fontDirectories = [ freefont_ttf ];
|
||||
};
|
||||
in fontsConf;
|
||||
|
||||
# error: “PolicyKit files are missing”
|
||||
# https://github.com/NixOS/nixpkgs/pull/67625#issuecomment-525788428
|
||||
PKG_CONFIG_POLKIT_GOBJECT_1_ACTIONDIR = "/run/current-system/sw/share/polkit-1/actions";
|
||||
|
||||
# Phase hooks
|
||||
|
||||
postPatch = ''
|
||||
patchShebangs \
|
||||
contrib/generate-version-script.py \
|
||||
meson_post_install.sh \
|
||||
po/test-deps
|
||||
|
||||
substituteInPlace data/installed-tests/fwupdmgr-p2p.sh \
|
||||
--replace "gdbus" ${glib.bin}/bin/gdbus
|
||||
'';
|
||||
|
||||
preCheck = ''
|
||||
addToSearchPath XDG_DATA_DIRS "${shared-mime-info}/share"
|
||||
'';
|
||||
|
||||
preInstall = ''
|
||||
# We have pkexec on PATH so Meson will try to use it when installation fails
|
||||
# due to being unable to write to e.g. /etc.
|
||||
# Let’s pretend we already ran pkexec –
|
||||
# the pkexec on PATH would complain it lacks setuid bit,
|
||||
# obscuring the underlying error.
|
||||
# https://github.com/mesonbuild/meson/blob/492cc9bf95d573e037155b588dc5110ded4d9a35/mesonbuild/minstall.py#L558
|
||||
export PKEXEC_UID=-1
|
||||
'';
|
||||
|
||||
postInstall = ''
|
||||
# These files have weird licenses so they are shipped separately.
|
||||
cp --recursive --dereference "${test-firmware}/installed-tests/tests" "$installedTests/libexec/installed-tests/fwupd"
|
||||
'';
|
||||
|
||||
preFixup = let
|
||||
binPath = [
|
||||
efibootmgr
|
||||
bubblewrap
|
||||
tpm2-tools
|
||||
];
|
||||
in ''
|
||||
gappsWrapperArgs+=(
|
||||
--prefix XDG_DATA_DIRS : "${shared-mime-info}/share"
|
||||
# See programs reached with fu_common_find_program_in_path in source
|
||||
--prefix PATH : "${lib.makeBinPath binPath}"
|
||||
)
|
||||
'';
|
||||
|
||||
# Since we had to disable wrapGAppsHook, we need to wrap the executables manually.
|
||||
postFixup = ''
|
||||
find -L "$out/bin" "$out/libexec" -type f -executable -print0 \
|
||||
| while IFS= read -r -d ''' file; do
|
||||
if [[ "$file" != *.efi ]]; then
|
||||
echo "Wrapping program $file"
|
||||
wrapGApp "$file"
|
||||
fi
|
||||
done
|
||||
'';
|
||||
|
||||
separateDebugInfo = true;
|
||||
|
||||
passthru = {
|
||||
filesInstalledToEtc = [
|
||||
"fwupd/daemon.conf"
|
||||
"fwupd/remotes.d/lvfs-testing.conf"
|
||||
"fwupd/remotes.d/lvfs.conf"
|
||||
"fwupd/remotes.d/vendor.conf"
|
||||
"fwupd/remotes.d/vendor-directory.conf"
|
||||
"fwupd/thunderbolt.conf"
|
||||
"fwupd/uefi_capsule.conf"
|
||||
"pki/fwupd/GPG-KEY-Linux-Foundation-Firmware"
|
||||
"pki/fwupd/GPG-KEY-Linux-Vendor-Firmware-Service"
|
||||
"pki/fwupd/LVFS-CA.pem"
|
||||
"pki/fwupd-metadata/GPG-KEY-Linux-Foundation-Metadata"
|
||||
"pki/fwupd-metadata/GPG-KEY-Linux-Vendor-Firmware-Service"
|
||||
"pki/fwupd-metadata/LVFS-CA.pem"
|
||||
"grub.d/35_fwupd"
|
||||
] ++ lib.optionals haveDell [
|
||||
"fwupd/remotes.d/dell-esrt.conf"
|
||||
] ++ lib.optionals haveRedfish [
|
||||
"fwupd/redfish.conf"
|
||||
] ++ lib.optionals haveMSR [
|
||||
"fwupd/msr.conf"
|
||||
];
|
||||
|
||||
# DisabledPlugins key in fwupd/daemon.conf
|
||||
defaultDisabledPlugins = [
|
||||
"test"
|
||||
"test_ble"
|
||||
"invalid"
|
||||
];
|
||||
|
||||
# For updating.
|
||||
inherit test-firmware;
|
||||
|
||||
tests = let
|
||||
listToPy = list: "[${lib.concatMapStringsSep ", " (f: "'${f}'") list}]";
|
||||
in {
|
||||
installedTests = nixosTests.installed-tests.fwupd;
|
||||
|
||||
passthruMatches = runPythonCommand "fwupd-test-passthru-matches" ''
|
||||
import itertools
|
||||
import configparser
|
||||
import os
|
||||
import pathlib
|
||||
|
||||
etc = '${self}/etc'
|
||||
package_etc = set(itertools.chain.from_iterable([[os.path.relpath(os.path.join(prefix, file), etc) for file in files] for (prefix, dirs, files) in os.walk(etc)]))
|
||||
passthru_etc = set(${listToPy passthru.filesInstalledToEtc})
|
||||
assert len(package_etc - passthru_etc) == 0, f'fwupd package contains the following paths in /etc that are not listed in passthru.filesInstalledToEtc: {package_etc - passthru_etc}'
|
||||
assert len(passthru_etc - package_etc) == 0, f'fwupd package lists the following paths in passthru.filesInstalledToEtc that are not contained in /etc: {passthru_etc - package_etc}'
|
||||
|
||||
config = configparser.RawConfigParser()
|
||||
config.read('${self}/etc/fwupd/daemon.conf')
|
||||
package_disabled_plugins = config.get('fwupd', 'DisabledPlugins').rstrip(';').split(';')
|
||||
passthru_disabled_plugins = ${listToPy passthru.defaultDisabledPlugins}
|
||||
assert package_disabled_plugins == passthru_disabled_plugins, f'Default disabled plug-ins in the package {package_disabled_plugins} do not match those listed in passthru.defaultDisabledPlugins {passthru_disabled_plugins}'
|
||||
|
||||
pathlib.Path(os.getenv('out')).touch()
|
||||
'';
|
||||
};
|
||||
};
|
||||
|
||||
meta = with lib; {
|
||||
homepage = "https://fwupd.org/";
|
||||
maintainers = with maintainers; [ jtojnar ];
|
||||
license = licenses.lgpl21Plus;
|
||||
platforms = platforms.linux;
|
||||
};
|
||||
};
|
||||
|
||||
in self
|
||||
13
pkgs/os-specific/linux/firmware/fwupd/efi-app-path.patch
Normal file
13
pkgs/os-specific/linux/firmware/fwupd/efi-app-path.patch
Normal file
|
|
@ -0,0 +1,13 @@
|
|||
diff --git a/meson.build b/meson.build
|
||||
index 4330512e..e53b70ab 100644
|
||||
--- a/meson.build
|
||||
+++ b/meson.build
|
||||
@@ -403,7 +403,7 @@ endif
|
||||
if build_standalone and get_option('plugin_uefi_capsule')
|
||||
efiboot = dependency('efiboot')
|
||||
|
||||
- efi_app_location = join_paths(libexecdir, 'fwupd', 'efi')
|
||||
+ efi_app_location = join_paths(dependency('fwupd-efi').get_pkgconfig_variable('prefix'), 'libexec', 'fwupd', 'efi')
|
||||
conf.set_quoted('EFI_APP_LOCATION', efi_app_location)
|
||||
|
||||
if host_cpu == 'x86'
|
||||
|
|
@ -0,0 +1,37 @@
|
|||
diff --git a/libfwupdplugin/meson.build b/libfwupdplugin/meson.build
|
||||
index d6a2ed68..12c82a95 100644
|
||||
--- a/libfwupdplugin/meson.build
|
||||
+++ b/libfwupdplugin/meson.build
|
||||
@@ -216,7 +216,8 @@ fwupdplugin = library(
|
||||
],
|
||||
link_args : vflag,
|
||||
link_depends : fwupdplugin_mapfile,
|
||||
- install : true
|
||||
+ install : true,
|
||||
+ install_dir : bindir / '..' / 'lib',
|
||||
)
|
||||
|
||||
fwupdplugin_pkgg = import('pkgconfig')
|
||||
@@ -276,7 +277,8 @@ if get_option('introspection')
|
||||
girtargets,
|
||||
fwupd_gir[0],
|
||||
],
|
||||
- install : true
|
||||
+ install : true,
|
||||
+ install_dir_typelib : bindir / '..' / 'lib' / 'girepository-1.0',
|
||||
)
|
||||
|
||||
# Verify the map file is correct -- note we can't actually use the generated
|
||||
diff --git a/meson.build b/meson.build
|
||||
index 38aa36b0..3fb7e579 100644
|
||||
--- a/meson.build
|
||||
+++ b/meson.build
|
||||
@@ -521,7 +521,7 @@ if build_standalone
|
||||
if host_machine.system() == 'windows'
|
||||
plugin_dir = 'fwupd-plugins-@0@'.format(libfwupdplugin_lt_current)
|
||||
else
|
||||
- plugin_dir = join_paths(libdir, 'fwupd-plugins-@0@'.format(libfwupdplugin_lt_current))
|
||||
+ plugin_dir = join_paths(bindir, '..', 'lib', 'fwupd-plugins-@0@'.format(libfwupdplugin_lt_current))
|
||||
endif
|
||||
conf.set_quoted('FWUPD_PLUGINDIR', plugin_dir)
|
||||
endif
|
||||
|
|
@ -0,0 +1,59 @@
|
|||
diff --git a/data/installed-tests/meson.build b/data/installed-tests/meson.build
|
||||
index b8ec916f0..38209b363 100644
|
||||
--- a/data/installed-tests/meson.build
|
||||
+++ b/data/installed-tests/meson.build
|
||||
@@ -83,5 +83,5 @@ configure_file(
|
||||
output : 'fwupd-tests.conf',
|
||||
configuration : con2,
|
||||
install: true,
|
||||
- install_dir: join_paths(sysconfdir, 'fwupd', 'remotes.d'),
|
||||
+ install_dir: join_paths(get_option('installed_test_prefix'), 'etc', 'fwupd', 'remotes.d'),
|
||||
)
|
||||
diff --git a/meson.build b/meson.build
|
||||
index d8bd9fdc7..ff924d373 100644
|
||||
--- a/meson.build
|
||||
+++ b/meson.build
|
||||
@@ -187,8 +187,8 @@ else
|
||||
datadir = join_paths(prefix, get_option('datadir'))
|
||||
sysconfdir = join_paths(prefix, get_option('sysconfdir'))
|
||||
localstatedir = join_paths(prefix, get_option('localstatedir'))
|
||||
- installed_test_bindir = join_paths(libexecdir, 'installed-tests', meson.project_name())
|
||||
- installed_test_datadir = join_paths(datadir, 'installed-tests', meson.project_name())
|
||||
+ installed_test_bindir = join_paths(get_option('installed_test_prefix'), 'libexec', 'installed-tests', meson.project_name())
|
||||
+ installed_test_datadir = join_paths(get_option('installed_test_prefix'), 'share', 'installed-tests', meson.project_name())
|
||||
endif
|
||||
mandir = join_paths(prefix, get_option('mandir'))
|
||||
localedir = join_paths(prefix, get_option('localedir'))
|
||||
@@ -487,6 +487,7 @@ gnome = import('gnome')
|
||||
i18n = import('i18n')
|
||||
|
||||
conf.set_quoted('FWUPD_PREFIX', prefix)
|
||||
+conf.set_quoted('FWUPD_INSTALLED_TEST_PREFIX', get_option('installed_test_prefix'))
|
||||
conf.set_quoted('FWUPD_BINDIR', bindir)
|
||||
conf.set_quoted('FWUPD_LIBDIR', libdir)
|
||||
conf.set_quoted('FWUPD_LIBEXECDIR', libexecdir)
|
||||
diff --git a/meson_options.txt b/meson_options.txt
|
||||
index d00038dbc..be1c45b40 100644
|
||||
--- a/meson_options.txt
|
||||
+++ b/meson_options.txt
|
||||
@@ -56,6 +56,7 @@ option('systemd', type : 'feature', description : 'systemd support', deprecated:
|
||||
option('systemd_unit_user', type : 'string', description : 'User account to use for fwupd-refresh.service (empty for DynamicUser)')
|
||||
option('systemd_root_prefix', type: 'string', value: '', description: 'Directory to base systemd’s installation directories on')
|
||||
option('elogind', type : 'feature', description : 'elogind support', deprecated: {'true': 'enabled', 'false': 'disabled'})
|
||||
+option('installed_test_prefix', type: 'string', description: 'Prefix for installed tests')
|
||||
option('tests', type : 'boolean', value : true, description : 'enable tests')
|
||||
option('soup_session_compat', type : 'boolean', value : true, description : 'enable SoupSession runtime compatibility support')
|
||||
option('curl', type : 'feature', description : 'libcurl support', deprecated: {'true': 'enabled', 'false': 'disabled'})
|
||||
diff --git a/plugins/redfish/fu-self-test.c b/plugins/redfish/fu-self-test.c
|
||||
index 4d19e560f..91cfaa616 100644
|
||||
--- a/plugins/redfish/fu-self-test.c
|
||||
+++ b/plugins/redfish/fu-self-test.c
|
||||
@@ -27,7 +27,7 @@ fu_test_is_installed_test(void)
|
||||
const gchar *builddir = g_getenv("G_TEST_BUILDDIR");
|
||||
if (builddir == NULL)
|
||||
return FALSE;
|
||||
- return g_str_has_prefix(builddir, FWUPD_PREFIX);
|
||||
+ return g_str_has_prefix(builddir, FWUPD_INSTALLED_TEST_PREFIX);
|
||||
}
|
||||
|
||||
static void
|
||||
|
|
@ -0,0 +1,32 @@
|
|||
{ stdenv
|
||||
, lib
|
||||
, fetchurl }:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "intel2200BGFirmware";
|
||||
version = "3.1";
|
||||
|
||||
src = fetchurl {
|
||||
url = "https://src.fedoraproject.org/repo/pkgs/ipw2200-firmware/ipw2200-fw-${version}.tgz/eaba788643c7cc7483dd67ace70f6e99/ipw2200-fw-${version}.tgz";
|
||||
hash = "sha256-xoGMEcGMwDDVX/g/ZLK62P7vSF53QvhPlKYdgRpiWL0=";
|
||||
};
|
||||
|
||||
installPhase = ''
|
||||
runHook preInstall
|
||||
|
||||
install -D -m644 ipw2200-bss.fw $out/lib/firmware/ipw2200-bss.fw
|
||||
install -D -m644 ipw2200-ibss.fw $out/lib/firmware/ipw2200-ibss.fw
|
||||
install -D -m644 ipw2200-sniffer.fw $out/lib/firmware/ipw2200-sniffer.fw
|
||||
install -D -m644 LICENSE.ipw2200-fw $out/share/doc/intel2200BGFirmware/LICENSE
|
||||
|
||||
runHook postInstall
|
||||
'';
|
||||
|
||||
meta = with lib; {
|
||||
description = "Firmware for Intel 2200BG cards";
|
||||
homepage = "http://ipw2200.sourceforge.net/firmware.php";
|
||||
license = licenses.unfreeRedistributableFirmware;
|
||||
maintainers = with maintainers; [ sternenseemann ];
|
||||
platforms = platforms.linux;
|
||||
};
|
||||
}
|
||||
|
|
@ -0,0 +1,31 @@
|
|||
{ stdenv, fetchFromGitHub, lib}:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "libreelec-dvb-firmware";
|
||||
version = "1.4.2";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
repo = "dvb-firmware";
|
||||
owner = "LibreElec";
|
||||
rev = version;
|
||||
sha256 = "1xnfl4gp6d81gpdp86v5xgcqiqz2nf1i43sb3a4i5jqs8kxcap2k";
|
||||
};
|
||||
|
||||
installPhase = ''
|
||||
runHook preInstall
|
||||
|
||||
mkdir -p $out/lib
|
||||
cp -rv firmware $out/lib
|
||||
find $out/lib \( -name 'README.*' -or -name 'LICEN[SC]E.*' -or -name '*.txt' \) | xargs rm
|
||||
|
||||
runHook postInstall
|
||||
'';
|
||||
|
||||
meta = with lib; {
|
||||
description = "DVB firmware from LibreELEC";
|
||||
homepage = "https://github.com/LibreELEC/dvb-firmware";
|
||||
license = licenses.unfreeRedistributableFirmware;
|
||||
maintainers = with maintainers; [ kittywitch ];
|
||||
platforms = platforms.linux;
|
||||
};
|
||||
}
|
||||
31
pkgs/os-specific/linux/firmware/linux-firmware/default.nix
Normal file
31
pkgs/os-specific/linux/firmware/linux-firmware/default.nix
Normal file
|
|
@ -0,0 +1,31 @@
|
|||
{ stdenvNoCC, fetchzip, lib }:
|
||||
|
||||
stdenvNoCC.mkDerivation rec {
|
||||
pname = "linux-firmware";
|
||||
version = "20220509";
|
||||
|
||||
src = fetchzip {
|
||||
url = "https://git.kernel.org/pub/scm/linux/kernel/git/firmware/linux-firmware.git/snapshot/linux-firmware-${version}.tar.gz";
|
||||
sha256 = "sha256-pNuKA4XigrHU9qC5Ch6HLs3/tcv0zIkAzow9VOIVKdQ=";
|
||||
};
|
||||
|
||||
installFlags = [ "DESTDIR=$(out)" ];
|
||||
|
||||
# Firmware blobs do not need fixing and should not be modified
|
||||
dontFixup = true;
|
||||
|
||||
outputHashMode = "recursive";
|
||||
outputHashAlgo = "sha256";
|
||||
outputHash = "sha256-pXzWAu7ch4dHXvKzfrK826vtNqovCqL7pd+TIVbWnJQ=";
|
||||
|
||||
meta = with lib; {
|
||||
description = "Binary firmware collection packaged by kernel.org";
|
||||
homepage = "https://git.kernel.org/pub/scm/linux/kernel/git/firmware/linux-firmware.git";
|
||||
license = licenses.unfreeRedistributableFirmware;
|
||||
platforms = platforms.linux;
|
||||
maintainers = with maintainers; [ fpletz ];
|
||||
priority = 6; # give precedence to kernel firmware
|
||||
};
|
||||
|
||||
passthru = { inherit version; };
|
||||
}
|
||||
|
|
@ -0,0 +1,55 @@
|
|||
{ lib, stdenv, fetchFromGitHub }:
|
||||
|
||||
stdenv.mkDerivation {
|
||||
pname = "raspberrypi-wireless-firmware";
|
||||
version = "2021-12-06";
|
||||
|
||||
srcs = [
|
||||
(fetchFromGitHub {
|
||||
name = "bluez-firmware";
|
||||
owner = "RPi-Distro";
|
||||
repo = "bluez-firmware";
|
||||
rev = "e7fd166981ab4bb9a36c2d1500205a078a35714d";
|
||||
hash = "sha256-6xBdXwAGA1N42k1KKYrEgtsxtFAtrwhKdIrYY39Fb7Y=";
|
||||
})
|
||||
(fetchFromGitHub {
|
||||
name = "firmware-nonfree";
|
||||
owner = "RPi-Distro";
|
||||
repo = "firmware-nonfree";
|
||||
rev = "99d5c588e95ec9c9b86d7e88d3cf85b4f729d2bc";
|
||||
hash = "sha256-xg6fYQvg7t2ikyLI8/XfpiNaNTf7CNFQlAzpTldTz10=";
|
||||
})
|
||||
];
|
||||
|
||||
sourceRoot = ".";
|
||||
|
||||
dontBuild = true;
|
||||
# Firmware blobs do not need fixing and should not be modified
|
||||
dontFixup = true;
|
||||
|
||||
installPhase = ''
|
||||
runHook preInstall
|
||||
mkdir -p "$out/lib/firmware/brcm"
|
||||
|
||||
# Wifi firmware
|
||||
cp -rv "$NIX_BUILD_TOP/firmware-nonfree/debian/config/brcm80211/." "$out/lib/firmware/"
|
||||
|
||||
# Bluetooth firmware
|
||||
cp -rv "$NIX_BUILD_TOP/bluez-firmware/broadcom/." "$out/lib/firmware/brcm"
|
||||
|
||||
# CM4 symlink must be added since it's missing from upstream
|
||||
pushd $out/lib/firmware/brcm &>/dev/null
|
||||
ln -s "./brcmfmac43455-sdio.txt" "$out/lib/firmware/brcm/brcmfmac43455-sdio.raspberrypi,4-compute-module.txt"
|
||||
popd &>/dev/null
|
||||
|
||||
runHook postInstall
|
||||
'';
|
||||
|
||||
meta = with lib; {
|
||||
description = "Firmware for builtin Wifi/Bluetooth devices in the Raspberry Pi 3+ and Zero W";
|
||||
homepage = "https://github.com/RPi-Distro/firmware-nonfree";
|
||||
license = licenses.unfreeRedistributableFirmware;
|
||||
platforms = platforms.linux;
|
||||
maintainers = with maintainers; [ lopsided98 ];
|
||||
};
|
||||
}
|
||||
53
pkgs/os-specific/linux/firmware/raspberrypi/armstubs.nix
Normal file
53
pkgs/os-specific/linux/firmware/raspberrypi/armstubs.nix
Normal file
|
|
@ -0,0 +1,53 @@
|
|||
{ lib, stdenv, fetchFromGitHub }:
|
||||
|
||||
let
|
||||
inherit (lib) optionals;
|
||||
in
|
||||
stdenv.mkDerivation {
|
||||
pname = "raspberrypi-armstubs";
|
||||
version = "2021-11-01";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "raspberrypi";
|
||||
repo = "tools";
|
||||
rev = "13474ee775d0c5ec8a7da4fb0a9fa84187abfc87";
|
||||
sha256 = "s/RPMIpQSznoQfchAP9gpO7I2uuTsOV0Ep4vVz7i2o4=";
|
||||
};
|
||||
|
||||
NIX_CFLAGS_COMPILE = [
|
||||
"-march=armv8-a+crc"
|
||||
];
|
||||
|
||||
preConfigure = ''
|
||||
cd armstubs
|
||||
'';
|
||||
|
||||
makeFlags = [
|
||||
"CC8=${stdenv.cc.targetPrefix}cc"
|
||||
"LD8=${stdenv.cc.targetPrefix}ld"
|
||||
"OBJCOPY8=${stdenv.cc.targetPrefix}objcopy"
|
||||
"OBJDUMP8=${stdenv.cc.targetPrefix}objdump"
|
||||
"CC7=${stdenv.cc.targetPrefix}cc"
|
||||
"LD7=${stdenv.cc.targetPrefix}ld"
|
||||
"OBJCOPY7=${stdenv.cc.targetPrefix}objcopy"
|
||||
"OBJDUMP7=${stdenv.cc.targetPrefix}objdump"
|
||||
]
|
||||
++ optionals (stdenv.isAarch64) [ "armstub8.bin" "armstub8-gic.bin" ]
|
||||
++ optionals (stdenv.isAarch32) [ "armstub7.bin" "armstub8-32.bin" "armstub8-32-gic.bin" ]
|
||||
;
|
||||
|
||||
installPhase = ''
|
||||
runHook preInstall
|
||||
mkdir -vp $out/
|
||||
cp -v *.bin $out/
|
||||
runHook postInstall
|
||||
'';
|
||||
|
||||
meta = with lib; {
|
||||
description = "Firmware related ARM stubs for the Raspberry Pi";
|
||||
homepage = "https://github.com/raspberrypi/tools";
|
||||
license = licenses.bsd3;
|
||||
platforms = [ "armv6l-linux" "armv7l-linux" "aarch64-linux" ];
|
||||
maintainers = with maintainers; [ samueldr ];
|
||||
};
|
||||
}
|
||||
31
pkgs/os-specific/linux/firmware/raspberrypi/default.nix
Normal file
31
pkgs/os-specific/linux/firmware/raspberrypi/default.nix
Normal file
|
|
@ -0,0 +1,31 @@
|
|||
{ lib, stdenvNoCC, fetchFromGitHub }:
|
||||
|
||||
stdenvNoCC.mkDerivation rec {
|
||||
# NOTE: this should be updated with linux_rpi
|
||||
pname = "raspberrypi-firmware";
|
||||
version = "1.20220331";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "raspberrypi";
|
||||
repo = "firmware";
|
||||
rev = version;
|
||||
hash = "sha256-TxlpHPEJAtVJTtDghuJpx2mLjEPiKkcAr7S9Cd/cocE=";
|
||||
};
|
||||
|
||||
installPhase = ''
|
||||
mkdir -p $out/share/raspberrypi/
|
||||
mv boot "$out/share/raspberrypi/"
|
||||
'';
|
||||
|
||||
dontConfigure = true;
|
||||
dontBuild = true;
|
||||
dontFixup = true;
|
||||
|
||||
meta = with lib; {
|
||||
description = "Firmware for the Raspberry Pi board";
|
||||
homepage = "https://github.com/raspberrypi/firmware";
|
||||
license = licenses.unfreeRedistributableFirmware; # See https://github.com/raspberrypi/firmware/blob/master/boot/LICENCE.broadcom
|
||||
maintainers = with maintainers; [ dezgeg ];
|
||||
broken = stdenvNoCC.isDarwin; # Hash mismatch on source, mystery.
|
||||
};
|
||||
}
|
||||
24
pkgs/os-specific/linux/firmware/rt5677/default.nix
Normal file
24
pkgs/os-specific/linux/firmware/rt5677/default.nix
Normal file
|
|
@ -0,0 +1,24 @@
|
|||
{ lib, stdenv, fetchFromGitHub }:
|
||||
|
||||
stdenv.mkDerivation {
|
||||
name = "rt5677-firmware";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "raphael";
|
||||
repo = "linux-samus";
|
||||
rev = "995de6c2093797905fbcd79f1a3625dd3f50be37";
|
||||
sha256 = "sha256-PjPFpz4qJLC+vTomV31dA3AKGjfYjKB2ZYfUpnj61Cg=";
|
||||
};
|
||||
|
||||
installPhase = ''
|
||||
mkdir -p $out/lib/firmware
|
||||
cp ./firmware/rt5677_elf_vad $out/lib/firmware
|
||||
'';
|
||||
|
||||
meta = with lib; {
|
||||
description = "Firmware for Realtek rt5677 device";
|
||||
license = licenses.unfreeRedistributableFirmware;
|
||||
maintainers = [ maintainers.zohl ];
|
||||
platforms = platforms.linux;
|
||||
};
|
||||
}
|
||||
|
|
@ -0,0 +1,37 @@
|
|||
{ lib, stdenv, fetchFromGitHub }:
|
||||
with lib;
|
||||
stdenv.mkDerivation {
|
||||
pname = "rtl8192su";
|
||||
version = "unstable-2016-10-05";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "chunkeey";
|
||||
repo = "rtl8192su";
|
||||
rev = "c00112c9a14133290fe30bd3b44e45196994cb1c";
|
||||
sha256 = "0j3c35paapq1icmxq0mg7pm2xa2m69q7bkfmwgq99d682yr2cb5l";
|
||||
};
|
||||
|
||||
dontBuild = true;
|
||||
|
||||
installPhase = ''
|
||||
for i in rtl8192sfw.bin \
|
||||
rtl8192sufw-ap.bin \
|
||||
rtl8192sufw-apple.bin \
|
||||
rtl8192sufw-windows.bin \
|
||||
rtl8712u-linux-firmware-bad.bin \
|
||||
rtl8712u-most-recent-v2.6.6-bad.bin \
|
||||
rtl8712u-most-recent-v2.6.6-bad.bin \
|
||||
rtl8712u-oldest-but-good.bin;
|
||||
do
|
||||
install -D -pm644 firmwares/$i $out/lib/firmware/rtlwifi/$i
|
||||
done
|
||||
'';
|
||||
|
||||
meta = with lib; {
|
||||
description = "Firmware for Realtek RTL8188SU/RTL8191SU/RTL8192SU";
|
||||
homepage = "https://github.com/chunkeey/rtl8192su";
|
||||
license = licenses.unfreeRedistributableFirmware;
|
||||
maintainers = with maintainers; [ mic92 ];
|
||||
platforms = with platforms; linux;
|
||||
};
|
||||
}
|
||||
|
|
@ -0,0 +1,23 @@
|
|||
{ lib, stdenv, linuxPackages }:
|
||||
with lib;
|
||||
stdenv.mkDerivation {
|
||||
pname = "rtl8723bs-firmware";
|
||||
version = linuxPackages.rtl8723bs.version;
|
||||
inherit (linuxPackages.rtl8723bs) src;
|
||||
|
||||
dontBuild = true;
|
||||
|
||||
installPhase = ''
|
||||
mkdir -p "$out/lib/firmware/rtlwifi"
|
||||
cp rtl8723bs_nic.bin "$out/lib/firmware/rtlwifi"
|
||||
cp rtl8723bs_wowlan.bin "$out/lib/firmware/rtlwifi"
|
||||
'';
|
||||
|
||||
meta = with lib; {
|
||||
description = "Firmware for RealTek 8723bs";
|
||||
homepage = "https://github.com/hadess/rtl8723bs";
|
||||
license = licenses.unfreeRedistributableFirmware;
|
||||
maintainers = with maintainers; [ elitak ];
|
||||
platforms = with platforms; linux;
|
||||
};
|
||||
}
|
||||
|
|
@ -0,0 +1,29 @@
|
|||
{ lib, stdenv, fetchFromGitHub }:
|
||||
|
||||
stdenv.mkDerivation {
|
||||
name = "rtl8761b-firmware";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "Realtek-OpenSource";
|
||||
repo = "android_hardware_realtek";
|
||||
rev = "rtk1395";
|
||||
sha256 = "sha256-vd9sZP7PGY+cmnqVty3sZibg01w8+UNinv8X85B+dzc=";
|
||||
};
|
||||
|
||||
installPhase = ''
|
||||
install -D -pm644 \
|
||||
bt/rtkbt/Firmware/BT/rtl8761b_fw \
|
||||
$out/lib/firmware/rtl_bt/rtl8761b_fw.bin
|
||||
|
||||
install -D -pm644 \
|
||||
bt/rtkbt/Firmware/BT/rtl8761b_config \
|
||||
$out/lib/firmware/rtl_bt/rtl8761b_config.bin
|
||||
'';
|
||||
|
||||
meta = with lib; {
|
||||
description = "Firmware for Realtek RTL8761b";
|
||||
license = licenses.unfreeRedistributableFirmware;
|
||||
maintainers = with maintainers; [ milibopp ];
|
||||
platforms = with platforms; linux;
|
||||
};
|
||||
}
|
||||
25
pkgs/os-specific/linux/firmware/rtw88-firmware/default.nix
Normal file
25
pkgs/os-specific/linux/firmware/rtw88-firmware/default.nix
Normal file
|
|
@ -0,0 +1,25 @@
|
|||
{ stdenvNoCC, lib, linuxPackages }:
|
||||
|
||||
stdenvNoCC.mkDerivation {
|
||||
pname = "rtw88-firmware";
|
||||
inherit (linuxPackages.rtw88) version src;
|
||||
|
||||
dontBuild = true;
|
||||
|
||||
installPhase = ''
|
||||
runHook preInstall
|
||||
|
||||
mkdir -p $out/lib/firmware/rtw88
|
||||
cp *.bin $out/lib/firmware/rtw88
|
||||
|
||||
runHook postInstall
|
||||
'';
|
||||
|
||||
meta = with lib; {
|
||||
description = "Firmware for the newest Realtek rtlwifi codes";
|
||||
homepage = "https://github.com/lwfinger/rtw88";
|
||||
license = licenses.unfreeRedistributableFirmware;
|
||||
maintainers = with maintainers; [ tvorog ];
|
||||
platforms = platforms.linux;
|
||||
};
|
||||
}
|
||||
25
pkgs/os-specific/linux/firmware/rtw89-firmware/default.nix
Normal file
25
pkgs/os-specific/linux/firmware/rtw89-firmware/default.nix
Normal file
|
|
@ -0,0 +1,25 @@
|
|||
{ stdenvNoCC, lib, linuxPackages }:
|
||||
|
||||
stdenvNoCC.mkDerivation {
|
||||
pname = "rtw89-firmware";
|
||||
inherit (linuxPackages.rtw89) version src;
|
||||
|
||||
dontBuild = true;
|
||||
|
||||
installPhase = ''
|
||||
runHook preInstall
|
||||
|
||||
mkdir -p $out/lib/firmware/rtw89
|
||||
cp *.bin $out/lib/firmware/rtw89
|
||||
|
||||
runHook postInstall
|
||||
'';
|
||||
|
||||
meta = with lib; {
|
||||
description = "Driver for Realtek 8852AE, an 802.11ax device";
|
||||
homepage = "https://github.com/lwfinger/rtw89";
|
||||
license = licenses.unfreeRedistributableFirmware;
|
||||
maintainers = with maintainers; [ tvorog ];
|
||||
platforms = platforms.linux;
|
||||
};
|
||||
}
|
||||
35
pkgs/os-specific/linux/firmware/sof-firmware/default.nix
Normal file
35
pkgs/os-specific/linux/firmware/sof-firmware/default.nix
Normal file
|
|
@ -0,0 +1,35 @@
|
|||
{ lib
|
||||
, stdenvNoCC
|
||||
, fetchFromGitHub
|
||||
}:
|
||||
|
||||
stdenvNoCC.mkDerivation rec {
|
||||
pname = "sof-firmware";
|
||||
version = "2.1.1";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "thesofproject";
|
||||
repo = "sof-bin";
|
||||
rev = "v${version}";
|
||||
sha256 = "sha256-/OYYfIJWMT+rBBhSCtHaSWvwRMlReEQ5y4FuMfk5zUg=";
|
||||
};
|
||||
|
||||
dontFixup = true; # binaries must not be stripped or patchelfed
|
||||
|
||||
installPhase = ''
|
||||
runHook preInstall
|
||||
cd "v${lib.versions.majorMinor version}.x"
|
||||
mkdir -p $out/lib/firmware/intel/
|
||||
cp -a sof-v${version} $out/lib/firmware/intel/sof
|
||||
cp -a sof-tplg-v${version} $out/lib/firmware/intel/sof-tplg
|
||||
runHook postInstall
|
||||
'';
|
||||
|
||||
meta = with lib; {
|
||||
description = "Sound Open Firmware";
|
||||
homepage = "https://www.sofproject.org/";
|
||||
license = with licenses; [ bsd3 isc ];
|
||||
maintainers = with maintainers; [ lblasc evenbrenden hmenke ];
|
||||
platforms = with platforms; linux;
|
||||
};
|
||||
}
|
||||
|
|
@ -0,0 +1,39 @@
|
|||
{ rustPlatform, lib, fetchFromGitHub, xz, pkg-config, openssl, dbus, efibootmgr, makeWrapper }:
|
||||
rustPlatform.buildRustPackage rec {
|
||||
pname = "system76-firmware";
|
||||
# Check Makefile when updating, make sure postInstall matches make install
|
||||
version = "1.0.39";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "pop-os";
|
||||
repo = pname;
|
||||
rev = version;
|
||||
sha256 = "sha256-nPHBL73hmvW9z5SQjmfu+ozMXxUEajNQxNtE/V9QwZ0=";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [ pkg-config makeWrapper ];
|
||||
|
||||
buildInputs = [ xz openssl dbus ];
|
||||
|
||||
cargoBuildFlags = [ "--workspace" ];
|
||||
|
||||
cargoSha256 = "sha256-BrzicLj7FbUqRG1BgQIRqh801tRQpRZkHSiX3ekAYqc=";
|
||||
|
||||
# Purposefully don't install systemd unit file, that's for NixOS
|
||||
postInstall = ''
|
||||
install -D -m -0644 data/system76-firmware-daemon.conf $out/etc/dbus-1/system.d/system76-firmware-daemon.conf
|
||||
|
||||
for bin in $out/bin/system76-firmware-*
|
||||
do
|
||||
wrapProgram $bin --prefix PATH : "${efibootmgr}/bin"
|
||||
done
|
||||
'';
|
||||
|
||||
meta = with lib; {
|
||||
description = "Tools for managing firmware updates for system76 devices";
|
||||
homepage = "https://github.com/pop-os/system76-firmware";
|
||||
license = licenses.gpl3Only;
|
||||
maintainers = with maintainers; [ shlevy ];
|
||||
platforms = [ "i686-linux" "x86_64-linux" ];
|
||||
};
|
||||
}
|
||||
|
|
@ -0,0 +1,32 @@
|
|||
{ stdenv, lib, fetchurl, cabextract }:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "xow_dongle-firmware";
|
||||
version = "2017-07";
|
||||
|
||||
dontUnpack = true;
|
||||
dontInstall = true;
|
||||
|
||||
src = fetchurl {
|
||||
url = "http://download.windowsupdate.com/c/msdownload/update/driver/drvs/2017/07/1cd6a87c-623f-4407-a52d-c31be49e925c_e19f60808bdcbfbd3c3df6be3e71ffc52e43261e.cab";
|
||||
sha256 = "013g1zngxffavqrk5jy934q3bdhsv6z05ilfixdn8dj0zy26lwv5";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [ cabextract ];
|
||||
|
||||
buildPhase = ''
|
||||
cabextract -F FW_ACC_00U.bin ${src}
|
||||
mkdir -p $out/lib/firmware
|
||||
cp -a FW_ACC_00U.bin $out/lib/firmware/xow_dongle.bin
|
||||
'';
|
||||
|
||||
meta = with lib; {
|
||||
description = "Xbox One wireless dongle firmware";
|
||||
homepage = "https://www.xbox.com/en-NZ/accessories/adapters/wireless-adapter-windows";
|
||||
license = licenses.unfree;
|
||||
maintainers = with lib.maintainers; [ rhysmdnz ];
|
||||
platforms = platforms.linux;
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
30
pkgs/os-specific/linux/firmware/zd1211/default.nix
Normal file
30
pkgs/os-specific/linux/firmware/zd1211/default.nix
Normal file
|
|
@ -0,0 +1,30 @@
|
|||
{ stdenv
|
||||
, lib
|
||||
, fetchurl
|
||||
}:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "zd1211-firmware";
|
||||
version = "1.5";
|
||||
|
||||
src = fetchurl {
|
||||
url = "mirror://sourceforge/zd1211/${pname}-${version}.tar.bz2";
|
||||
hash = "sha256-8R04ENf3KDOZf2NFhKWG3M7XGjU/llq/gQYuxDHQKxI=";
|
||||
};
|
||||
|
||||
installPhase = ''
|
||||
runHook preInstall
|
||||
|
||||
mkdir -p $out/lib/firmware/zd1211
|
||||
cp * $out/lib/firmware/zd1211
|
||||
|
||||
runHook postInstall
|
||||
'';
|
||||
|
||||
meta = {
|
||||
description = "Firmware for the ZyDAS ZD1211(b) 802.11a/b/g USB WLAN chip";
|
||||
homepage = "https://sourceforge.net/projects/zd1211/";
|
||||
license = "GPL";
|
||||
platforms = lib.platforms.linux;
|
||||
};
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue