Skip to content

wallgen: init at unstable-2021-02-21#120340

Closed
j0hax wants to merge 1 commit intoNixOS:masterfrom
j0hax:wallgen-init
Closed

wallgen: init at unstable-2021-02-21#120340
j0hax wants to merge 1 commit intoNixOS:masterfrom
j0hax:wallgen-init

Conversation

@j0hax
Copy link
Member

@j0hax j0hax commented Apr 23, 2021

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
  • Tested using sandboxing (nix.useSandbox on NixOS, or option sandbox in nix.conf on non-NixOS linux)
  • Built on platform(s)
    • NixOS
    • macOS
    • other Linux distributions
  • Tested via one or more NixOS test(s) if existing and applicable for the change (look inside nixos/tests)
  • Tested compilation of all pkgs that depend on this change using nix-shell -p nixpkgs-review --run "nixpkgs-review wip"
  • Tested execution of all binary files (usually in ./result/bin/)
  • Determined the impact on package closure size (by running nix path-info -S before and after)
  • Ensured that relevant documentation is up to date
  • Fits CONTRIBUTING.md.

@ofborg ofborg bot added 10.rebuild-darwin: 0 This PR does not cause any packages to rebuild on Darwin. 10.rebuild-linux: 0 This PR does not cause any packages to rebuild on Linux. labels Apr 23, 2021
Copy link
Member

@IvarWithoutBones IvarWithoutBones left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for the contribution! I left a few comments, but otherwise LGTM :)

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
wallgen = callPackage ../applications/misc/wallgen { };
wallgen = pythonPackages.callPackage ../applications/misc/wallgen { };

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I also changed pythonPackages.callPackage to python3Packages.callPackage

Comment on lines 1 to 2
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
with import <nixpkgs> { };
with pkgs.python3Packages;
{ lib, buildPythonPackage, fetchFromGitHub, pillow, click, cython, scipy, flask, gevent, numpy, scikitimage, loguru }:

Comment on lines 5 to 7
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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".

Comment on lines 4 to 6
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
pname = "wallgen";
version = "wallgen-unstable-2021-02-21";
pname = "wallgen";
version = "unstable-2021-02-21";

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oops, my suggestion was not quite right.

Suggested change
{ lib, buildPythonPackage, fetchFromGitHub, pillow, click, cython, scipy, flask, gevent, numpy, scikitimage, loguru }:
{ lib, buildPythonApplication, fetchFromGitHub, pillow, click, cython, scipy, flask, gevent, numpy, scikitimage, loguru }:

@j0hax j0hax changed the title wallgen: init at cf9cfbd wallgen: init at unstable-2021-02-21 Apr 23, 2021
@ofborg ofborg bot added 8.has: package (new) This PR adds a new package 11.by: package-maintainer This PR was created by a maintainer of all the package it changes. 10.rebuild-darwin: 1-10 This PR causes between 1 and 10 packages to rebuild on Darwin. 10.rebuild-darwin: 1 This PR causes 1 package to rebuild on Darwin. 10.rebuild-linux: 1-10 This PR causes between 1 and 10 packages to rebuild on Linux. 10.rebuild-linux: 1 This PR causes 1 package to rebuild on Linux. and removed 10.rebuild-darwin: 0 This PR does not cause any packages to rebuild on Darwin. 10.rebuild-linux: 0 This PR does not cause any packages to rebuild on Linux. labels Apr 23, 2021
@j0hax
Copy link
Member Author

j0hax commented Apr 23, 2021

Thank you for the pointers!

Comment on lines 3 to 4
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For consistency's sake, the whitespace here should be removed.

Suggested change
buildPythonApplication rec {
pname = "wallgen";
buildPythonApplication rec {
pname = "wallgen";

Copy link
Member

@IvarWithoutBones IvarWithoutBones left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Result of nixpkgs-review pr 120340 run on x86_64-linux 1

1 package built:
  • wallgen

@j0hax
Copy link
Member Author

j0hax commented Apr 23, 2021

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.

@j0hax j0hax marked this pull request as draft April 23, 2021 18:57
@stale
Copy link

stale bot commented Oct 22, 2021

I marked this as stale due to inactivity. → More info

@stale stale bot added the 2.status: stale https://github.com/NixOS/nixpkgs/blob/master/.github/STALE-BOT.md label Oct 22, 2021
@wegank wegank added the 12.approvals: 1 This PR was reviewed and approved by one person. label Mar 9, 2024
@wegank wegank added the 2.status: merge conflict This PR has merge conflicts with the target branch label Mar 20, 2024
@stale stale bot removed the 2.status: stale https://github.com/NixOS/nixpkgs/blob/master/.github/STALE-BOT.md label Mar 20, 2024
@wegank wegank added the 2.status: stale https://github.com/NixOS/nixpkgs/blob/master/.github/STALE-BOT.md label Jul 4, 2024
@nixpkgs-ci nixpkgs-ci bot removed the 2.status: merge conflict This PR has merge conflicts with the target branch label Jun 25, 2025
@emilazy
Copy link
Member

emilazy commented Feb 16, 2026

Closing due to being unmergeable as the fork repository is gone; see #209173 (comment).

@emilazy emilazy closed this Feb 16, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

2.status: stale https://github.com/NixOS/nixpkgs/blob/master/.github/STALE-BOT.md 8.has: package (new) This PR adds a new package 10.rebuild-darwin: 1-10 This PR causes between 1 and 10 packages to rebuild on Darwin. 10.rebuild-darwin: 1 This PR causes 1 package to rebuild on Darwin. 10.rebuild-linux: 1-10 This PR causes between 1 and 10 packages to rebuild on Linux. 10.rebuild-linux: 1 This PR causes 1 package to rebuild on Linux. 11.by: package-maintainer This PR was created by a maintainer of all the package it changes. 12.approvals: 1 This PR was reviewed and approved by one person.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants