wallgen: init at unstable-2021-02-21#120340
wallgen: init at unstable-2021-02-21#120340j0hax wants to merge 1 commit intoNixOS:masterfrom j0hax:wallgen-init
Conversation
IvarWithoutBones
left a comment
There was a problem hiding this comment.
Thank you for the contribution! I left a few comments, but otherwise LGTM :)
pkgs/top-level/all-packages.nix
Outdated
There was a problem hiding this comment.
| wallgen = callPackage ../applications/misc/wallgen { }; | |
| wallgen = pythonPackages.callPackage ../applications/misc/wallgen { }; |
There was a problem hiding this comment.
I also changed pythonPackages.callPackage to python3Packages.callPackage
There was a problem hiding this comment.
| with import <nixpkgs> { }; | |
| with pkgs.python3Packages; | |
| { lib, buildPythonPackage, fetchFromGitHub, pillow, click, cython, scipy, flask, gevent, numpy, scikitimage, loguru }: |
There was a problem hiding this comment.
See https://nixos.org/manual/nixpkgs/stable/#sec-package-naming:
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".
There was a problem hiding this comment.
| pname = "wallgen"; | |
| version = "wallgen-unstable-2021-02-21"; | |
| pname = "wallgen"; | |
| version = "unstable-2021-02-21"; |
There was a problem hiding this comment.
Oops, my suggestion was not quite right.
| { lib, buildPythonPackage, fetchFromGitHub, pillow, click, cython, scipy, flask, gevent, numpy, scikitimage, loguru }: | |
| { lib, buildPythonApplication, fetchFromGitHub, pillow, click, cython, scipy, flask, gevent, numpy, scikitimage, loguru }: |
|
Thank you for the pointers! |
There was a problem hiding this comment.
For consistency's sake, the whitespace here should be removed.
| buildPythonApplication rec { | |
| pname = "wallgen"; | |
| buildPythonApplication rec { | |
| pname = "wallgen"; |
IvarWithoutBones
left a comment
There was a problem hiding this comment.
Result of nixpkgs-review pr 120340 run on x86_64-linux 1
1 package built:
- wallgen
|
The package itself builds fine, but I am getting following error after installing: $ wallgen
Traceback (most recent call last):
File "/nix/store/nq1aa9a5ql0zahgfdkx435na3vnglz0q-wallgen-unstable-2021-02-21/bin/.wallgen-wrapped", line 6, in <module>
from wallgen import cli
ModuleNotFoundError: No module named 'wallgen'I will have to investigate if this issue comes from upstream, persists on other configurations/distributions, and possibly write a patch. For now I would think it's good to draft the PR. Somebody more experienced than me with packaging Python for Nix might want to take a look at the official installation instructions. |
|
I marked this as stale due to inactivity. → More info |
|
Closing due to being unmergeable as the fork repository is gone; see #209173 (comment). |
Motivation for this change
Package a Python application to generate wallpapers (demo)
I should add that as this Project doesn't have specific versioning, I opted to use short commit hashes. If there are preffered ways instead, LMK.
Things done
sandboxinnix.confon non-NixOS linux)nix-shell -p nixpkgs-review --run "nixpkgs-review wip"./result/bin/)nix path-info -Sbefore and after)