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
microplane: init at 0.0.25 #107861
microplane: init at 0.0.25 #107861
Conversation
-ldflags= | ||
-X main.version=v${version} |
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.
-ldflags= | |
-X main.version=v${version} | |
-ldflags="-s -w -X main.version=v${version}" |
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.
Super fast ⚡ thanks!
Just made the change.
df35547
to
5460ceb
Compare
# Regenerate deps.nix with the following steps: | ||
# | ||
# git clone git@github.com:Clever/microplane.git | ||
# cd microplane | ||
# git checkout v<version> | ||
# dep2nix | ||
|
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.
# Regenerate deps.nix with the following steps: | |
# | |
# git clone git@github.com:Clever/microplane.git | |
# cd microplane | |
# git checkout v<version> | |
# dep2nix | |
# Regenerate deps.nix with the following commands: | |
# git clone https://github.com/Clever/microplane.git | |
# cd microplane | |
# git checkout v<version> | |
# dep2nix |
''; | ||
|
||
postInstall = '' | ||
mv $out/bin/microplane $out/bin/mp |
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.
I am not a fan of putting a binary on every available two or three letter combination. The binary name is microplane
and should stay like this. You can add such aliases to your .bashrc.
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.
Sounds good to me 👍
I was trying to stay close to upstream, and all of their documentation and blog articles I've seen refer to the binary as mp
, so that's something to take in to account, but I think giving it its full name microplane
won't be confusing. It will also prevent any unnecessary name conflicts too.
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.
If mp
is such a recurring name in official documentations and tutorials, I suggest you create a symlink instead of moving. It will provide no surprises to new users.
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.
Ok, I did another quick check, and I can't find mention of upstream calling the binary by its full name.
And here's some new pieces of info that may help bring consensus...
Looks like the binary refers to itself as mp
:
$ microplane
Microplane makes git changes across many repos
Usage:
mp [command]
Available Commands:
clone Clone all repos targeted by init
docs Generates markdown docs for each command
help Help about any command
init Initialize a microplane workflow
merge Merge pushed changes
plan Plan changes by running a command against cloned repos
push Push planned changes
status Status shows a workflow's progress
Flags:
-h, --help help for mp
-r, --repo string single repo to operate on
Use "mp [command] --help" for more information about a command.
And it looks like upstream calls the binary the shorter name in their releases:
mp-0.0.25-darwin-amd64
mp-0.0.25-linux-amd64
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 symlink should suffice.
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.
Ok just symlinked microplane
to mp
.
Result of 1 package built:
|
Result of 1 package built:
|
5460ceb
to
d0544a2
Compare
d0544a2
to
bd287c9
Compare
Motivation for this change
Wanted to add
microplane
since I'm looking in to using it.Some notes:
Using buildGoPackage instead of buildGoModile, as this project uses dep, so it looks like I need
goDeps
that buildGoPackage provides.Using
subPackages = ["."];
because I noticed a binary nameddemo
was being built, and I just wanted themicroplane
binary.I'm renaming the binary to
mp
because that's how the Makefile has it. And I had trouble giving-o $out/bin/mp
as a Go build flag, since it would complain that the directory didn't exist, so I just opted to rename it afterwards.There doesn't seem to be a
-v
flag orversion
subcommand 😕 , so I'm not sure how to confirm that the version is correct.Things done
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)