summary refs log tree commit diff
path: root/pkgs/development/python-modules/rainbowstream
diff options
context:
space:
mode:
authorEric Sagnes <eric.sagnes@gmail.com>2016-08-31 03:02:53 +0900
committerEric Sagnes <eric.sagnes@gmail.com>2016-08-31 03:02:53 +0900
commit5af8e4b0017a297d5c34c2f305e7b8023cc7ce90 (patch)
tree5e4ad8c5ea40a74c8c9ae97e8ca03ecb9fb9ec76 /pkgs/development/python-modules/rainbowstream
parentdab32a1fa66237acc4ece2d3d4e01e84f4d490dc (diff)
downloadnixpkgs-5af8e4b0017a297d5c34c2f305e7b8023cc7ce90.tar
nixpkgs-5af8e4b0017a297d5c34c2f305e7b8023cc7ce90.tar.gz
nixpkgs-5af8e4b0017a297d5c34c2f305e7b8023cc7ce90.tar.bz2
nixpkgs-5af8e4b0017a297d5c34c2f305e7b8023cc7ce90.tar.lz
nixpkgs-5af8e4b0017a297d5c34c2f305e7b8023cc7ce90.tar.xz
nixpkgs-5af8e4b0017a297d5c34c2f305e7b8023cc7ce90.tar.zst
nixpkgs-5af8e4b0017a297d5c34c2f305e7b8023cc7ce90.zip
rainbowstream: 1.3.3 -> 1.3.5
Diffstat (limited to 'pkgs/development/python-modules/rainbowstream')
-rw-r--r--pkgs/development/python-modules/rainbowstream/setup.patch24
1 files changed, 24 insertions, 0 deletions
diff --git a/pkgs/development/python-modules/rainbowstream/setup.patch b/pkgs/development/python-modules/rainbowstream/setup.patch
new file mode 100644
index 00000000000..55afa49a96e
--- /dev/null
+++ b/pkgs/development/python-modules/rainbowstream/setup.patch
@@ -0,0 +1,24 @@
+diff --git a/setup.py b/setup.py
+index 07b5913..2b7b15e 100644
+--- a/setup.py
++++ b/setup.py
+@@ -24,15 +24,16 @@ install_requires = [
+ ]
+ 
+ # Default user (considers non virtualenv method)
+-user = os.environ.get('SUDO_USER', os.environ['USER'])
++user = os.environ.get('SUDO_USER', os.environ.get('USER', None))
+ 
+ # Copy default config if not exists
+ default = os.path.expanduser("~") + os.sep + '.rainbow_config.json'
+ if not os.path.isfile(default):
+     cmd = 'cp rainbowstream/colorset/config ' + default
+     os.system(cmd)
+-    cmd = 'chown ' + quote(user) + ' ' + default
+-    os.system(cmd)
++    if user:
++        cmd = 'chown ' + quote(user) + ' ' + default
++        os.system(cmd)
+     cmd = 'chmod 777 ' + default
+     os.system(cmd)
+