Conversation
| sha256 = "0qxw3vsbf9cg6b3pp3z1k2fjl8xrnjdr2gcncnr5jzd1mix6yd4y"; | ||
| }; | ||
|
|
||
| # Version in specific format, created by: "git log -1 --pretty="format:%h %ci %s" |
There was a problem hiding this comment.
Updating this by hand seems like it'd get annoying after a while. What about just taking part of src.rev or does it have to have that format? Or at least use git within the build to produce the thing.
Also note that overriding patchPhase prevents users from passing additional patches via patches; not necessarily a problem, but something to be aware of.
| echo "const char *gitversion = \"810fc8d 2019-02-27 00:05:27 +0100 fix some includes\";" > src/gitversion.cpp | ||
| ''; | ||
|
|
||
| buildInputs = [ pkgconfig sqlite libyamlcpp libuuid gnome3.gtkmm epoxy librsvg zeromq cppzmq glm libgit2 curl boost python3 opencascade ]; |
There was a problem hiding this comment.
I think pkgconfig makes more sense as a native build input
| NIX_CFLAGS_COMPILE = "-I${opencascade}/include/oce"; | ||
|
|
||
| installPhase = '' | ||
| mkdir -p $out/bin |
There was a problem hiding this comment.
Golfing: I believe this reduces to install -Dt $out/bin horizon-{eda,imp}
There was a problem hiding this comment.
We now have an install target that also installs icons, desktop entry and such.
|
@GrahamcOfBorg build horizon-eda |
aanderse
left a comment
There was a problem hiding this comment.
I have left a few comments I hope you will find helpful.
| { stdenv, fetchFromGitHub, pkgconfig, sqlite, libyamlcpp, libuuid, gnome3, epoxy, librsvg, zeromq, cppzmq, glm, libgit2, curl, boost, python3, opencascade, libzip, podofo, wrapGAppsHook }: | ||
|
|
||
| stdenv.mkDerivation rec { | ||
| name = "horizon-eda-${version}"; |
There was a problem hiding this comment.
Please use pname = "horizon-eda"; instead as name = "${pname}-${version}"; is already implied.
|
|
||
| stdenv.mkDerivation rec { | ||
| name = "horizon-eda-${version}"; | ||
| version = "20190716"; |
There was a problem hiding this comment.
If a package is not a release but a commit from a repository, then the version part of the name must be the date of that (fetched) commit. The date must be in "YYYY-MM-DD" format. Also append "unstable" to the name - e.g., "pkgname-unstable-2014-09-23".
| echo "const char *gitversion = \"${src.rev}\";" > src/gitversion.cpp | ||
| ''; | ||
|
|
||
| buildInputs = [ pkgconfig sqlite libyamlcpp libuuid gnome3.gtkmm epoxy librsvg zeromq cppzmq glm libgit2 curl boost python3 libzip podofo opencascade ]; |
There was a problem hiding this comment.
Please see comment by @joachifm about pkgconfig belonging to nativeBuildInputs instead.
|
|
||
| meta = with stdenv.lib; { | ||
| description = "A free EDA software to develop printed circuit boards"; | ||
| homepage = https://github.com/carrotIndustries/horizon; |
| ''; | ||
|
|
||
| preFixup = '' | ||
| wrapProgram "$out/bin/horizon-eda" "''${gappsWrapperArgs[@]}" |
| src = fetchFromGitHub { | ||
| owner = "horizon-eda"; | ||
| repo = "horizon"; | ||
| rev = "3f777bd2501b953981d64cf2054c265ce8d65c02"; |
There was a problem hiding this comment.
| rev = "3f777bd2501b953981d64cf2054c265ce8d65c02"; | |
| rev = "v${version}"; |
| sha256 = "1d40lfgylwl3srqazyjgw9l3n7i82xrvkjcxvpx7ddyzy1d2aqmr"; | ||
| }; | ||
|
|
||
| buildInputs = [ sqlite libyamlcpp libuuid gnome3.gtkmm epoxy librsvg zeromq cppzmq glm libgit2 curl boost python3 libzip podofo opencascade ]; |
There was a problem hiding this comment.
I would prefer if you were to sort this alphabetically (easier for me to do a quick comparison against https://docs.horizon-eda.org/en/latest/build-linux.html), but more importantly place each entry on a new line, like so:
buildInputs = [
boost
curl
...
zeromq
];
Mostly based on NixOS#56497 by @Luz
|
Hello, I'm a bot and I thank you in the name of the community for your contributions. Nixpkgs is a busy repository, and unfortunately sometimes PRs get left behind for too long. Nevertheless, we'd like to help committers reach the PRs that are still important. This PR has had no activity for 180 days, and so I marked it as stale, but you can rest assured it will never be closed by a non-human. If this is still important to you and you'd like to remove the stale label, we ask that you leave a comment. Your comment can be as simple as "still important to me". But there's a bit more you can do: If you received an approval by an unprivileged maintainer and you are just waiting for a merge, you can @ mention someone with merge permissions and ask them to help. You might be able to find someone relevant by using Git blame on the relevant files, or via GitHub's web interface. You can see if someone's a member of the nixpkgs-committers team, by hovering with the mouse over their username on the web interface, or by searching them directly on the list. If your PR wasn't reviewed at all, it might help to find someone who's perhaps a user of the package or module you are changing, or alternatively, ask once more for a review by the maintainer of the package/module this is about. If you don't know any, you can use Git blame on the relevant files, or GitHub's web interface to find someone who touched the relevant files in the past. If your PR has had reviews and nevertheless got stale, make sure you've responded to all of the reviewer's requests / questions. Usually when PR authors show responsibility and dedication, reviewers (privileged or not) show dedication as well. If you've pushed a change, it's possible the reviewer wasn't notified about your push via email, so you can always officially request them for a review, or just @ mention them and say you've addressed their comments. Lastly, you can always ask for help at our Discourse Forum, or more specifically, at this thread or at #nixos' IRC channel. |
|
As of #99964 this is merged so this shouldn't be necessary any longer |
Motivation for this change
Things done
sandboxinnix.confon non-NixOS)nix-shell -p nox --run "nox-review wip"./result/bin/)nix path-info -Sbefore and after)