diff options
author | volth <volth@webmaster.ms> | 2018-08-07 13:44:12 +0000 |
---|---|---|
committer | xeji <36407913+xeji@users.noreply.github.com> | 2018-08-07 15:44:12 +0200 |
commit | 7bff0b71d173256022b08014a8a9e2e42f3ba08e (patch) | |
tree | 5bc1d6d27207fe689b5e892a1c092961ba5ba9ce | |
parent | e1da32d88787ba773733ff00286aeb4c2c2daf04 (diff) |
intel2200BGFirmware: fixed-output derivation (#44604)
-rw-r--r-- | pkgs/os-specific/linux/firmware/intel2200BGFirmware/default.nix | 36 |
1 files changed, 13 insertions, 23 deletions
diff --git a/pkgs/os-specific/linux/firmware/intel2200BGFirmware/default.nix b/pkgs/os-specific/linux/firmware/intel2200BGFirmware/default.nix index bf8bcf3872614..372be2d71f2cd 100644 --- a/pkgs/os-specific/linux/firmware/intel2200BGFirmware/default.nix +++ b/pkgs/os-specific/linux/firmware/intel2200BGFirmware/default.nix @@ -1,35 +1,25 @@ -{ stdenv, fetchurl }: +{ lib, fetchzip }: let version = "3.1"; in -stdenv.mkDerivation { +fetchzip { name = "intel2200BGFirmware-${version}"; + url = "https://src.fedoraproject.org/repo/pkgs/ipw2200-firmware/ipw2200-fw-${version}.tgz/eaba788643c7cc7483dd67ace70f6e99/ipw2200-fw-${version}.tgz"; + sha256 = "0zjyjndyc401pn5x5lgypxdal21n82ymi3vbb2ja1b89yszj432b"; - src = fetchurl { - url = "https://src.fedoraproject.org/repo/pkgs/ipw2200-firmware/ipw2200-fw-${version}.tgz/eaba788643c7cc7483dd67ace70f6e99/ipw2200-fw-${version}.tgz"; - sha256 = "c6818c11c18cc030d55ff83f64b2bad8feef485e7742f84f94a61d811a6258bd"; - }; - - phases = [ "unpackPhase" "installPhase" ]; - - installPhase = '' - mkdir -p $out/lib/firmware - for fw in \ - ipw2200-bss.fw \ - ipw2200-ibss.fw \ - ipw2200-sniffer.fw - do - cp -f $fw $out/lib/firmware/$fw - done - mkdir -p $out/share/doc/intel2200BGFirmware - cp -f LICENSE.ipw2200-fw $out/share/doc/intel2200BGFirmware/LICENSE + postFetch = '' + tar -xzvf $downloadedFile --strip-components=1 + 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 ''; - meta = with stdenv.lib; { + meta = with lib; { description = "Firmware for Intel 2200BG cards"; homepage = http://ipw2200.sourceforge.net/firmware.php; - license = stdenv.lib.licenses.unfreeRedistributableFirmware; + license = licenses.unfreeRedistributableFirmware; maintainers = with maintainers; [ sternenseemann ]; - platforms = with platforms; linux; + platforms = platforms.linux; }; } |