about summary refs log tree commit diff
path: root/pkgs/os-specific
diff options
context:
space:
mode:
authorFrederik Rietdijk <fridh@fridh.nl>2020-05-01 09:28:45 +0200
committerFrederik Rietdijk <fridh@fridh.nl>2020-05-01 09:28:45 +0200
commit00bbfccecf90f21b873d90bfeb3b81d7de79cf80 (patch)
tree36b934248a5095b4d645d1fd6204732a4b0e9c0b /pkgs/os-specific
parent2d00e8621ec23d39c47a5dc69fed312244507d09 (diff)
parent1825ecc5ede0b5e3caeec9a61e9bdfab7b4ec769 (diff)
downloadnixlib-00bbfccecf90f21b873d90bfeb3b81d7de79cf80.tar
nixlib-00bbfccecf90f21b873d90bfeb3b81d7de79cf80.tar.gz
nixlib-00bbfccecf90f21b873d90bfeb3b81d7de79cf80.tar.bz2
nixlib-00bbfccecf90f21b873d90bfeb3b81d7de79cf80.tar.lz
nixlib-00bbfccecf90f21b873d90bfeb3b81d7de79cf80.tar.xz
nixlib-00bbfccecf90f21b873d90bfeb3b81d7de79cf80.tar.zst
nixlib-00bbfccecf90f21b873d90bfeb3b81d7de79cf80.zip
Merge staging into staging-next
Diffstat (limited to 'pkgs/os-specific')
-rw-r--r--pkgs/os-specific/darwin/binutils/default.nix15
-rw-r--r--pkgs/os-specific/darwin/cctools/port.nix7
-rw-r--r--pkgs/os-specific/linux/firmware/sof-firmware/default.nix28
-rw-r--r--pkgs/os-specific/linux/kernel/common-config.nix21
-rw-r--r--pkgs/os-specific/linux/kernel/manual-config.nix6
5 files changed, 65 insertions, 12 deletions
diff --git a/pkgs/os-specific/darwin/binutils/default.nix b/pkgs/os-specific/darwin/binutils/default.nix
index e31f9b91f97d..fad33b21d046 100644
--- a/pkgs/os-specific/darwin/binutils/default.nix
+++ b/pkgs/os-specific/darwin/binutils/default.nix
@@ -16,7 +16,7 @@ in
 stdenv.mkDerivation {
   pname = "${targetPrefix}cctools-binutils-darwin";
   inherit (cctools) version;
-  outputs = [ "out" "info" "man" ];
+  outputs = [ "out" "man" ];
   buildCommand = ''
     mkdir -p $out/bin $out/include
 
@@ -42,12 +42,13 @@ stdenv.mkDerivation {
 
     ln -s ${cctools}/libexec $out/libexec
 
-    mkdir -p "$info/nix-support" "$man/nix-support"
-    printWords ${binutils-unwrapped.info} \
-      >> $info/nix-support/propagated-build-inputs
-    # FIXME: cctools missing man pages
-    printWords ${binutils-unwrapped.man} \
-      >> $man/nix-support/propagated-build-inputs
+    mkdir -p "$man"/share/man/man{1,5}
+    for i in ${builtins.concatStringsSep " " cmds}; do
+      for path in "${cctools.man}"/share/man/man?/$i.*; do
+        dest_path="$man''${path#${cctools.man}}"
+        ln -sv "$path" "$dest_path"
+      done
+    done
   '';
 
   passthru = {
diff --git a/pkgs/os-specific/darwin/cctools/port.nix b/pkgs/os-specific/darwin/cctools/port.nix
index 368f29380646..0c25f225291e 100644
--- a/pkgs/os-specific/darwin/cctools/port.nix
+++ b/pkgs/os-specific/darwin/cctools/port.nix
@@ -1,4 +1,5 @@
 { stdenv, fetchFromGitHub, autoconf, automake, libtool, autoreconfHook
+, installShellFiles
 , libcxxabi, libuuid
 , libobjc ? null, maloader ? null
 , enableTapiSupport ? true, libtapi
@@ -28,9 +29,9 @@ let
       sha256 = "0h8b1my0wf1jyjq63wbiqkl2clgxsf87f6i4fjhqs431fzlq8sac";
     };
 
-    outputs = [ "out" "dev" ];
+    outputs = [ "out" "dev" "man" ];
 
-    nativeBuildInputs = [ autoconf automake libtool autoreconfHook ];
+    nativeBuildInputs = [ autoconf automake libtool autoreconfHook installShellFiles ];
     buildInputs = [ libuuid ]
       ++ stdenv.lib.optionals stdenv.isDarwin [ libcxxabi libobjc ]
       ++ stdenv.lib.optional enableTapiSupport libtapi;
@@ -88,6 +89,8 @@ let
       pushd include
       make DSTROOT=$out/include RC_OS=common install
       popd
+
+      installManPage ar/ar.{1,5}
     '';
 
     passthru = {
diff --git a/pkgs/os-specific/linux/firmware/sof-firmware/default.nix b/pkgs/os-specific/linux/firmware/sof-firmware/default.nix
new file mode 100644
index 000000000000..73ab46b3c8a6
--- /dev/null
+++ b/pkgs/os-specific/linux/firmware/sof-firmware/default.nix
@@ -0,0 +1,28 @@
+{ stdenv, fetchurl }:
+
+with stdenv.lib;
+stdenv.mkDerivation rec {
+  pname = "sof-firmware";
+  version = "1.4.2";
+
+  src = fetchurl {
+    url = "https://www.alsa-project.org/files/pub/misc/sof/${pname}-${version}.tar.bz2";
+    sha256 = "1nkh020gjm45vxd6fvmz63hj16ilff2nl5avvsklajjs6xci1sf5";
+  };
+
+  phases = [ "unpackPhase" "installPhase" ];
+
+  installPhase = ''
+    rm lib/firmware/intel/{sof/LICENCE,sof-tplg/LICENCE}
+    mkdir $out
+    cp -r lib $out/lib
+  '';
+
+  meta = with stdenv.lib; {
+    description = "Sound Open Firmware";
+    homepage = "https://www.sofproject.org/";
+    license = with licenses; [ bsd3 isc ];
+    maintainers = with maintainers; [ lblasc ];
+    platforms = with platforms; linux;
+  };
+}
diff --git a/pkgs/os-specific/linux/kernel/common-config.nix b/pkgs/os-specific/linux/kernel/common-config.nix
index 0a58ed87e6ce..088ec4ebf44d 100644
--- a/pkgs/os-specific/linux/kernel/common-config.nix
+++ b/pkgs/os-specific/linux/kernel/common-config.nix
@@ -254,6 +254,27 @@ let
       SND_USB_CAIAQ_INPUT = yes;
       # Enable PSS mixer (Beethoven ADSP-16 and other compatible)
       PSS_MIXER           = whenOlder "4.12" yes;
+    # Enable Sound Open Firmware support
+    } // optionalAttrs (stdenv.hostPlatform.system == "x86_64-linux" &&
+                        versionAtLeast version "5.5") {
+      SND_SOC_SOF_TOPLEVEL              = yes;
+      SND_SOC_SOF_ACPI                  = module;
+      SND_SOC_SOF_PCI                   = module;
+      SND_SOC_SOF_APOLLOLAKE_SUPPORT    = yes;
+      SND_SOC_SOF_CANNONLAKE_SUPPORT    = yes;
+      SND_SOC_SOF_COFFEELAKE_SUPPORT    = yes;
+      SND_SOC_SOF_COMETLAKE_H_SUPPORT   = yes;
+      SND_SOC_SOF_COMETLAKE_LP_SUPPORT  = yes;
+      SND_SOC_SOF_ELKHARTLAKE_SUPPORT   = yes;
+      SND_SOC_SOF_GEMINILAKE_SUPPORT    = yes;
+      SND_SOC_SOF_HDA_AUDIO_CODEC       = yes;
+      SND_SOC_SOF_HDA_COMMON_HDMI_CODEC = yes;
+      SND_SOC_SOF_HDA_LINK              = yes;
+      SND_SOC_SOF_ICELAKE_SUPPORT       = yes;
+      SND_SOC_SOF_INTEL_TOPLEVEL        = yes;
+      SND_SOC_SOF_JASPERLAKE_SUPPORT    = yes;
+      SND_SOC_SOF_MERRIFIELD_SUPPORT    = yes;
+      SND_SOC_SOF_TIGERLAKE_SUPPORT     = yes;
     };
 
     usb-serial = {
diff --git a/pkgs/os-specific/linux/kernel/manual-config.nix b/pkgs/os-specific/linux/kernel/manual-config.nix
index 71505840b869..d73e0a8ac909 100644
--- a/pkgs/os-specific/linux/kernel/manual-config.nix
+++ b/pkgs/os-specific/linux/kernel/manual-config.nix
@@ -1,6 +1,6 @@
 { buildPackages, runCommand, nettools, bc, bison, flex, perl, rsync, gmp, libmpc, mpfr, openssl
 , libelf, cpio
-, utillinux
+, utillinuxMinimal
 , writeTextFile
 }:
 
@@ -281,7 +281,7 @@ let
 in
 
 assert stdenv.lib.versionAtLeast version "4.14" -> libelf != null;
-assert stdenv.lib.versionAtLeast version "4.15" -> utillinux != null;
+assert stdenv.lib.versionAtLeast version "4.15" -> utillinuxMinimal != null;
 stdenv.mkDerivation ((drvAttrs config stdenv.hostPlatform.platform kernelPatches configfile) // {
   pname = "linux";
   inherit version;
@@ -292,7 +292,7 @@ stdenv.mkDerivation ((drvAttrs config stdenv.hostPlatform.platform kernelPatches
   nativeBuildInputs = [ perl bc nettools openssl rsync gmp libmpc mpfr ]
       ++ optional  (stdenv.hostPlatform.platform.kernelTarget == "uImage") buildPackages.ubootTools
       ++ optional  (stdenv.lib.versionAtLeast version "4.14") libelf
-      ++ optional  (stdenv.lib.versionAtLeast version "4.15") utillinux
+      ++ optional  (stdenv.lib.versionAtLeast version "4.15") utillinuxMinimal
       ++ optionals (stdenv.lib.versionAtLeast version "4.16") [ bison flex ]
       ++ optional  (stdenv.lib.versionAtLeast version "5.2")  cpio
       ;