mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-22 23:13:19 +00:00
Merge pull request #312900 from wucke13/dev/add-stlink-tool
imsprog: init at 1.4.1
This commit is contained in:
commit
6987cda22e
55
pkgs/by-name/im/imsprog/package.nix
Normal file
55
pkgs/by-name/im/imsprog/package.nix
Normal file
@ -0,0 +1,55 @@
|
||||
{ lib, stdenv, fetchFromGitHub, cmake, makeWrapper, pkg-config, bash, libusb1, qt5, wget, zenity }:
|
||||
|
||||
stdenv.mkDerivation (finalAttrs: {
|
||||
pname = "imsprog";
|
||||
version = "1.4.1";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "bigbigmdm";
|
||||
repo = "IMSProg";
|
||||
rev = "refs/tags/v${finalAttrs.version}";
|
||||
hash = "sha256-eF6TGlFEnMgMw1i/sfuXIRzNySVZe7UTKVHSIqJ+cUs=";
|
||||
};
|
||||
|
||||
strictDeps = true;
|
||||
|
||||
nativeBuildInputs = [
|
||||
cmake
|
||||
makeWrapper
|
||||
pkg-config
|
||||
qt5.wrapQtAppsHook
|
||||
qt5.qttools
|
||||
];
|
||||
|
||||
buildInputs = [
|
||||
bash # for patching the shebang in bin/IMSProg_database_update
|
||||
libusb1
|
||||
qt5.qtbase
|
||||
qt5.qtwayland
|
||||
];
|
||||
|
||||
# change default hardcoded path for chip database file, udev rules et al
|
||||
postPatch = ''
|
||||
while IFS= read -r -d "" file ; do
|
||||
substituteInPlace "$file" \
|
||||
--replace-quiet '/usr/bin/' "$out/bin/" \
|
||||
--replace-quiet '/usr/lib/' "$out/lib/" \
|
||||
--replace-quiet '/usr/share/' "$out/share/"
|
||||
done < <(grep --files-with-matches --null --recursive '/usr/' .)
|
||||
'';
|
||||
|
||||
postFixup = ''
|
||||
wrapProgram $out/bin/IMSProg_database_update \
|
||||
--prefix PATH : "${lib.makeBinPath [ wget zenity ]}"
|
||||
'';
|
||||
|
||||
meta = {
|
||||
changelog = "https://github.com/bigbigmdm/IMSProg/releases/tag/v${finalAttrs.version}";
|
||||
description = "A free I2C EEPROM programmer tool for CH341A device";
|
||||
homepage = "https://github.com/bigbigmdm/IMSProg";
|
||||
license = with lib.licenses; [ gpl3Plus gpl2Plus lgpl21Only ];
|
||||
mainProgram = "IMSProg";
|
||||
maintainers = with lib.maintainers; [ wucke13 ];
|
||||
platforms = lib.platforms.unix;
|
||||
};
|
||||
})
|
Loading…
Reference in New Issue
Block a user