From 0dea3803e7c02c43d90aa45a2943d9df75349b38 Mon Sep 17 00:00:00 2001 From: Tobias Geerinckx-Rice Date: Wed, 16 Mar 2016 20:47:54 +0100 Subject: [PATCH] freefall: inherit kernel package from linuxPackages Let's never bump again. --- pkgs/os-specific/linux/freefall/default.nix | 14 ++++++-------- pkgs/top-level/all-packages.nix | 4 +++- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/pkgs/os-specific/linux/freefall/default.nix b/pkgs/os-specific/linux/freefall/default.nix index 590b6b61dd3b..54be786d10d6 100644 --- a/pkgs/os-specific/linux/freefall/default.nix +++ b/pkgs/os-specific/linux/freefall/default.nix @@ -1,13 +1,9 @@ -{ stdenv, fetchurl }: +{ stdenv, kernel }: stdenv.mkDerivation rec { - name = "freefall-${version}"; - version = "4.3"; + inherit (kernel) version src; - src = fetchurl { - sha256 = "1bpkr45i4yzp32p0vpnz8mlv9lk4q2q9awf1kg9khg4a9g42qqja"; - url = "mirror://kernel/linux/kernel/v4.x/linux-${version}.tar.xz"; - }; + name = "freefall-${version}"; postPatch = '' cd tools/laptop/freefall @@ -20,6 +16,8 @@ stdenv.mkDerivation rec { makeFlags = [ "PREFIX=$(out)" ]; meta = with stdenv.lib; { + inherit (kernel.meta) homepage license; + description = "Free-fall protection for spinning HP/Dell laptop hard drives"; longDescription = '' Provides a shock protection facility in modern laptops with spinning hard @@ -29,7 +27,7 @@ stdenv.mkDerivation rec { feature, which should cause the drive to switch to idle mode and unload the disk heads, and an accelerometer device. It has no effect on SSD devices! ''; - license = licenses.gpl2; + platforms = platforms.linux; maintainers = with maintainers; [ nckx ]; }; diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index ef2bb17b046b..9eaaab0b0e87 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -10274,7 +10274,9 @@ let firejail = callPackage ../os-specific/linux/firejail {}; - freefall = callPackage ../os-specific/linux/freefall { }; + freefall = callPackage ../os-specific/linux/freefall { + inherit (linuxPackages) kernel; + }; fuse = callPackage ../os-specific/linux/fuse { };