Skip to content

Commit

Permalink
lm4flash: init at 0.1.3 (#369386)
Browse files Browse the repository at this point in the history
  • Loading branch information
misuzu authored Jan 3, 2025
2 parents 3cbcf3e + a1210cf commit dca5800
Show file tree
Hide file tree
Showing 2 changed files with 63 additions and 0 deletions.
6 changes: 6 additions & 0 deletions maintainers/maintainer-list.nix
Original file line number Diff line number Diff line change
Expand Up @@ -15312,6 +15312,12 @@
githubId = 44561540;
name = "Synth Morxemplum";
};
MostafaKhaled = {
email = "[email protected]";
github = "mostafa-khaled775";
githubId = 112074172;
name = "Mostafa Khaled";
};
MostAwesomeDude = {
email = "[email protected]";
github = "MostAwesomeDude";
Expand Down
57 changes: 57 additions & 0 deletions pkgs/by-name/lm/lm4flash/package.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
{
fetchFromGitHub,
stdenv,
libusb1,
pkg-config,
lib,
writeText,
}:
let
stellaris-udev-rules = writeText "61.stellpad.rules" ''
SUBSYSTEM=="usb", ATTRS{idVendor}=="1cbe", ATTRS{idProduct}=="00fd", MODE="0666"
'';
in
stdenv.mkDerivation rec {
pname = "lm4flash";
version = "0.1.3";

src = fetchFromGitHub {
owner = "utzig";
repo = "lm4tools";
tag = "v${version}";
hash = "sha256-ZjuCH/XjQEgg6KHAvb95/BkAy+C2OdbtBb/i6K30+uo=";
};
sourceRoot = "${src.name}/lm4flash";

strictDeps = true;

nativeBuildInputs = [
pkg-config
];

buildInputs = [
libusb1
];

buildFlags = [ "release" ];

installFlags = [ "PREFIX=$(out)" ];

postInstall = ''
install -Dm644 "${stellaris-udev-rules}" "$out/etc/udev/rules.d/61.stellpad.rules"
'';

meta = {
description = "Command-line firmware flashing tool for the Stellaris Launchpad";
longDescription = ''
Command-line firmware flashing tool using libusb-1.0 to communicate with
the Stellaris Launchpad ICDI. Works on all Linux, Mac OS X, Windows, and
BSD systems.
'';
homepage = "https://github.com/utzig/lm4tools";
license = lib.licenses.gpl2Plus;
mainProgram = "lm4flash";
maintainers = with lib.maintainers; [ MostafaKhaled ];
platforms = lib.platforms.all;
};
}

0 comments on commit dca5800

Please sign in to comment.