summary refs log tree commit diff
path: root/pkgs/os-specific/linux/libudev0-shim/default.nix
blob: 642dd534232baf882aa8fd939b61d23a835b22aa (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
{ lib, stdenv, fetchFromGitHub, udev }:

stdenv.mkDerivation rec {
  pname = "libudev0-shim";
  version = "1";

  src = fetchFromGitHub {
    owner = "archlinux";
    repo = "libudev0-shim";
    rev = "v${version}";
    sha256 = "1460qm6rp1cqnns39lj24z7191m8sbpvbjabqbzb55dkdd2kw50z";
  };

  buildInputs = [ udev ];

  installPhase = ''
    name="$(echo libudev.so.*)"
    install -Dm755 "$name" "$out/lib/$name"
    ln -s "$name" "$out/lib/libudev.so.0"
  '';

  meta = with lib; {
    description = "Shim to preserve libudev.so.0 compatibility";
    homepage = "https://github.com/archlinux/libudev0-shim";
    platforms = platforms.linux;
    license = licenses.lgpl21;
    maintainers = with maintainers; [ abbradar ];
  };
}