Skip to content

Commit

Permalink
Merge pull request #316718 from thillux/dediprog-sf100
Browse files Browse the repository at this point in the history
dediprog-sf100: init at 1.14.20.x
  • Loading branch information
0x4A6F authored Jul 16, 2024
2 parents ba861dc + 461c584 commit a24b499
Showing 1 changed file with 51 additions and 0 deletions.
51 changes: 51 additions & 0 deletions pkgs/by-name/de/dediprog-sf100/package.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
{
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 ];
};
})

0 comments on commit a24b499

Please sign in to comment.