-
-
Notifications
You must be signed in to change notification settings - Fork 15.1k
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
omorfi: init at 0.9.9 #238378
omorfi: init at 0.9.9 #238378
Conversation
a4c4d99
to
dca50e6
Compare
Could you please split into separate commits (libvoiko, hfst, omorfi, etc)? |
stdenv.mkDerivation rec { | ||
pname = "hfst-ospell"; | ||
version = "0.5.3"; | ||
buildInputs = [ |
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.
Nit: a bit unusual order, more common is pname
, version
, src
, nativeBuildInputs
, buildInputs
, meta
.
This pull request has been mentioned on NixOS Discourse. There might be relevant details there: https://discourse.nixos.org/t/prs-ready-for-review/3032/2393 |
homepage = "https://github.com/flammie/omorfi"; | ||
license = licenses.gpl3; | ||
maintainers = with maintainers; [ lurkki ]; | ||
# Ofborg build error |
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 comment isn't helpful for other to pick this up
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.
Not sure I can see easily anywhere what the error is, since I don't have a Darwin machine
hfst | ||
]; | ||
|
||
# Fixes some improper import paths |
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.
So we can run a pythonImportsCheck?
Can/Should we run https://github.com/flammie/omorfi/tree/main/test ?
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.
Those tests are already runnable in the checkPhase
of omorfi
homepage = "https://github.com/flammie/omorfi"; | ||
license = licenses.gpl3; | ||
maintainers = with maintainers; [ lurkki ]; | ||
# Ofborg build error |
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.
not to helpful for others to pick this up and fix it
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.
omorfi> checking python module: libhfst... no
omorfi> configure: error: failed to find required module libhfst
Looks like it should be easy to fix. I'll try to investigate...
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.
# Ofborg build error | |
# fails to find libhfst on darwin |
pkg-config | ||
python3 | ||
zip | ||
python3Packages.wrapPython |
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.
python3Packages.wrapPython | |
python3.pkgs.wrapPython |
]; | ||
|
||
buildInputs = [ | ||
python3Packages.hfst |
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.
python3Packages.hfst | |
python3.pkgs.hfst |
# Package builds but tests fail on Darwin | ||
doCheck = !stdenv.isDarwin; |
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've figured out how to fix tests on darwin:
# Package builds but tests fail on Darwin | |
doCheck = !stdenv.isDarwin; | |
preCheck = lib.optionalString stdenv.isDarwin '' | |
export DYLD_LIBRARY_PATH="${foma}/lib" | |
''; |
hash = "sha256-0MIQ54dCxyAfdgYWmmTVF+Yfa15K2sjJyP1JNxwHP2M="; | ||
}; | ||
|
||
sourceRoot = "source/libvoikko"; |
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.
sourceRoot = "source/libvoikko"; | |
sourceRoot = "${src.name}/libvoikko"; |
pname = "hfst"; | ||
inherit (pkgs.hfst) version src; | ||
|
||
sourceRoot = "source/python"; |
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.
sourceRoot = "source/python"; | |
sourceRoot = "${src.name}/python"; |
pname = "omorfi"; | ||
inherit (pkgs.omorfi) src version; | ||
|
||
sourceRoot = "source/src/python"; |
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.
sourceRoot = "source/src/python"; | |
sourceRoot = "${src.name}/src/python"; |
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.
Hi !
Thanks for your first contribution.
I added some feedback. Most of it is to use the finalAttrs
pattern.
Feel free to let me know if you need some assistance.
Thanks!
, pkg-config | ||
}: | ||
|
||
stdenv.mkDerivation rec { |
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 think we should use the finalAttrs
pattern here.
Since this is your first PR, let me share a couple of useful links regarding this:
- History: https://discourse.nixos.org/t/avoid-rec-expresions-in-nixpkgs/8293
- Documentation: https://nixos.org/manual/nixpkgs/unstable/#mkderivation-recursive-attributes
- Recent example of implementation: https://github.com/NixOS/nixpkgs/compare/17f96f7b978e61576cfe16136eb418f74fab9952..9e6ea843e473d34d4f379b8b0d8ef0425a06defe
, zlib | ||
}: | ||
|
||
stdenv.mkDerivation rec { |
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 think we should use the finalAttrs
pattern here.
Since this is your first PR, let me share a couple of useful links regarding this:
- History: https://discourse.nixos.org/t/avoid-rec-expresions-in-nixpkgs/8293
- Documentation: https://nixos.org/manual/nixpkgs/unstable/#mkderivation-recursive-attributes
- Recent example of implementation: https://github.com/NixOS/nixpkgs/compare/17f96f7b978e61576cfe16136eb418f74fab9952..9e6ea843e473d34d4f379b8b0d8ef0425a06defe
, python3 | ||
}: | ||
|
||
stdenv.mkDerivation rec { |
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.
Same here
, zip | ||
}: | ||
|
||
stdenv.mkDerivation rec { |
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.
Same here
Description of changes
Things done
sandbox = true
set innix.conf
? (See Nix manual)nix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD"
. Note: all changes have to be committed, also see nixpkgs-review usage./result/bin/
)