Skip to content

Instantly share code, notes, and snippets.

@layus
Last active August 9, 2020 14:16
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save layus/edc850138ff147ee0b0b1c541c344ea6 to your computer and use it in GitHub Desktop.
Save layus/edc850138ff147ee0b0b1c541c344ea6 to your computer and use it in GitHub Desktop.
pkgs/os-specific/linux/firmware/firmware-linux-nonfree/default.nix
{ fetchgit, lib, gnumake }:
let
version = "2020-01-22";
pname = "firmware-linux-nonfree";
in (fetchgit {
name = "${pname}-${version}";
url = "https://git.kernel.org/pub/scm/linux/kernel/git/firmware/linux-firmware.git";
rev = lib.replaceStrings ["-"] [""] version;
sha256 = "1d2jvy395jpfq0gli7q5p571lcb9p5y0y8qr8p8rlcmczh4gry64";
postFetch = ''
mkdir $out/.tmp
mv $out/* $out/.tmp
cd $out/.tmp
DESTDIR=$out ${gnumake}/bin/make install
rm -rf $out/.tmp
'';
}) // {
meta = with lib; {
description = "Binary firmware collection packaged by kernel.org";
homepage = http://packages.debian.org/sid/firmware-linux-nonfree;
license = licenses.unfreeRedistributableFirmware;
platforms = platforms.linux;
maintainers = with maintainers; [ fpletz ];
priority = 6; # give precedence to kernel firmware
};
passthru = { inherit version; };
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment