nixpkgs/pkgs/by-name/rk/rkdeveloptool-pine64/package.nix
aleksana 571c71e6f7 treewide: migrate packages to pkgs/by-name, take 1
We are migrating packages that meet below requirements:

1. using `callPackage`
2. called path is a directory
3. overriding set is empty (`{ }`)
4. not containing path expressions other than relative path (to
makenixpkgs-vet happy)
5. not referenced by nix files outside of the directory, other
than`pkgs/top-level/all-packages.nix`
6. not referencing nix files outside of the directory
7. not referencing `default.nix` (since it's changed to `package.nix`)
8. `outPath` doesn't change after migration

The tool is here: https://github.com/Aleksanaa/by-name-migrate.
2024-11-09 20:04:51 +08:00

46 lines
1.1 KiB
Nix

{ lib
, stdenv
, fetchurl
, meson
, pkg-config
, libusb1
, scdoc
, ninja
, cmake
}:
let
rev = "cce7d2a5c4efd4e7727c440868141229354b327b";
in
stdenv.mkDerivation {
pname = "rkdeveloptool";
version = "unstable-2021-09-04";
src = fetchurl {
url = "https://gitlab.com/pine64-org/quartz-bsp/rkdeveloptool/-/archive/${rev}/rkdeveloptool-${rev}.tar.gz";
sha256 = "sha256-u/x1Y1zZ19SYwNLVAvpqjH247RijyDJ1HTDWIsmqlFk=";
};
postPatch = ''
substituteInPlace meson.build --replace \
"udev_rules_dir = udev.get_pkgconfig_variable('udevdir') + '/rules.d'" \
"udev_rules_dir = '$out/lib/udev'"
'';
nativeBuildInputs = [ meson ninja cmake pkg-config scdoc ];
buildInputs = [ libusb1 ];
meta =
let
inherit (lib) maintainers;
in
{
homepage = "https://gitlab.com/pine64-org/quartz-bsp/rkdeveloptool/";
description = "Tool from Rockchip to communicate with Rockusb devices (pine64 fork)";
license = lib.licenses.gpl2Only;
maintainers = [ maintainers.adisbladis ];
mainProgram = "rkdeveloptool";
};
}