nixpkgs mirror (for testing)
github.com/NixOS/nixpkgs
nix
1{
2 autoreconfHook,
3 fetchFromGitHub,
4 lib,
5 libmnl,
6 pkg-config,
7 stdenv,
8}:
9
10stdenv.mkDerivation (finalAttrs: {
11 pname = "mdio-tools";
12 version = "1.3.1";
13
14 src = fetchFromGitHub {
15 owner = "wkz";
16 repo = "mdio-tools";
17 tag = finalAttrs.version;
18 hash = "sha256-NomChJrYwMDPXNw5r2p11kGfYUvJBHCdLXy1SA8kOaM=";
19 };
20
21 nativeBuildInputs = [
22 autoreconfHook
23 pkg-config
24 ];
25 buildInputs = [ libmnl ];
26
27 postPatch = ''
28 substituteInPlace configure.ac \
29 --replace-fail "git describe --always --dirty --tags" "echo ${finalAttrs.version}"
30 '';
31
32 meta = {
33 description = "Low-level debug tools for MDIO devices";
34 homepage = "https://github.com/wkz/mdio-tools";
35 changelog = "https://github.com/wkz/mdio-tools/blob/${finalAttrs.src.rev}/ChangeLog.md";
36 license = lib.licenses.gpl2Only;
37 maintainers = [ lib.maintainers.jmbaur ];
38 mainProgram = "mdio";
39 platforms = lib.platforms.linux;
40 };
41})