Skip to content

v2ray-geoip: init at 202112090029 - #147010

Merged
bobby285271 merged 1 commit into
NixOS:masterfrom
NickCao:v2ray-geoip
Dec 14, 2021
Merged

bobby285271 merged 1 commit into
NixOS:masterfrom
NickCao:v2ray-geoip

Conversation

@NickCao

@NickCao NickCao commented Nov 22, 2021

Copy link
Copy Markdown
Member
Motivation for this change
Things done
  • Built on platform(s)
    • x86_64-linux
    • aarch64-linux
    • x86_64-darwin
    • aarch64-darwin
  • For non-Linux: Is sandbox = true set in nix.conf? (See Nix manual)
  • Tested, as applicable:
  • Tested compilation of all packages that depend on this change using nix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD". Note: all changes have to be committed, also see nixpkgs-review usage
  • Tested basic functionality of all binary files (usually in ./result/bin/)
  • 21.11 Release Notes (or backporting 21.05 Release notes)
    • (Package updates) Added a release notes entry if the change is major or breaking
    • (Module updates) Added a release notes entry if the change is significant
    • (Module addition) Added a release notes entry if adding a new NixOS module
    • (Release notes changes) Ran nixos/doc/manual/md-to-db.sh to update generated release notes
  • Fits CONTRIBUTING.md.

@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: 0 This PR does not cause any packages 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. labels Nov 22, 2021
@Vonfry

Vonfry commented Nov 23, 2021 •

Copy link
Copy Markdown
Member

What is the difference from geoip in v2ray? Why is it necessary for a duplicated package?

Furthermore, should we replace the one in v2ray with this?

@NickCao

NickCao commented Nov 23, 2021 •

Copy link
Copy Markdown
Member Author

It's the same as the one bundled in v2ray. I think it is more appropriate to replace that one with this, and would cover that in a later pr. The reason for a separate package is that those assets are usable outside the context of v2ray (as in other proxy clients), and the current expressions makes it hard to do so.

@NickCao NickCao changed the title v2ray-geoip: init at 202111210901 v2ray-geoip: init at 202111250029 Nov 26, 2021
@kidonng

kidonng commented Nov 28, 2021

Copy link
Copy Markdown
Member

The reason for a separate package is that those assets are usable outside the context of v2ray (as in other proxy clients), and the current expressions makes it hard to do so.

Agreed. Without this package a hack is needed to access those assets:

let assets = (pkgs.runCommandLocal "v2ray-assets" {} ''
      mkdir -p $out/share
      ln -s `[[ "${pkgs.v2ray.drvAttrs.buildCommand}" =~ V2RAY_LOCATION_ASSET( ([[:alnum:]]|[/-])+) ]] && echo ''${BASH_REMATCH[1]}` $out/share/v2ray
'')

Comment thread pkgs/data/misc/v2ray-geoip/default.nix Resolved
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

8.has: package (new) This PR adds a new package 10.rebuild-darwin: 0 This PR does not cause any packages 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.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants