-
-
Notifications
You must be signed in to change notification settings - Fork 16.8k
graphest: init at 1.3.3 #444217
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
base: master
Are you sure you want to change the base?
graphest: init at 1.3.3 #444217
Conversation
This comment was marked as outdated.
This comment was marked as outdated.
Have you submitted any of your patches upstream? |
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.
Really good start.
pkgs/by-name/gr/graphest/package.nix
Outdated
static = | ||
p: | ||
p.overrideAttrs (oldAttrs: { | ||
configureFlags = oldAttrs.configureFlags ++ [ "--enable-static" ]; | ||
}); | ||
# The dependencies of graphest-fftw-sys and graphest-arb-sys need to be static | ||
fftwFloatStatic = static fftwFloat; | ||
flintStatic = static flint; |
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.
static = | |
p: | |
p.overrideAttrs (oldAttrs: { | |
configureFlags = oldAttrs.configureFlags ++ [ "--enable-static" ]; | |
}); | |
# The dependencies of graphest-fftw-sys and graphest-arb-sys need to be static | |
fftwFloatStatic = static fftwFloat; | |
flintStatic = static flint; | |
fftwFloatStatic = pkgsStatic.fftwFloat; | |
flintStatic = pkgsStatic.flint; |
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.
Unfortunately pkgsStatic.flint
build fails.
Running phase: unpackPhase
@nix { "action": "setPhase", "phase": "unpackPhase" }
unpacking source archive /nix/store/5630mrni8ikjp91049yd0cs6mrhsf2fz-ntl-11.5.1.tar.gz
source root is ntl-11.5.1/src
setting SOURCE_DATE_EPOCH to timestamp 1624480787 of file "ntl-11.5.1/src/libtool-seed/configure.ac"
Running phase: patchPhase
@nix { "action": "setPhase", "phase": "patchPhase" }
Running phase: updateAutotoolsGnuConfigScriptsPhase
@nix { "action": "setPhase", "phase": "updateAutotoolsGnuConfigScriptsPhase" }
Updating Autotools / GNU config script to a newer upstream version: ./libtool-origin/config.sub
Updating Autotools / GNU config script to a newer upstream version: ./libtool-origin/config.guess
Running phase: updateAutotoolsGnuConfigScriptsPhase
@nix { "action": "setPhase", "phase": "updateAutotoolsGnuConfigScriptsPhase" }
Updating Autotools / GNU config script to a newer upstream version: ./libtool-origin/config.sub
Updating Autotools / GNU config script to a newer upstream version: ./libtool-origin/config.guess
Running phase: configurePhase
@nix { "action": "setPhase", "phase": "configurePhase" }
fixing libtool script ./libtool-origin/ltmain.sh
patching script interpreter paths in ./configure
./configure: interpreter directive changed from "#!/bin/sh" to "/nix/store/q7sqwn7i6w2b67adw0bmix29pxg85x3w-bash-5.3p3/bin/sh"
configure flags: DEF_PREFIX=\$\(out\) SHARED=on NATIVE=off TUNE=x86 CXX=x86_64-unknown-linux-musl-c++ NTL_GF2X_LIB=on GF2X_PREFIX=/nix/store/di428z71mww2j3yyryp8q9s3awpjifph-gf2x-static-x86_64-unknown-linux-musl-1.3.0 --enable-static --disable-shared --disable-shared
Error: unrecognized option: --enable-static
type "./configure -h" for help
It fails even with withNtl = fales;
:
/nix/store/2lxkb5n0rjjkc0n3x6sqhd5qxjra6x3p-x86_64-unknown-linux-musl-binutils-2.44/bin/x86_64-unknown-linux-musl-ld: /build/flint-3.3.1/libflint.a(double_interval_merged.o): in function `d_randtest2':
/build/flint-3.3.1/src/double_interval.h:188: multiple definition of `d_randtest2'; /build/cc7cRRi3.o:/build/flint-3.3.1/src/mag/test/t-d_log_lower_bound.c:28: first defined here
pkgs/by-name/gr/graphest/package.nix
Outdated
"Science" | ||
"Math" | ||
]; | ||
comment = finalAttrs.meta.description; |
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.
Hardcode description
pkgs/by-name/gr/graphest/package.nix
Outdated
description = "Graphing calculator that can faithfully plot arbitrary mathematical relations"; | ||
homepage = "https://github.com/unageek/graphest"; | ||
downloadPage = "https://github.com/unageek/graphest/releases"; | ||
changelog = "https://github.com/unageek/graphest/releases/tag/${finalAttrs.src.tag}"; |
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.
changelog = "https://github.com/unageek/graphest/releases/tag/${finalAttrs.src.tag}"; | |
changelog = "https://github.com/unageek/graphest/releases/tag/v${finalAttrs.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.
I thought using src.tag
may be better because it should be the tag.
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 is generally preferred not to do such things since to make it more consistent throughout nixpkgs
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.
Actually there are plenty of packages using src.tag
here.
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 is not preferred to add any more.
No. I can probably open a PR for supporting Flint 3 and latest Rust. |
Definitely want to submit as many patches upstream as you can. Then just use |
1346a00
to
0ded7d6
Compare
I opened 3 PRs to the upstream, among which 2 are relevant to the packaging and have been applied here by |
|
Not sure why there is a failure in nixpkgs-review-gha. It works on my VM running macOS. |
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.
Looks good.
x86 Darwin is being removed from a "Tier 1" platform soon so uhhh I don't really care. |
38f95b6
to
5310673
Compare
The app icon on macOS is now fixed. Tested by running Not sure whether |
Graphest: graphing calculator that can faithfully plot arbitrary mathematical relations.
On Linux, when closing the app without saving, it has the same GLib-GObject error as #354253 (comment). I am not sure how it can be fixed.
I do not know how to let Electron use the correct app icon on macOS. In the worst case, I will just patch thenew BrowserWindow({...})
call.I probably broke cross-compilation by passing build inputs through env var, but I do not know how to test it.Things done
passthru.tests
.nixpkgs-review
on this PR. See nixpkgs-review usage../result/bin/
.Add a 👍 reaction to pull requests you find important.