New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
micropro: init at 0.4 #89689
micropro: init at 0.4 #89689
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Added a few suggestions :)
Also, commit message does not follow the contributing guidelines.
@IvarWithoutBones I've incorporated your suggestions c: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Few more minor nits, otherwise LGTM :)
]; | ||
|
||
buildInputs = [ | ||
stdenv |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Doesn't look like stdenv
is required here.
@@ -0,0 +1,46 @@ | |||
{stdenv, fetchgit, pkg-config, libusb1}: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Minor formatting thing:
{stdenv, fetchgit, pkg-config, libusb1}: | |
{ stdenv, fetchgit, pkg-config, libusb1 }: | |
stdenv.mkDerivation rec { |
PKG_CONFIG = "${pkg-config}/bin/pkg-config"; | ||
|
||
buildPhase = '' | ||
sed -i -e 's/ GIT_BRANCH = .*/ GIT_BRANCH = "master"/g' ./Makefile |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The patching should probably be done in the preConfigure
phase. Also, i think using substituteInPlace
would be a bit cleaner than using sed
.
pname = "minipro"; | ||
version = "0.4"; | ||
|
||
src = fetchgit { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Apologies, missed this earlier. Should be using fetchFromGitLab
here, this way you can fetch the stable release:
src = fetchgit { | |
src = fetchFromGitLab { | |
owner = "DavidGriffith"; | |
repo = "minipro"; | |
rev = version; | |
sha256 = "17k2vanz0xrmvl5sa12jr1n4x5m2s7292qs79mvj40bxbhrcmaci"; | |
}; |
cp -rv ./minipro $out/bin/ | ||
mkdir $outputMan -p | ||
mv ./man/* $outputMan | ||
''; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This should be tabbed over once
@IvarWithoutBones I've split up the package in stable and unstable, moved to using leaveDotGit so that the package can be build as intended (which sadly does mean that we need to keep using fetchgit), fixed the manpages and the udev files, it should be good to go now c: Thank you for your help and feedback so far! |
Why both? Wouldn't just stable be good enough?
That's probably not a very good idea, because of #8567 (Also, pretty sure
Glad it's helpful :) Apologies about inconsistencies and such, I'm quite a beginner at this 😅 Also, looks like you forgot to push. |
|
Ah, okay 👍
This is an issue in the cloning process, so it would. |
we can go back to patching out the version information and just showing blanks on |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Few more nits :)
{ stdenv, installShellFiles, which, fetchgit, git, pkg-config, libusb1 }: | ||
stdenv.mkDerivation rec { | ||
pname = "minipro"; | ||
version = "0.4dev"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Version naming convention for unstable git revs is unstable-<date>
.
version = "0.4dev"; | |
version = "unstable-2020-04-18"; |
substituteInPlace Makefile --replace '$(shell date "+%Y-%m-%d %H:%M:%S %z")' "1970-01-01 00:00:00 +0000" | ||
''; | ||
|
||
buildPhase = '' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could be using makeFlags
for this.
buildPhase = '' | |
makeFlags = [ "-e minipro" ]; |
]; | ||
|
||
buildInputs = [ | ||
stdenv |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
stdenv
doesn't seem to be required
description = "An open source program for controlling the MiniPRO TL866xx series of chip programmers"; | ||
homepage = "https://gitlab.com/DavidGriffith/minipro"; | ||
maintainers = with maintainers; [ kalium ]; | ||
license = stdenv.lib.licenses.gpl3; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Since you're already doing with stdenv.lib;
, you don't need to mention that here.
license = stdenv.lib.licenses.gpl3; | |
license = licenses.gpl3; |
@@ -0,0 +1,49 @@ | |||
{ stdenv, installShellFiles, which, fetchgit, git, pkg-config, libusb1 }: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It doesn't look like you're using either git
or which
, and the package seems to compile fine without them.
I have a local expression which does none of the git patching, and doesn't have
I think we don't need to worry about that at all. |
minipro is a utility for using the minipro TL866 series of universal programmers corrected with suggestions from @IvarWithoutBones
okay good, seems to work for me as well now. I've incorporated your comments, and only patch out the buildDate timestamp (else its not deterministic) :). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGMT :)
We need a rebase because the maintainer-list got updated |
I marked this as stale due to inactivity. → More info |
Motivation for this change
getting the Micropro TL866CS universal programmer utility in nixpkgs
Things done
Wrote nix file for micropro utility, added self as its maintainer.
sandbox
innix.conf
on non-NixOS linux)nix-shell -p nixpkgs-review --run "nixpkgs-review wip"
./result/bin/
)nix path-info -S
before and after)