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

nicotine-plus: init at 1.4.1 #53717

Merged
merged 7 commits into from Feb 6, 2019
Merged
Changes from 4 commits
Commits
File filter...
Filter file types
Jump to…
Jump to file or symbol
Failed to load files and symbols.

Always

Just for now

@@ -0,0 +1,57 @@
{ stdenv, fetchFromGitHub, python27Packages, lib
, geoip ? null
This conversation was marked as resolved by klntsky

This comment has been minimized.

Copy link
@veprbl

veprbl Feb 2, 2019

Member

You don't need ? null here.

, geolite-legacy ? null

# Nicotine+ supports a country code blocker. This requires a (GPL'ed) library called GeoIP.
, enableGeoIP ? true
This conversation was marked as resolved by klntsky

This comment has been minimized.

Copy link
@veprbl

veprbl Feb 6, 2019

Member

If you don't use and test this option yourself consider removing it.

}:

assert enableGeoIP -> python27Packages.GeoIP != null;
This conversation was marked as resolved by klntsky

This comment has been minimized.

Copy link
@veprbl

veprbl Feb 6, 2019

Member

No need to keep this either.

assert enableGeoIP -> geoip != null;
assert enableGeoIP -> geolite-legacy != null;

with stdenv.lib;

python27Packages.buildPythonApplication rec {
pname = "nicotine-plus";
version = "1.4.1";
src = fetchFromGitHub {
owner = "Nicotine-Plus";
repo = "nicotine-plus";
rev = "4e057d64184885c63488d4213ade3233bd33e67b";
sha256 = "11j2qm67sszfqq730czsr2zmpgkghsb50556ax1vlpm7rw3gm33c";
};

propagatedBuildInputs = with python27Packages; [
pygtk
miniupnpc
mutagen
notify
] ++ lib.lists.optional enableGeoIP
(GeoIP.overrideAttrs (_: {
propagatedBuildInputs = lib.lists.singleton
This conversation was marked as resolved by klntsky

This comment has been minimized.

Copy link
@veprbl

veprbl Feb 2, 2019

Member

This is definitely not the way to go. Should override the geoip argument instead.

This comment has been minimized.

Copy link
@klntsky

klntsky Feb 6, 2019

Author Contributor

Sorry for delay.

You mean, something like this:

  ] ++ lib.lists.optional enableGeoIP
     (GeoIP.overrideAttrs (_: {
       propagatedBuildInputs = [geoip];
     }));

And:

  nicotine-plus = callPackage ../applications/networking/soulseek/nicotine-plus {
    geoip = geoipWithDatabase;
  };

?

Otherwise I don't know how to build python27Packages.GeoIP with geoip with geolite-legacy.

This comment has been minimized.

Copy link
@veprbl

veprbl Feb 6, 2019

Member

Sorry, I did not explain enough. I meant something like GeoIP.override { inherit geoip; }.

This comment has been minimized.

Copy link
@klntsky

klntsky Feb 6, 2019

Author Contributor

Thanks.

(geoip.override (_: {
geoipDatabase = geolite-legacy;
}));
}));

# Insert real docs directory.
# os.getcwd() is not needed
patchPhase = ''
This conversation was marked as resolved by klntsky

This comment has been minimized.

Copy link
@veprbl

veprbl Feb 2, 2019

Member
Suggested change
patchPhase = ''
postPatch = ''
sed -e 's|paths.append(os.getcwd())|paths.append("'"$out"/doc'")|' -i ./pynicotine/gtkgui/frame.py
This conversation was marked as resolved by klntsky

This comment has been minimized.

Copy link
@veprbl

veprbl Feb 2, 2019

Member

Please use substituteInPlace, it reports if substitution can't be performed.

'';

postFixup = ''
mkdir -p $out/doc/
mv ./doc/NicotinePlusGuide $out/doc/
mv $out/bin/nicotine $out/bin/nicotine-plus
'';

meta = {
description = "A graphical client for the SoulSeek peer-to-peer system";
homepage = https://www.nicotine-plus.org;
license = licenses.gpl3;
maintainers = with maintainers; [ klntsky ];
platforms = platforms.unix;
};
}
@@ -6529,9 +6529,9 @@ in
fish-foreign-env = callPackage ../shells/fish/fish-foreign-env { };

ion = callPackage ../shells/ion { };

ksh = callPackage ../shells/ksh { };

mksh = callPackage ../shells/mksh { };

oh = callPackage ../shells/oh { };

natron = callPackage ../applications/video/natron { };

nicotine-plus = callPackage ../applications/networking/soulseek/nicotine-plus { };
This conversation was marked as resolved by klntsky

This comment has been minimized.

Copy link
@veprbl

veprbl Feb 2, 2019

Member
Suggested change
nicotine-plus = callPackage ../applications/networking/soulseek/nicotine-plus { };
nicotine-plus = callPackage ../applications/networking/soulseek/nicotine-plus {
geoip = geoipWithDatabase;
};

notion = callPackage ../applications/window-managers/notion { };

openshift = callPackage ../applications/networking/cluster/openshift { };
ProTip! Use n and p to navigate between commits in a pull request.
You can’t perform that action at this time.