summary refs log tree commit diff
path: root/pkgs/applications/networking/instant-messengers/slack/default.nix
diff options
context:
space:
mode:
authortalyz <kim.lindberger@gmail.com>2019-11-15 18:36:08 +0100
committertalyz <kim.lindberger@gmail.com>2019-11-15 18:47:35 +0100
commitd7f2ab0ed81db4ee2a111a613fd20907da1ddd74 (patch)
tree402cf78b9facf7ac1a05f45613075f7c397fa611 /pkgs/applications/networking/instant-messengers/slack/default.nix
parentab9968440863b910e0dc675fe16a18bd9ae245b9 (diff)
downloadnixpkgs-d7f2ab0ed81db4ee2a111a613fd20907da1ddd74.tar
nixpkgs-d7f2ab0ed81db4ee2a111a613fd20907da1ddd74.tar.gz
nixpkgs-d7f2ab0ed81db4ee2a111a613fd20907da1ddd74.tar.bz2
nixpkgs-d7f2ab0ed81db4ee2a111a613fd20907da1ddd74.tar.lz
nixpkgs-d7f2ab0ed81db4ee2a111a613fd20907da1ddd74.tar.xz
nixpkgs-d7f2ab0ed81db4ee2a111a613fd20907da1ddd74.tar.zst
nixpkgs-d7f2ab0ed81db4ee2a111a613fd20907da1ddd74.zip
slack: 4.0.2 -> 4.1.2
Also:
- Add missing dependency on libpulseaudio
- Extract the deb in the build folder and move only the files we're
  interested in to $out
- Use the regular builder, but turn off the patchELF hook
- Move dpkg from buildInputs to nativeBuildInputs, since it's only
  used at build time
Diffstat (limited to 'pkgs/applications/networking/instant-messengers/slack/default.nix')
-rw-r--r--pkgs/applications/networking/instant-messengers/slack/default.nix24
1 files changed, 15 insertions, 9 deletions
diff --git a/pkgs/applications/networking/instant-messengers/slack/default.nix b/pkgs/applications/networking/instant-messengers/slack/default.nix
index d3aa302d601..a16023f307d 100644
--- a/pkgs/applications/networking/instant-messengers/slack/default.nix
+++ b/pkgs/applications/networking/instant-messengers/slack/default.nix
@@ -1,16 +1,17 @@
 { theme ? null, stdenv, fetchurl, dpkg, makeWrapper , alsaLib, atk, cairo,
 cups, curl, dbus, expat, fontconfig, freetype, glib , gnome2, gtk3, gdk-pixbuf,
 libappindicator-gtk3, libnotify, libxcb, nspr, nss, pango , systemd, xorg,
-at-spi2-atk, libuuid, nodePackages
+at-spi2-atk, at-spi2-core, libuuid, nodePackages, libpulseaudio
 }:
 
 let
 
-  version = "4.0.2";
+  version = "4.1.2";
 
   rpath = stdenv.lib.makeLibraryPath [
     alsaLib
     at-spi2-atk
+    at-spi2-core
     atk
     cairo
     cups
@@ -32,6 +33,7 @@ let
     stdenv.cc.cc
     systemd
     libuuid
+    libpulseaudio
 
     xorg.libxkbfile
     xorg.libX11
@@ -51,7 +53,7 @@ let
     if stdenv.hostPlatform.system == "x86_64-linux" then
       fetchurl {
         url = "https://downloads.slack-edge.com/linux_releases/slack-desktop-${version}-amd64.deb";
-        sha256 = "053j5py16ilpwy868rhh5l2g93xj1fq4fwxrsi2bkfsnmq261hkm";
+        sha256 = "0a1b2k81hm1lfrdb47gmd07jqb7hva9sxsiph7b3iwzpzw8pjrkh";
       }
     else
       throw "Slack is not supported on ${stdenv.hostPlatform.system}";
@@ -63,18 +65,22 @@ in stdenv.mkDerivation {
   inherit src;
 
   buildInputs = [
-    dpkg
     gtk3  # needed for GSETTINGS_SCHEMAS_PATH
   ];
 
-  nativeBuildInputs = [ makeWrapper nodePackages.asar ];
+  nativeBuildInputs = [ dpkg makeWrapper nodePackages.asar ];
 
   dontUnpack = true;
-  buildCommand = ''
+  dontBuild = true;
+  dontPatchELF = true;
+
+  installPhase = ''
+    # The deb file contains a setuid binary, so 'dpkg -x' doesn't work here
+    dpkg --fsys-tarfile $src | tar --extract
+    rm -rf usr/share/lintian
+
     mkdir -p $out
-    dpkg -x $src $out
-    cp -av $out/usr/* $out
-    rm -rf $out/etc $out/usr $out/share/lintian
+    mv usr/* $out
 
     # Otherwise it looks "suspicious"
     chmod -R g-w $out