4a7f99d55d
Part of: https://github.com/NixOS/nixpkgs/issues/108938 meta = with stdenv.lib; is a widely used pattern. We want to slowly remove the `stdenv.lib` indirection and encourage people to use `lib` directly. Thus let’s start with the meta field. This used a rewriting script to mostly automatically replace all occurances of this pattern, and add the `lib` argument to the package header if it doesn’t exist yet. The script in its current form is available at https://cs.tvl.fyi/depot@2f807d7f141068d2d60676a89213eaa5353ca6e0/-/blob/users/Profpatsch/nixpkgs-rewriter/default.nix
36 lines
856 B
Nix
36 lines
856 B
Nix
{ lib, stdenv, kernel, fetchFromGitHub }:
|
|
|
|
stdenv.mkDerivation {
|
|
pname = "can-isotp";
|
|
version = "20200910";
|
|
|
|
hardeningDisable = [ "pic" ];
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "hartkopp";
|
|
repo = "can-isotp";
|
|
rev = "21a3a59e2bfad246782896841e7af042382fcae7";
|
|
sha256 = "1laax93czalclg7cy9iq1r7hfh9jigh7igj06y9lski75ap2vhfq";
|
|
};
|
|
|
|
KERNELDIR = "${kernel.dev}/lib/modules/${kernel.modDirVersion}/build";
|
|
INSTALL_MOD_PATH = "\${out}";
|
|
|
|
buildPhase = ''
|
|
make modules
|
|
'';
|
|
|
|
installPhase = ''
|
|
make modules_install
|
|
'';
|
|
|
|
nativeBuildInputs = kernel.moduleBuildDependencies;
|
|
|
|
meta = with lib; {
|
|
description = "Kernel module for ISO-TP (ISO 15765-2)";
|
|
homepage = "https://github.com/hartkopp/can-isotp";
|
|
license = licenses.gpl2;
|
|
platforms = platforms.linux;
|
|
maintainers = [ maintainers.evck ];
|
|
};
|
|
}
|