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
rubiks: init at 20070917 #38803
rubiks: init at 20070917 #38803
Conversation
]; | ||
|
||
meta = with stdenv.lib; { | ||
homepage = https://github.com/graph-algorithms/edge-addition-planarity-suite; |
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.
That doesn't seem correct
do we really want to add a package from 2007 into our package set? |
Why not? I don't think rubiks cubes have changed significantly since then. |
that’s true, it might’ve reached some kind of EOL phase though. Before each release we fix tons of packages because of independencies (such as am inconpatible GCC versions) and I think that packages from 2007 will be quite painful to keep building.. |
It works for now without any special attention. I'm packaging this as a sage dependency, which means theres at least one other group interested in keeping it buildable. |
|
||
installFlags = [ | ||
"DESTDIR=${placeholder "out"}" | ||
"PREFIX=" |
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.
Normally, setting the prefix is preferred.
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'm sure I had a reason for that, I'll check what happens if I leave it out.
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.
Okay it works if I just set
"PREFIX=${placeholder "out"}"
But shouldn't that be done automatically anyways?
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.
No, it's --prefix
that is set by default: https://nixos.org/nixpkgs/manual/#ssec-configure-phase
Does it work if you do just "PREFIX=$out"
?
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.
Yes
mit # Dik T. Winter's software | ||
]; | ||
maintainers = with maintainers; [ timokau ]; | ||
platforms = platforms.all; |
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.
Tested?
Considering the number of patches, this is maybe better suited for a sage overlay. |
agreed, that's what I'm worried about - we need several patches ATM to keep it working and I fear that the number will grow with the time it lives in It's absolutely not that I want to discourage @timokau's work, I'm just not sure if we actually want to add as many packages as possible and rather say no to some new packages (e.g. when they're way to old). |
The patches are effectively the sage developers way to maintain it. I'm not sure why they prefer it to altering the source tarball in this case, since the tarball is generated by them anyways, but maybe they just want to keep it reproducible from the upstream packages. Debian, Gentoo and Arch all package this (and all the other packages I've created PRs for). When the package breaks somebody may fix it, probably me. If nobody does, it gets marked broken and someone might still fix it in the future. I am pretty sure there are multiple people here interested in sage, and nix might attract more once its packaged in a proper way (I think nix and sage more or less attrackt similar groups of people). If I create an overlay, all the maintenance burden is on me alone. I don't know if I can or want to maintain that.
The sagemath upstream effectively maintains this. They have a big community and are pretty active. For reference: Apparently somebody already suggested a proper fork (instead of the "pach fork" they currently maintain): https://trac.sagemath.org/ticket/21493 |
}; | ||
|
||
preConfigure = '' | ||
export INSTALL="${coreutils}/bin/install" |
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.
You can actually do this as an attribute instead of configure:
INSTALL="${coreutils}/bin/install";
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.
But is that better? It would clutter the attributes of the package and basically depend on a side-effect of how attributes are handled (and passed as environment variables) in nix, right?
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 the standard way to set environment variables.
I'm inclined to merge this. 4 patches is a lot but not ridiculous. Eventually we will have "inclusion" rules for what can go in Nixpkgs but right now there are none AFAIK (except maybe against nonfree stuff). @GrahamcOfBorg build rubiks |
No attempt on x86_64-darwin (full log) The following builds were skipped because they don't evaluate on x86_64-darwin: rubiks Partial log (click to expand)
|
Success on x86_64-linux (full log) Attempted: rubiks Partial log (click to expand)
|
Success on aarch64-linux (full log) Attempted: rubiks Partial log (click to expand)
|
Success on x86_64-linux (full log) Attempted: rubiks Partial log (click to expand)
|
Success on aarch64-linux (full log) Attempted: rubiks Partial log (click to expand)
|
No attempt on x86_64-darwin (full log) The following builds were skipped because they don't evaluate on x86_64-darwin: rubiks Partial log (click to expand)
|
One thing that might be neat and lessen the maintenance burden would be an automatic importer of these Sage packages. It's common to have things like this for instance "cabal2nix" or "emacs2nix". Perhaps someone wants to try something like "spkg2nix". A good start for the above would be creating a shared file like |
Success on aarch64-linux (full log) Attempted: rubiks Partial log (click to expand)
|
I actually do have such an exporter, which is what I started out with. But then I migrated all the packages to system packages one-by-one. The generated packages are not very pretty (because spkgs simply don't have as much information as a nix package, sometimes transitive dependencies are assumed, no difference between build inputs and native build inputs etc.). Also most sage dependencies are already packaged, and re-generating duplicates of those defeats the point of packaging it with system packages. Edit: For comparison, here is the auto-generated |
Motivation for this change
Package rubiks.
Things done
build-use-sandbox
innix.conf
on non-NixOS)nix-shell -p nox --run "nox-review wip"
./result/bin/
)