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
This commit is contained in:
parent
ab99684408
commit
d7f2ab0ed8
|
@ -1,16 +1,17 @@
|
||||||
{ theme ? null, stdenv, fetchurl, dpkg, makeWrapper , alsaLib, atk, cairo,
|
{ theme ? null, stdenv, fetchurl, dpkg, makeWrapper , alsaLib, atk, cairo,
|
||||||
cups, curl, dbus, expat, fontconfig, freetype, glib , gnome2, gtk3, gdk-pixbuf,
|
cups, curl, dbus, expat, fontconfig, freetype, glib , gnome2, gtk3, gdk-pixbuf,
|
||||||
libappindicator-gtk3, libnotify, libxcb, nspr, nss, pango , systemd, xorg,
|
libappindicator-gtk3, libnotify, libxcb, nspr, nss, pango , systemd, xorg,
|
||||||
at-spi2-atk, libuuid, nodePackages
|
at-spi2-atk, at-spi2-core, libuuid, nodePackages, libpulseaudio
|
||||||
}:
|
}:
|
||||||
|
|
||||||
let
|
let
|
||||||
|
|
||||||
version = "4.0.2";
|
version = "4.1.2";
|
||||||
|
|
||||||
rpath = stdenv.lib.makeLibraryPath [
|
rpath = stdenv.lib.makeLibraryPath [
|
||||||
alsaLib
|
alsaLib
|
||||||
at-spi2-atk
|
at-spi2-atk
|
||||||
|
at-spi2-core
|
||||||
atk
|
atk
|
||||||
cairo
|
cairo
|
||||||
cups
|
cups
|
||||||
|
@ -32,6 +33,7 @@ let
|
||||||
stdenv.cc.cc
|
stdenv.cc.cc
|
||||||
systemd
|
systemd
|
||||||
libuuid
|
libuuid
|
||||||
|
libpulseaudio
|
||||||
|
|
||||||
xorg.libxkbfile
|
xorg.libxkbfile
|
||||||
xorg.libX11
|
xorg.libX11
|
||||||
|
@ -51,7 +53,7 @@ let
|
||||||
if stdenv.hostPlatform.system == "x86_64-linux" then
|
if stdenv.hostPlatform.system == "x86_64-linux" then
|
||||||
fetchurl {
|
fetchurl {
|
||||||
url = "https://downloads.slack-edge.com/linux_releases/slack-desktop-${version}-amd64.deb";
|
url = "https://downloads.slack-edge.com/linux_releases/slack-desktop-${version}-amd64.deb";
|
||||||
sha256 = "053j5py16ilpwy868rhh5l2g93xj1fq4fwxrsi2bkfsnmq261hkm";
|
sha256 = "0a1b2k81hm1lfrdb47gmd07jqb7hva9sxsiph7b3iwzpzw8pjrkh";
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
throw "Slack is not supported on ${stdenv.hostPlatform.system}";
|
throw "Slack is not supported on ${stdenv.hostPlatform.system}";
|
||||||
|
@ -63,18 +65,22 @@ in stdenv.mkDerivation {
|
||||||
inherit src;
|
inherit src;
|
||||||
|
|
||||||
buildInputs = [
|
buildInputs = [
|
||||||
dpkg
|
|
||||||
gtk3 # needed for GSETTINGS_SCHEMAS_PATH
|
gtk3 # needed for GSETTINGS_SCHEMAS_PATH
|
||||||
];
|
];
|
||||||
|
|
||||||
nativeBuildInputs = [ makeWrapper nodePackages.asar ];
|
nativeBuildInputs = [ dpkg makeWrapper nodePackages.asar ];
|
||||||
|
|
||||||
dontUnpack = true;
|
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
|
mkdir -p $out
|
||||||
dpkg -x $src $out
|
mv usr/* $out
|
||||||
cp -av $out/usr/* $out
|
|
||||||
rm -rf $out/etc $out/usr $out/share/lintian
|
|
||||||
|
|
||||||
# Otherwise it looks "suspicious"
|
# Otherwise it looks "suspicious"
|
||||||
chmod -R g-w $out
|
chmod -R g-w $out
|
||||||
|
|
Loading…
Reference in New Issue