Created
March 5, 2016 16:35
-
-
Save manveru/d4bc162127365f6f812d to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ stdenv, fetchFromGitHub, kernel }: | |
stdenv.mkDerivation rec { | |
name = "tuxedo-wmi-${kernel.version}-${version}"; | |
version = "1.5.1"; | |
src = fetchFromGitHub { | |
owner = "metmayhem"; | |
repo = "tuxedo-wmi"; | |
rev = "a6ab8d4160b16ab75e2a820e1d69e71934017515"; | |
sha256 = "12hf5cxmffk3jp8a178iw3jz4aa1k4f5zxmn8i66b9cbj60b6a4s"; | |
}; | |
NIX_DEBUG = 1; | |
unpackPhase = '' | |
mkdir -p $out/build | |
cp $src/src/* $out/build | |
''; | |
patchPhase = '' | |
substituteInPlace $out/build/Makefile --replace /lib/modules/ "${kernel.dev}/lib/modules/" | |
substituteInPlace $out/build/Makefile --replace '$(shell uname -r)' "${kernel.modDirVersion}" | |
''; | |
buildPhase = '' | |
make -C $out/build | |
''; | |
installPhase = '' | |
mkdir -p "$out/lib/modules/${kernel.modDirVersion}" | |
cp $out/build/tuxedo-wmi.ko $out/lib/modules/${kernel.modDirVersion} | |
rm -rf $out/build | |
''; | |
meta = { | |
description = "Full color keyboard / rfkill driver for late model Clevo laptops"; | |
homepage = "https://github.com/fleaplus/tuxedo-wmi"; | |
platforms = stdenv.lib.platforms.linux; | |
license = stdenv.lib.licenses.gpl2; | |
maintainer = stdenv.lib.maintainers.manveru; | |
}; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
i'm new to Nix. I like to install the tuxedo-wmi.nix but i get errors.
$ nix-build tuxedo-wmi.nix
error: cannot auto-call a function that has an argument without a default value ('stdenv')
or
$ nix-build -E 'with import <nixpkgs> {}; callPackage ./tuxedo-wmi.nix {}'
error: attempt to call something which is not a function but a set, at /nix/store/jwkxjj3j56f9dkh7w0lr186gdi5p5p7a-nixos-18.03/nixos/lib/customisation.nix:74:12
any hint?