Skip to content
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

portmod: init at 2.0_beta7 #98093

Merged
merged 8 commits into from Oct 22, 2020
Merged

portmod: init at 2.0_beta7 #98093

merged 8 commits into from Oct 22, 2020

Conversation

marius851000
Copy link
Contributor

Motivation for this change

wanted to add the portmod package. I use it, and wanted it to be in the nixpkgs.

Things done

mainly in additional to portmod, add patool.

I was able to install the meta-momw/expanded-vanilla , but with some modification in the environment: needed to set "TMPDIR=/tmp" (the default temp dir doesn't have enought size) and to have unrar in the PATH.

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

@IvarWithoutBones
Copy link
Member

Result of nixpkgs-review pr 98093 1

1 package failed to build:
  • python27Packages.redbaron
15 packages built:
  • patool (python38Packages.patool)
  • portmod
  • python27Packages.baron
  • python27Packages.patool
  • python27Packages.pypblib
  • python27Packages.python-sat
  • python37Packages.baron
  • python37Packages.patool
  • python37Packages.pypblib
  • python37Packages.python-sat
  • python37Packages.redbaron
  • python38Packages.baron
  • python38Packages.pypblib
  • python38Packages.python-sat
  • python38Packages.redbaron

python27Packages.redbaron error:

[2/11/31 built, 149 copied (1588.1/1588.6 MiB), 285.6 MiB DL] building python3.7-python-sat-0.1.6.dev6 (buildPhase): |       ^~~
builder for '/nix/store/1pi10m6myd6rcjw7k5iz9nxwm16nzsdr-python2.7-redbaron-0.9.2.drv' failed with exit code 2; last 10 log lines:
  HINT: remove __pycache__ / .pyc files and/or use a unique basename for your test file modules
  ____________________ ERROR collecting tests/test_setter.py _____________________
  import file mismatch:
  imported module 'tests.test_setter' has this __file__ attribute:
    /home/psycojoker/code/python/redbaron/tests/test_setter.py
  which is not the same as the test file we want to collect:
    /build/redbaron-0.9.2/tests/test_setter.py
  HINT: remove __pycache__ / .pyc files and/or use a unique basename for your test file modules
  !!!!!!!!!!!!!!!!!!! Interrupted: 13 errors during collection !!!!!!!!!!!!!!!!!!!
  =========================== 13 error in 8.46 seconds ===========================
cannot build derivation '/nix/store/jx4pgvd31fy01ldzvplk4kg8qizcf7xh-env.drv': 1 dependencies couldn't be built
[29 built (1 failed), 149 copied (1588.1 MiB), 285.6 MiB DL]
error: build of '/nix/store/jx4pgvd31fy01ldzvplk4kg8qizcf7xh-env.drv' failed

@marius851000
Copy link
Contributor Author

that should be fixed, thank.

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 98093 1

16 packages built:
  • patool (python38Packages.patool)
  • portmod
  • python27Packages.baron
  • python27Packages.patool
  • python27Packages.pypblib
  • python27Packages.python-sat
  • python27Packages.redbaron
  • python37Packages.baron
  • python37Packages.patool
  • python37Packages.pypblib
  • python37Packages.python-sat
  • python37Packages.redbaron
  • python38Packages.baron
  • python38Packages.pypblib
  • python38Packages.python-sat
  • python38Packages.redbaron

pkgs/development/python-modules/baron/default.nix Outdated Show resolved Hide resolved
pkgs/development/python-modules/patool/default.nix Outdated Show resolved Hide resolved
pkgs/development/python-modules/pypblib/default.nix Outdated Show resolved Hide resolved
pkgs/development/python-modules/python-sat/default.nix Outdated Show resolved Hide resolved
pkgs/development/python-modules/redbaron/default.nix Outdated Show resolved Hide resolved
pkgs/top-level/all-packages.nix Outdated Show resolved Hide resolved
@jonringer
Copy link
Contributor

I take back the hash reviews, apparently master has been updated with a minver which supports 64bit base hashes

@marius851000
Copy link
Contributor Author

marius851000 commented Sep 21, 2020

Thank. I fixed the issue you reported (exluding the hash). Now I know why hash are shorter now.
Seem baron have issue with python 2.7. Will solve this.
solved !

@marius851000
Copy link
Contributor Author

That's done. Thank again.

@doronbehar
Copy link
Contributor

doronbehar commented Oct 12, 2020

@marius851000
Copy link
Contributor Author

Thank. Didn't noticed this.

pkgs/development/python-modules/redbaron/default.nix Outdated Show resolved Hide resolved
pkgs/games/portmod/tr-patcher.nix Outdated Show resolved Hide resolved
pkgs/games/portmod/default.nix Outdated Show resolved Hide resolved
pkgs/games/portmod/default.nix Outdated Show resolved Hide resolved
pkgs/games/portmod/default.nix Outdated Show resolved Hide resolved
pkgs/games/portmod/default.nix Outdated Show resolved Hide resolved
pkgs/development/python-modules/python-sat/default.nix Outdated Show resolved Hide resolved
pkgs/development/python-modules/patool/default.nix Outdated Show resolved Hide resolved
pkgs/development/python-modules/patool/default.nix Outdated Show resolved Hide resolved
pkgs/development/python-modules/pypblib/default.nix Outdated Show resolved Hide resolved
pkgs/development/python-modules/patool/default.nix Outdated Show resolved Hide resolved
pkgs/development/python-modules/patool/default.nix Outdated Show resolved Hide resolved
Comment on lines 30 to 31
(callPackage ./tes3cmd.nix { })
(callPackage ./tr-patcher.nix { })
Copy link
Contributor

Choose a reason for hiding this comment

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

I think those would be worth something if exposed in all-packages.nix (And be added in separate commits of their own).

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Should I put them into different folder, or should I import call the file that are in the portmod subdir ?

pkgs/development/python-modules/patool/default.nix Outdated Show resolved Hide resolved
Copy link
Contributor

@doronbehar doronbehar left a comment

Choose a reason for hiding this comment

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

Small nitpicks. Besides that all is good.

pkgs/development/python-modules/python-sat/default.nix Outdated Show resolved Hide resolved
pkgs/games/tr-patcher/default.nix Outdated Show resolved Hide resolved
pkgs/games/tr-patcher/default.nix Outdated Show resolved Hide resolved
pkgs/games/tr-patcher/default.nix Outdated Show resolved Hide resolved
pkgs/games/tes3cmd/default.nix Outdated Show resolved Hide resolved
@doronbehar
Copy link
Contributor

A few issues with the executables:

$ ./results/portmod/bin/inquisitor
ERROR: Cannot find repository for the current directory. Please run from within the repository you wish to inspect
Traceback (most recent call last):
  File "/nix/store/wnp22084acnxvf8mb79ff04d7g8igzln-portmod-2.0_beta9/bin/.inquisitor-wrapped", line 9, in <module>
    sys.exit(main())
  File "/nix/store/wnp22084acnxvf8mb79ff04d7g8igzln-portmod-2.0_beta9/lib/python3.8/site-packages/portmod/inquisitor.py", line 200, in main
    REAL_ROOT = os.path.realpath(repo_root)
  File "/nix/store/346skv0d24rqnf4npknbp9h5bs14j8zy-python3-3.8.6/lib/python3.8/posixpath.py", line 390, in realpath
    filename = os.fspath(filename)
TypeError: expected str, bytes or os.PathLike object, not NoneType
$ ./results/portmod/bin/openmw-conflicts
Traceback (most recent call last):
  File "/nix/store/wnp22084acnxvf8mb79ff04d7g8igzln-portmod-2.0_beta9/bin/.openmw-conflicts-wrapped", line 9, in <module>
    sys.exit(main())
  File "/nix/store/wnp22084acnxvf8mb79ff04d7g8igzln-portmod-2.0_beta9/lib/python3.8/site-packages/portmod/openmw_conflicts.py", line 17, in main
    mod_dirs = get_vfs_dirs()
  File "/nix/store/wnp22084acnxvf8mb79ff04d7g8igzln-portmod-2.0_beta9/lib/python3.8/site-packages/portmod/vfs.py", line 111, in get_vfs_dirs
    return read_list(os.path.join(env.MOD_DIR, "vfs"))
  File "/nix/store/wnp22084acnxvf8mb79ff04d7g8igzln-portmod-2.0_beta9/lib/python3.8/site-packages/portmod/repo/list.py", line 12, in read_list
    with open(listpath, mode="r") as list_file:
FileNotFoundError: [Errno 2] No such file or directory: '/home/doron/.local/share/portmod/mods/vfs'

All other executables from new packages in this PR are fine as far as --help is concerned. Is this an issue @marius851000 ? or is this an expected behavior due to not found paths?

@marius851000
Copy link
Contributor Author

inquisitor need to be run inside a package repository (there is one at https://gitlab.com/portmod/openmw-mods )

I have no idea what the second did, but it worked well on my side. I indeed have a ~/.local/share/portmod/mods/vfs . I suppose that can be solve by installing a package.

@doronbehar doronbehar merged commit 44dd65f into NixOS:master Oct 22, 2020
This was referenced Nov 22, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants