-
-
Notifications
You must be signed in to change notification settings - Fork 14.5k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #316718 from thillux/dediprog-sf100
dediprog-sf100: init at 1.14.20.x
- Loading branch information
Showing
1 changed file
with
51 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 ]; | ||
}; | ||
}) |