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

Add a fix for NixOS support #63

Closed
wants to merge 2 commits into from

Conversation

tadeokondrak
Copy link

@tadeokondrak tadeokondrak commented Dec 2, 2018

Adds a simple replacement to detect the executable folder on NixOS.

(if anyone stumbles upon this from searching how to get beautifuldiscord on NixOS then here's the derivation:)

python36Packages.buildPythonApplication rec {
  pname = "beautifuldiscord";
  version = "1.0";
  src = fetchurl {
    url = "https://github.com/leovoel/BeautifulDiscord/archive/master.zip";
    sha256 = "600590722faa28ea7a0c982b8c7a13a5af067e91017714209d7a4afbc7244dde";
  };
  patches = [ (pkgs.writeText "fix-executable-finder.patch" ''
    diff --git a/beautifuldiscord/app.py b/BeautifulDiscord/>
    index 1680c9e..7f0c903 100644
    --- a/beautifuldiscord/app.py
    +++ b/beautifuldiscord/app.py
    @@ -151,6 +151,7 @@ def discord_process():
             except (psutil.Error, OSError):
                 pass
             else:
    +            exe = exe.replace('.Discord-wrapped', 'Discord') # fix for nixos
                 if exe.startswith('Discord') and not exe.endswith('Helper'):
                     entry = executables.get(exe)
    '')];
  doCheck = false;
  propagatedBuildInputs = with python36Packages; [ psutil ];
}

@tadeokondrak
Copy link
Author

closing in favour of #65

@tadeokondrak tadeokondrak deleted the nixos-fix branch December 28, 2018 03:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant