depot/third_party/nixpkgs/pkgs/by-name/de/dediprog-sf100/package.nix
Default email f34ce41345 Project import generated by Copybara.
GitOrigin-RevId: b73c2221a46c13557b1b3be9c2070cc42cf01eb3
2024-07-27 08:49:29 +02:00

51 lines
1.3 KiB
Nix

{
lib,
pkgs,
stdenv,
fetchFromGitHub,
libusb1,
pkg-config,
}:
let
dediprogVersion = "1.14.20.x";
dediprogHash = "sha256-hQvBZIwaWEC41vj2flaekIUP9Fwtj/JPi3XwRxfUbD0=";
in
stdenv.mkDerivation (finalAttrs: {
pname = "dediprog-sf100-linux";
version = finalAttrs.dediprogVersion;
inherit dediprogVersion dediprogHash;
src = fetchFromGitHub {
owner = "DediProgSW";
repo = "SF100Linux";
rev = "V${finalAttrs.dediprogVersion}";
hash = finalAttrs.dediprogHash;
};
buildInputs = [ libusb1 ];
nativeBuildInputs = [ pkg-config ];
udevRules = pkgs.writeText "dediprog.rules" ''
ACTION=="add", SUBSYSTEM=="usb", ATTRS{idVendor}=="0483", ATTRS{idProduct}=="dada", MODE="660", GROUP="plugdev"
'';
installPhase = ''
runHook preInstall
install -Dm0755 ./dpcmd -t $out/bin
install -Dm0644 ./ChipInfoDb.dedicfg -t $out/share/DediProg
install -Dm0644 ${finalAttrs.udevRules} -D $out/lib/udev/rules.d/60-dediprog.rules
runHook postInstall
'';
meta = {
homepage = "https://github.com/DediProgSW/SF100Linux";
description = "Linux software for DediProg SF100/SF600 programmers";
license = lib.licenses.gpl2;
platforms = lib.platforms.linux;
maintainers = with lib.maintainers; [ thillux ];
};
})