From b46221d76478c492547fbee3ec2e1a3a47655834 Mon Sep 17 00:00:00 2001 From: Alexandre Iooss Date: Sat, 24 Sep 2022 10:24:40 +0200 Subject: [PATCH] media-player-info: rename name to pname&version --- pkgs/data/misc/media-player-info/default.nix | 45 +++++++++----------- 1 file changed, 21 insertions(+), 24 deletions(-) diff --git a/pkgs/data/misc/media-player-info/default.nix b/pkgs/data/misc/media-player-info/default.nix index 56e4ace41f4d..652298d1656d 100644 --- a/pkgs/data/misc/media-player-info/default.nix +++ b/pkgs/data/misc/media-player-info/default.nix @@ -1,31 +1,28 @@ { lib, stdenv, fetchurl, pkg-config, python3, udev, systemd }: -let - name = "media-player-info-24"; -in +stdenv.mkDerivation rec { + pname = "media-player-info"; + version = "24"; - stdenv.mkDerivation { - inherit name; + src = fetchurl { + url = "https://www.freedesktop.org/software/media-player-info/${pname}-${version}.tar.gz"; + sha256 = "0d0i7av8v369hzvlynwlrbickv1brlzsmiky80lrjgjh1gdldkz6"; + }; - src = fetchurl { - url = "https://www.freedesktop.org/software/media-player-info/${name}.tar.gz"; - sha256 = "0d0i7av8v369hzvlynwlrbickv1brlzsmiky80lrjgjh1gdldkz6"; - }; + buildInputs = [ udev systemd ]; + nativeBuildInputs = [ pkg-config python3 ]; - buildInputs = [ udev systemd ]; - nativeBuildInputs = [ pkg-config python3 ]; + postPatch = '' + patchShebangs ./tools + ''; - postPatch = '' - patchShebangs ./tools - ''; + configureFlags = [ "--with-udevdir=${placeholder "out"}/lib/udev" ]; - configureFlags = [ "--with-udevdir=${placeholder "out"}/lib/udev" ]; - - meta = with lib; { - description = "A repository of data files describing media player capabilities"; - homepage = "https://www.freedesktop.org/wiki/Software/media-player-info/"; - license = licenses.bsd3; - maintainers = with maintainers; [ ttuegel ]; - platforms = with platforms; linux; - }; - } + meta = with lib; { + description = "A repository of data files describing media player capabilities"; + homepage = "https://www.freedesktop.org/wiki/Software/media-player-info/"; + license = licenses.bsd3; + maintainers = with maintainers; [ ttuegel ]; + platforms = with platforms; linux; + }; +}