From 26028c2107cd4ad1f7059735bec043d5fcaf3e4d Mon Sep 17 00:00:00 2001 From: Eelco Dolstra Date: Wed, 4 Sep 2013 14:22:24 +0200 Subject: [PATCH] Install firmware in $out/lib/firmware instead of $out --- .../firmware/firmware-linux-nonfree/default.nix | 4 ++-- pkgs/os-specific/linux/microcode/amd.nix | 16 ++++++++-------- pkgs/os-specific/linux/microcode/intel.nix | 5 +++-- 3 files changed, 13 insertions(+), 12 deletions(-) diff --git a/pkgs/os-specific/linux/firmware/firmware-linux-nonfree/default.nix b/pkgs/os-specific/linux/firmware/firmware-linux-nonfree/default.nix index 6bc4cf3f865f..f5efc565753c 100644 --- a/pkgs/os-specific/linux/firmware/firmware-linux-nonfree/default.nix +++ b/pkgs/os-specific/linux/firmware/firmware-linux-nonfree/default.nix @@ -54,8 +54,8 @@ in stdenv.mkDerivation { buildInputs = [ dpkg ]; installPhase = '' - mkdir -p $out/share - cp -r lib/firmware/* "$out/" + mkdir -p $out/share $out/lib/firmware + cp -r lib/firmware/* "$out/lib/firmware/" cp -r usr/share/doc $out/share/ find $out/share -name changelog.gz | xargs rm ''; diff --git a/pkgs/os-specific/linux/microcode/amd.nix b/pkgs/os-specific/linux/microcode/amd.nix index d54f93a7bd1c..0ca33fa31f04 100644 --- a/pkgs/os-specific/linux/microcode/amd.nix +++ b/pkgs/os-specific/linux/microcode/amd.nix @@ -1,25 +1,25 @@ { stdenv, fetchurl }: stdenv.mkDerivation rec { - name = "amd-ucode-2012-09-10"; src = fetchurl { urls = - [ "http://www.amd64.org/pub/microcode/${name}.tar" - "http://pkgs.fedoraproject.org/repo/pkgs/microcode_ctl/${name}.tar/559bc355d3799538584add80df2996f0/${name}.tar" + [ "http://pkgs.fedoraproject.org/repo/pkgs/microcode_ctl/${name}.tar/559bc355d3799538584add80df2996f0/${name}.tar" + "http://www.amd64.org/pub/microcode/${name}.tar" ]; sha256 = "065phvhx5hx5ssdd1x2p5m1yv26ak7l5aaw6yk6h95x9mxn5r111"; }; installPhase = '' - mkdir -p $out/amd-ucode - mv microcode_amd_fam15h.bin microcode_amd.bin $out/amd-ucode/ + mkdir -p $out/lib/firmware/amd-ucode $out/share/doc/amd-ucode + mv microcode_amd_fam15h.bin microcode_amd.bin $out/lib/firmware/amd-ucode/ + mv LICENSE $out/share/doc/amd-ucode ''; meta = { - description = "AMD Processor Microcode Patch"; - homepage = "http://www.amd64.org/support/microcode.html"; - license = "non-free"; + description = "AMD Processor microcode patch"; + homepage = http://www.amd64.org/support/microcode.html; + license = stdenv.lib.licenses.unfreeRedistributableFirmware; }; } diff --git a/pkgs/os-specific/linux/microcode/intel.nix b/pkgs/os-specific/linux/microcode/intel.nix index fdd8bf63dfc1..ad7cea180846 100644 --- a/pkgs/os-specific/linux/microcode/intel.nix +++ b/pkgs/os-specific/linux/microcode/intel.nix @@ -11,6 +11,7 @@ stdenv.mkDerivation { }; buildInputs = [ microcode2ucode ]; + sourceRoot = "."; buildPhase = '' @@ -18,8 +19,8 @@ stdenv.mkDerivation { ''; installPhase = '' - mkdir -p $out - cp -r intel-ucode "$out/" + mkdir -p $out/lib/firmware + cp -r intel-ucode "$out/lib/firmware/" ''; meta = {