From dfc4125c0231f8cadea5978fa425152095802287 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sandro=20J=C3=A4ckel?= Date: Mon, 2 Oct 2023 23:03:39 +0200 Subject: [PATCH 01/14] mattermost-desktop: remove no longer used atomEnv and autoPatchelfHook --- .../mattermost-desktop/default.nix | 20 +------------------ 1 file changed, 1 insertion(+), 19 deletions(-) diff --git a/pkgs/applications/networking/instant-messengers/mattermost-desktop/default.nix b/pkgs/applications/networking/instant-messengers/mattermost-desktop/default.nix index 9ea8397e2446..7e3d8fc7a359 100644 --- a/pkgs/applications/networking/instant-messengers/mattermost-desktop/default.nix +++ b/pkgs/applications/networking/instant-messengers/mattermost-desktop/default.nix @@ -1,15 +1,8 @@ { lib , stdenv , fetchurl -, atomEnv , electron_26 -, systemd -, pulseaudio -, libxshmfence -, libnotify -, libappindicator-gtk3 , makeWrapper -, autoPatchelfHook }: let @@ -38,18 +31,7 @@ stdenv.mkDerivation { src = fetchurl (srcs."${system}" or (throw "Unsupported system ${system}")); - nativeBuildInputs = [ makeWrapper autoPatchelfHook ]; - - buildInputs = atomEnv.packages ++ [ - libxshmfence - ]; - - runtimeDependencies = [ - (lib.getLib systemd) - pulseaudio - libnotify - libappindicator-gtk3 - ]; + nativeBuildInputs = [ makeWrapper ]; installPhase = '' runHook preInstall From 522cc0ad746ec443cc56e58deb8774b0b92422d7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sandro=20J=C3=A4ckel?= Date: Tue, 3 Oct 2023 00:21:53 +0200 Subject: [PATCH 02/14] teams: remove unused inputs --- .../instant-messengers/teams/default.nix | 15 --------------- 1 file changed, 15 deletions(-) diff --git a/pkgs/applications/networking/instant-messengers/teams/default.nix b/pkgs/applications/networking/instant-messengers/teams/default.nix index c79b6f0b03da..ce52a641124e 100644 --- a/pkgs/applications/networking/instant-messengers/teams/default.nix +++ b/pkgs/applications/networking/instant-messengers/teams/default.nix @@ -1,24 +1,9 @@ { lib , stdenv -, runtimeShell , fetchurl -, autoPatchelfHook -, wrapGAppsHook -, dpkg -, atomEnv -, libuuid -, libappindicator-gtk3 -, pulseaudio -, at-spi2-atk -, coreutils -, gawk -, xdg-utils -, systemd -, asar , xar , cpio , makeWrapper -, enableRectOverlay ? false }: let From a97aff3fccbb66f45f9aa70a488a9ed9c749dd6c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sandro=20J=C3=A4ckel?= Date: Tue, 3 Oct 2023 00:35:31 +0200 Subject: [PATCH 03/14] wire-desktop: remove atomEnv --- .../wire-desktop/default.nix | 24 ++++++++++++------- 1 file changed, 16 insertions(+), 8 deletions(-) diff --git a/pkgs/applications/networking/instant-messengers/wire-desktop/default.nix b/pkgs/applications/networking/instant-messengers/wire-desktop/default.nix index 27a4a65605ed..2d1456842456 100644 --- a/pkgs/applications/networking/instant-messengers/wire-desktop/default.nix +++ b/pkgs/applications/networking/instant-messengers/wire-desktop/default.nix @@ -1,5 +1,4 @@ -{ atomEnv -, autoPatchelfHook +{ autoPatchelfHook , dpkg , fetchurl , makeDesktopItem @@ -11,7 +10,11 @@ , cpio , xar , libdbusmenu -, libxshmfence +, alsa-lib +, mesa +, nss +, nspr +, systemd }: let @@ -64,8 +67,7 @@ let inherit pname version meta; src = fetchurl { - url = "https://wire-app.wire.com/linux/debian/pool/main/" - + "Wire-${version}_amd64.deb"; + url = "https://wire-app.wire.com/linux/debian/pool/main/Wire-${version}_amd64.deb"; inherit hash; }; @@ -85,6 +87,7 @@ let dontPatchELF = true; dontWrapGApps = true; + # TODO: migrate off autoPatchelfHook and use nixpkgs' electron nativeBuildInputs = [ autoPatchelfHook dpkg @@ -92,7 +95,13 @@ let wrapGAppsHook ]; - buildInputs = [ libxshmfence ] ++ atomEnv.packages; + buildInputs = [ + alsa-lib + mesa + nss + nspr + systemd + ]; unpackPhase = '' runHook preUnpack @@ -132,8 +141,7 @@ let inherit pname version meta; src = fetchurl { - url = "https://github.com/wireapp/wire-desktop/releases/download/" - + "macos%2F${version}/Wire.pkg"; + url = "https://github.com/wireapp/wire-desktop/releases/download/macos%2F${version}/Wire.pkg"; inherit hash; }; From cf1ff8be6b7c76e8934d64be0ae5b4688a1a080a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sandro=20J=C3=A4ckel?= Date: Tue, 3 Oct 2023 01:31:32 +0200 Subject: [PATCH 04/14] trilium: remove atomEnv --- pkgs/applications/office/trilium/desktop.nix | 18 ++++++++++++++---- 1 file changed, 14 insertions(+), 4 deletions(-) diff --git a/pkgs/applications/office/trilium/desktop.nix b/pkgs/applications/office/trilium/desktop.nix index 949e7505b893..dd3f41df5230 100644 --- a/pkgs/applications/office/trilium/desktop.nix +++ b/pkgs/applications/office/trilium/desktop.nix @@ -1,6 +1,7 @@ { stdenv, lib, unzip, autoPatchelfHook -, fetchurl, atomEnv, makeWrapper -, makeDesktopItem, copyDesktopItems, wrapGAppsHook, libxshmfence +, fetchurl, makeWrapper +, alsa-lib, mesa, nss, nspr, systemd +, makeDesktopItem, copyDesktopItems, wrapGAppsHook , metaCommon }: @@ -24,6 +25,7 @@ let src = fetchurl linuxSource; + # TODO: migrate off autoPatchelfHook and use nixpkgs' electron nativeBuildInputs = [ autoPatchelfHook makeWrapper @@ -31,7 +33,14 @@ let copyDesktopItems ]; - buildInputs = atomEnv.packages ++ [ libxshmfence ]; + buildInputs = [ + alsa-lib + mesa + nss + nspr + stdenv.cc.cc + systemd + ]; desktopItems = [ (makeDesktopItem { @@ -64,8 +73,9 @@ let ''; # LD_LIBRARY_PATH "shouldn't" be needed, remove when possible :) + # Error: libstdc++.so.6: cannot open shared object file: No such file or directory preFixup = '' - gappsWrapperArgs+=(--prefix LD_LIBRARY_PATH : ${atomEnv.libPath}) + gappsWrapperArgs+=(--prefix LD_LIBRARY_PATH : ${lib.makeLibraryPath buildInputs}) ''; dontStrip = true; From 73dca593c4cca1b2d33f4e50a2cb30537b66913a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sandro=20J=C3=A4ckel?= Date: Tue, 3 Oct 2023 01:44:20 +0200 Subject: [PATCH 05/14] vscode: remove atomEnv --- pkgs/applications/editors/vscode/generic.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/applications/editors/vscode/generic.nix b/pkgs/applications/editors/vscode/generic.nix index 39e4fbc966d7..e8ae861bf2fb 100644 --- a/pkgs/applications/editors/vscode/generic.nix +++ b/pkgs/applications/editors/vscode/generic.nix @@ -1,6 +1,6 @@ { stdenv, lib, makeDesktopItem , unzip, libsecret, libXScrnSaver, libxshmfence, buildPackages -, atomEnv, at-spi2-atk, autoPatchelfHook +, at-spi2-atk, autoPatchelfHook, alsa-lib, mesa, nss, nspr, xorg , systemd, fontconfig, libdbusmenu, glib, buildFHSEnv, wayland , libglvnd, libkrb5 @@ -67,7 +67,7 @@ let }; buildInputs = [ libsecret libXScrnSaver libxshmfence ] - ++ lib.optionals (!stdenv.isDarwin) ([ at-spi2-atk libkrb5 ] ++ atomEnv.packages); + ++ lib.optionals (!stdenv.isDarwin) [ alsa-lib at-spi2-atk libkrb5 mesa nss nspr systemd xorg.libxkbfile ]; runtimeDependencies = lib.optionals stdenv.isLinux [ (lib.getLib systemd) fontconfig.lib libdbusmenu wayland libsecret ]; From 33b832bd808be9679e5382384b17b3662df4ca35 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sandro=20J=C3=A4ckel?= Date: Tue, 3 Oct 2023 02:34:02 +0200 Subject: [PATCH 06/14] pulsar: remove atomEnv --- pkgs/applications/editors/pulsar/default.nix | 44 +++++++++++++++++--- 1 file changed, 38 insertions(+), 6 deletions(-) diff --git a/pkgs/applications/editors/pulsar/default.nix b/pkgs/applications/editors/pulsar/default.nix index e0b967f8043c..33dd4f2bb7a3 100644 --- a/pkgs/applications/editors/pulsar/default.nix +++ b/pkgs/applications/editors/pulsar/default.nix @@ -1,22 +1,32 @@ { lib , stdenv , git -, runtimeShell , fetchurl , wrapGAppsHook +, alsa-lib +, at-spi2-atk +, cairo +, cups +, dbus +, expat +, gdk-pixbuf , glib , gtk3 -, atomEnv +, mesa +, nss +, nspr , xorg +, libdrm +, libsecret , libxkbcommon -, hunspell +, pango +, systemd , hunspellDicts , useHunspell ? true , languages ? [ "en_US" ] , withNemoAction ? true , makeDesktopItem , copyDesktopItems -, makeWrapper , asar , python3 }: @@ -32,13 +42,35 @@ let aarch64-linux.hash = "sha256-GdPnmhMZR3Y2WB2j98JEWomdKFZuTgxN8oga/tBwA4U="; }.${stdenv.hostPlatform.system} or (throw "Unsupported system: ${stdenv.hostPlatform.system}"); - additionalLibs = lib.makeLibraryPath [ + newLibpath = lib.makeLibraryPath [ + alsa-lib + at-spi2-atk + cairo + cups + dbus + expat + gdk-pixbuf + glib + gtk3 + libsecret + mesa + nss + nspr + libdrm + xorg.libX11 + xorg.libxcb + xorg.libXcomposite + xorg.libXdamage + xorg.libXext + xorg.libXfixes + xorg.libXrandr xorg.libxshmfence libxkbcommon xorg.libxkbfile + pango stdenv.cc.cc.lib + systemd ]; - newLibpath = "${atomEnv.libPath}:${additionalLibs}"; # Hunspell hunspellDirs = builtins.map (lang: "${hunspellDicts.${lang}}/share/hunspell") languages; From a52ccbe545206a0647c494b01134fd7014d131c7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sandro=20J=C3=A4ckel?= Date: Tue, 3 Oct 2023 02:41:51 +0200 Subject: [PATCH 07/14] azuredatastudio: remove atomEnv --- .../misc/azuredatastudio/default.nix | 72 ++++++++++++------- 1 file changed, 48 insertions(+), 24 deletions(-) diff --git a/pkgs/applications/misc/azuredatastudio/default.nix b/pkgs/applications/misc/azuredatastudio/default.nix index 7e366d19d54c..f90bed6390f2 100644 --- a/pkgs/applications/misc/azuredatastudio/default.nix +++ b/pkgs/applications/misc/azuredatastudio/default.nix @@ -4,21 +4,31 @@ , copyDesktopItems , makeDesktopItem , makeWrapper -, libuuid -, libunwind -, libxkbcommon -, icu -, openssl -, zlib -, curl -, at-spi2-core +, alsa-lib , at-spi2-atk +, at-spi2-core +, cairo +, cups +, curl +, dbus +, expat +, gdk-pixbuf +, glib , gnutar -, atomEnv -, libkrb5 +, gtk3 +, icu , libdrm +, libunwind +, libuuid +, libxkbcommon , mesa +, nspr +, nss +, openssl +, pango +, systemd , xorg +, zlib }: # from justinwoo/azuredatastudio-nix @@ -115,20 +125,34 @@ stdenv.mkDerivation rec { sqltoolsservicePath = "${targetPath}/resources/app/extensions/mssql/sqltoolsservice/Linux/4.7.1.6"; rpath = lib.concatStringsSep ":" [ - atomEnv.libPath - ( - lib.makeLibraryPath [ - libuuid - at-spi2-core - at-spi2-atk - stdenv.cc.cc.lib - libkrb5 - libdrm - libxkbcommon - mesa - xorg.libxshmfence - ] - ) + (lib.makeLibraryPath [ + alsa-lib + at-spi2-atk + cairo + cups + dbus + expat + gdk-pixbuf + glib + gtk3 + mesa + nss + nspr + libdrm + xorg.libX11 + xorg.libxcb + xorg.libXcomposite + xorg.libXdamage + xorg.libXext + xorg.libXfixes + xorg.libXrandr + xorg.libxshmfence + libxkbcommon + xorg.libxkbfile + pango + stdenv.cc.cc.lib + systemd + ]) targetPath sqltoolsserviceRpath ]; From 604649162f1a8cc7cc38b2cd7628bc491fa5b740 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sandro=20J=C3=A4ckel?= Date: Tue, 3 Oct 2023 02:47:46 +0200 Subject: [PATCH 08/14] simplenote: remove atomEnv --- pkgs/applications/misc/simplenote/default.nix | 25 ++++++++++++++----- 1 file changed, 19 insertions(+), 6 deletions(-) diff --git a/pkgs/applications/misc/simplenote/default.nix b/pkgs/applications/misc/simplenote/default.nix index 35f153393518..82008de9576b 100644 --- a/pkgs/applications/misc/simplenote/default.nix +++ b/pkgs/applications/misc/simplenote/default.nix @@ -1,5 +1,4 @@ -{ atomEnv -, autoPatchelfHook +{ autoPatchelfHook , dpkg , fetchurl , makeDesktopItem @@ -7,7 +6,13 @@ , lib , stdenv , udev +, alsa-lib +, mesa +, nss +, nspr +, systemd , wrapGAppsHook +, xorg }: let @@ -40,9 +45,7 @@ let inherit pname version meta; src = fetchurl { - url = - "https://github.com/Automattic/simplenote-electron/releases/download/" - + "v${version}/Simplenote-linux-${version}-amd64.deb"; + url = "https://github.com/Automattic/simplenote-electron/releases/download/v${version}/Simplenote-linux-${version}-amd64.deb"; inherit sha256; }; @@ -61,6 +64,7 @@ let dontPatchELF = true; dontWrapGApps = true; + # TODO: migrate off autoPatchelfHook and use nixpkgs' electron nativeBuildInputs = [ autoPatchelfHook dpkg @@ -68,7 +72,16 @@ let wrapGAppsHook ]; - buildInputs = atomEnv.packages; + buildInputs = [ + alsa-lib + mesa + xorg.libXScrnSaver + xorg.libXtst + nss + nspr + stdenv.cc.cc + systemd + ]; unpackPhase = "dpkg-deb -x $src ."; From d1b31aaba645fb95857a264c53f3cf386ddf4f3a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sandro=20J=C3=A4ckel?= Date: Tue, 3 Oct 2023 02:52:34 +0200 Subject: [PATCH 09/14] sidequest: remove atomEnv --- pkgs/applications/misc/sidequest/default.nix | 69 +++++++++++++++++--- 1 file changed, 61 insertions(+), 8 deletions(-) diff --git a/pkgs/applications/misc/sidequest/default.nix b/pkgs/applications/misc/sidequest/default.nix index 7c6f9249a2dc..b5898c48cd90 100644 --- a/pkgs/applications/misc/sidequest/default.nix +++ b/pkgs/applications/misc/sidequest/default.nix @@ -1,4 +1,31 @@ -{ stdenv, lib, fetchurl, buildFHSEnv, makeDesktopItem, makeWrapper, atomEnv, libuuid, libxkbcommon, libxshmfence, at-spi2-atk, icu, openssl, zlib }: +{ stdenv +, lib +, fetchurl +, buildFHSEnv +, makeDesktopItem +, makeWrapper +, alsa-lib +, at-spi2-atk +, cairo +, cups +, dbus +, expat +, gdk-pixbuf +, glib +, gtk3 +, mesa +, nss +, nspr +, libdrm +, xorg +, libxkbcommon +, libxshmfence +, pango +, systemd +, icu +, openssl +, zlib +}: let pname = "sidequest"; version = "0.10.33"; @@ -21,20 +48,46 @@ nativeBuildInputs = [ makeWrapper ]; - buildCommand = '' + installPhase = '' mkdir -p "$out/lib/SideQuest" "$out/bin" tar -xJf "$src" -C "$out/lib/SideQuest" --strip-components 1 ln -s "$out/lib/SideQuest/sidequest" "$out/bin" + ''; - fixupPhase - - # mkdir -p "$out/share/applications" - # ln -s "${desktopItem}/share/applications/*" "$out/share/applications" - + postFixup = let + libPath = lib.makeLibraryPath [ + alsa-lib + at-spi2-atk + cairo + cups + dbus + expat + gdk-pixbuf + glib + gtk3 + mesa + nss + nspr + libdrm + xorg.libX11 + xorg.libxcb + xorg.libXcomposite + xorg.libXdamage + xorg.libXext + xorg.libXfixes + xorg.libXrandr + xorg.libxshmfence + libxkbcommon + xorg.libxkbfile + pango + stdenv.cc.cc.lib + systemd + ]; + in '' patchelf \ --set-interpreter "$(cat $NIX_CC/nix-support/dynamic-linker)" \ - --set-rpath "${atomEnv.libPath}/lib:${lib.makeLibraryPath [libuuid at-spi2-atk]}:$out/lib/SideQuest" \ + --set-rpath "${libPath}:$out/lib/SideQuest" \ "$out/lib/SideQuest/sidequest" ''; }; From 5d5e71a3acf6ec18dbf58c5d52cdc62eea4779e9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sandro=20J=C3=A4ckel?= Date: Tue, 3 Oct 2023 03:03:12 +0200 Subject: [PATCH 10/14] electron-bin: remove atomEnv --- .../tools/electron/binary/generic.nix | 57 ++++++++++++++----- 1 file changed, 43 insertions(+), 14 deletions(-) diff --git a/pkgs/development/tools/electron/binary/generic.nix b/pkgs/development/tools/electron/binary/generic.nix index 615ec9243bb2..f7e8f6461a4c 100644 --- a/pkgs/development/tools/electron/binary/generic.nix +++ b/pkgs/development/tools/electron/binary/generic.nix @@ -1,4 +1,5 @@ -{ lib, stdenv +{ lib +, stdenv , libXScrnSaver , makeWrapper , fetchurl @@ -6,17 +7,23 @@ , glib , gtk3 , unzip -, atomEnv -, libuuid , at-spi2-atk -, at-spi2-core , libdrm , mesa , libxkbcommon -, libappindicator-gtk3 , libxshmfence , libglvnd -, wayland +, alsa-lib +, cairo +, cups +, dbus +, expat +, gdk-pixbuf +, nss +, nspr +, xorg +, pango +, systemd }: version: hashes: @@ -64,13 +71,35 @@ let passthru.headers = headersFetcher version hashes.headers; }; - electronLibPath = with lib; makeLibraryPath ( - [ libuuid at-spi2-atk at-spi2-core libappindicator-gtk3 wayland ] - ++ optionals (versionAtLeast version "9.0.0") [ libdrm mesa ] - ++ optionals (versionOlder version "10.0.0") [ libXScrnSaver ] - ++ optionals (versionAtLeast version "11.0.0") [ libxkbcommon ] - ++ optionals (versionAtLeast version "12.0.0") [ libxshmfence ] - ++ optionals (versionAtLeast version "17.0.0") [ libglvnd ] + electronLibPath = lib.makeLibraryPath ([ + alsa-lib + at-spi2-atk + cairo + cups + dbus + expat + gdk-pixbuf + glib + gtk3 + nss + nspr + xorg.libX11 + xorg.libxcb + xorg.libXcomposite + xorg.libXdamage + xorg.libXext + xorg.libXfixes + xorg.libXrandr + xorg.libxkbfile + pango + stdenv.cc.cc.lib + systemd + ] + ++ lib.optionals (lib.versionAtLeast version "9.0.0") [ libdrm mesa ] + ++ lib.optionals (lib.versionOlder version "10.0.0") [ libXScrnSaver ] + ++ lib.optionals (lib.versionAtLeast version "11.0.0") [ libxkbcommon ] + ++ lib.optionals (lib.versionAtLeast version "12.0.0") [ libxshmfence ] + ++ lib.optionals (lib.versionAtLeast version "17.0.0") [ libglvnd ] ); linux = { @@ -95,7 +124,7 @@ let postFixup = '' patchelf \ --set-interpreter "$(cat $NIX_CC/nix-support/dynamic-linker)" \ - --set-rpath "${atomEnv.libPath}:${electronLibPath}:$out/libexec/electron" \ + --set-rpath "${electronLibPath}:$out/libexec/electron" \ $out/libexec/electron/.electron-wrapped \ ${lib.optionalString (lib.versionAtLeast version "15.0.0") "$out/libexec/electron/.chrome_crashpad_handler-wrapped" } ''; From bbd62ccd6cc60505ba66cfec4ce9ea3a493da2be Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sandro=20J=C3=A4ckel?= Date: Tue, 3 Oct 2023 03:03:18 +0200 Subject: [PATCH 11/14] electron-bin: use callPackage --- .../tools/electron/binary/default.nix | 24 ++----------------- 1 file changed, 2 insertions(+), 22 deletions(-) diff --git a/pkgs/development/tools/electron/binary/default.nix b/pkgs/development/tools/electron/binary/default.nix index 6cdcac1a70db..94c7b2750a90 100644 --- a/pkgs/development/tools/electron/binary/default.nix +++ b/pkgs/development/tools/electron/binary/default.nix @@ -1,29 +1,9 @@ -{ lib, stdenv -, libXScrnSaver -, makeWrapper -, fetchurl -, wrapGAppsHook -, glib -, gtk3 -, unzip -, atomEnv -, libuuid -, at-spi2-atk -, at-spi2-core -, libdrm -, mesa -, libxkbcommon -, libappindicator-gtk3 -, libxshmfence -, libglvnd -, wayland -}@args: +{ callPackage }: let - mkElectron = import ./generic.nix args; + mkElectron = callPackage ./generic.nix { }; in rec { - electron-bin = electron_26-bin; electron_10-bin = mkElectron "10.4.7" { From 71e4764cee2a2edb4c4f9f98733769790731b8f0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sandro=20J=C3=A4ckel?= Date: Tue, 3 Oct 2023 15:24:55 +0200 Subject: [PATCH 12/14] termius: remove atomEnv --- pkgs/applications/networking/termius/default.nix | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/pkgs/applications/networking/termius/default.nix b/pkgs/applications/networking/termius/default.nix index 8b0e3e1b6dc1..f2d8b8d68541 100644 --- a/pkgs/applications/networking/termius/default.nix +++ b/pkgs/applications/networking/termius/default.nix @@ -1,14 +1,15 @@ -{ atomEnv -, autoPatchelfHook +{ autoPatchelfHook , squashfsTools +, alsa-lib , fetchurl , makeDesktopItem , makeWrapper , stdenv , lib +, libsecret +, mesa , udev , wrapGAppsHook -, libxshmfence }: stdenv.mkDerivation rec { @@ -41,9 +42,14 @@ stdenv.mkDerivation rec { dontPatchELF = true; dontWrapGApps = true; + # TODO: migrate off autoPatchelfHook and use nixpkgs' electron nativeBuildInputs = [ autoPatchelfHook squashfsTools makeWrapper wrapGAppsHook ]; - buildInputs = atomEnv.packages ++ [ libxshmfence ]; + buildInputs = [ + alsa-lib + libsecret + mesa + ]; unpackPhase = '' runHook preUnpack From d6d69c2a559aa0757831d77f849ead1091bfb10a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sandro=20J=C3=A4ckel?= Date: Tue, 3 Oct 2023 15:40:53 +0200 Subject: [PATCH 13/14] hakuneko: remove atomEnv --- pkgs/tools/misc/hakuneko/default.nix | 18 +++++++++++++++--- 1 file changed, 15 insertions(+), 3 deletions(-) diff --git a/pkgs/tools/misc/hakuneko/default.nix b/pkgs/tools/misc/hakuneko/default.nix index 128cddd8c682..bb7bf24cb659 100644 --- a/pkgs/tools/misc/hakuneko/default.nix +++ b/pkgs/tools/misc/hakuneko/default.nix @@ -1,5 +1,4 @@ -{ atomEnv -, autoPatchelfHook +{ autoPatchelfHook , dpkg , fetchurl , makeDesktopItem @@ -8,6 +7,11 @@ , stdenv , lib , wrapGAppsHook +, alsa-lib +, nss +, nspr +, systemd +, xorg }: let desktopItem = makeDesktopItem { @@ -39,6 +43,7 @@ stdenv.mkDerivation rec { dontPatchELF = true; dontWrapGApps = true; + # TODO: migrate off autoPatchelfHook and use nixpkgs' electron nativeBuildInputs = [ autoPatchelfHook dpkg @@ -46,7 +51,14 @@ stdenv.mkDerivation rec { wrapGAppsHook ]; - buildInputs = atomEnv.packages; + buildInputs = [ + alsa-lib + nss + nspr + xorg.libXScrnSaver + xorg.libXtst + systemd + ]; unpackPhase = '' # The deb file contains a setuid binary, so 'dpkg -x' doesn't work here From 244be72e19e96bdfb1e268d002af2e9c0036fbea Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sandro=20J=C3=A4ckel?= Date: Sun, 1 Oct 2023 18:50:27 +0200 Subject: [PATCH 14/14] atom*: drop --- pkgs/applications/editors/atom/default.nix | 96 ---------------------- pkgs/applications/editors/atom/env.nix | 23 ------ pkgs/top-level/aliases.nix | 4 + pkgs/top-level/all-packages.nix | 6 -- pkgs/top-level/packages-config.nix | 1 - 5 files changed, 4 insertions(+), 126 deletions(-) delete mode 100644 pkgs/applications/editors/atom/default.nix delete mode 100644 pkgs/applications/editors/atom/env.nix diff --git a/pkgs/applications/editors/atom/default.nix b/pkgs/applications/editors/atom/default.nix deleted file mode 100644 index 29c4bb6c884c..000000000000 --- a/pkgs/applications/editors/atom/default.nix +++ /dev/null @@ -1,96 +0,0 @@ -{ lib, stdenv, pkgs, fetchurl, wrapGAppsHook, glib, gtk3, atomEnv }: - -let - versions = { - atom = { - version = "1.60.0"; - sha256 = "sha256-XHwCWQYrnUkR0lN7/Or/Uxb53hEWmIQKkNfNSX34kaY="; - }; - - atom-beta = { - version = "1.61.0"; - beta = 0; - sha256 = "sha256-viY/is7Nh3tlIkHhUBWtgMAjD6HDiC0pyJpUjsP5pRY="; - broken = true; - }; - }; - - common = pname: {version, sha256, beta ? null, broken ? false}: - let fullVersion = version + lib.optionalString (beta != null) "-beta${toString beta}"; - name = "${pname}-${fullVersion}"; - in stdenv.mkDerivation { - inherit name; - version = fullVersion; - - src = fetchurl { - url = "https://github.com/atom/atom/releases/download/v${fullVersion}/atom-amd64.deb"; - name = "${name}.deb"; - inherit sha256; - }; - - nativeBuildInputs = [ - wrapGAppsHook # Fix error: GLib-GIO-ERROR **: No GSettings schemas are installed on the system - ]; - - buildInputs = [ - gtk3 # Fix error: GLib-GIO-ERROR **: Settings schema 'org.gtk.Settings.FileChooser' is not installed - ]; - - dontBuild = true; - dontConfigure = true; - - unpackPhase = '' - ar p $src data.tar.xz | tar xJ ./usr/ - ''; - - installPhase = '' - runHook preInstall - - mkdir -p $out - mv usr/bin usr/share $out - rm -rf $out/share/lintian - - runHook postInstall - ''; - - preFixup = '' - gappsWrapperArgs+=( - # needed for gio executable to be able to delete files - --prefix "PATH" : "${glib.bin}/bin" - ) - ''; - - postFixup = '' - share=$out/share/${pname} - - patchelf --set-interpreter "$(cat $NIX_CC/nix-support/dynamic-linker)" \ - --set-rpath "${atomEnv.libPath}:$share" \ - $share/atom - patchelf --set-interpreter "$(cat $NIX_CC/nix-support/dynamic-linker)" \ - --set-rpath "${atomEnv.libPath}" \ - $share/resources/app/apm/bin/node - patchelf --set-interpreter "$(cat $NIX_CC/nix-support/dynamic-linker)" \ - $share/resources/app.asar.unpacked/node_modules/symbols-view/vendor/ctags-linux - - dugite=$share/resources/app.asar.unpacked/node_modules/dugite - rm -f $dugite/git/bin/git - ln -s ${pkgs.git}/bin/git $dugite/git/bin/git - rm -f $dugite/git/libexec/git-core/git - ln -s ${pkgs.git}/bin/git $dugite/git/libexec/git-core/git - - find $share -name "*.node" -exec patchelf --set-rpath "${atomEnv.libPath}:$share" {} \; - - sed -i -e "s|Exec=.*$|Exec=$out/bin/${pname}|" $out/share/applications/${pname}.desktop - ''; - - meta = with lib; { - description = "A hackable text editor for the 21st Century"; - homepage = "https://atom.io/"; - sourceProvenance = with sourceTypes; [ binaryNativeCode ]; - license = licenses.mit; - maintainers = with maintainers; [ offline ysndr ]; - platforms = platforms.x86_64; - inherit broken; - }; - }; -in lib.mapAttrs common versions diff --git a/pkgs/applications/editors/atom/env.nix b/pkgs/applications/editors/atom/env.nix deleted file mode 100644 index a5ca5775aae3..000000000000 --- a/pkgs/applications/editors/atom/env.nix +++ /dev/null @@ -1,23 +0,0 @@ -{ stdenv, lib, zlib, glib, alsa-lib, dbus, gtk3, atk, pango, freetype, fontconfig -, gdk-pixbuf, cairo, cups, expat, libgpg-error, nspr -, nss, xorg, libcap, systemd, libnotify, libsecret, libuuid, at-spi2-atk -, at-spi2-core, libdbusmenu, libdrm, mesa -}: - -let - packages = [ - stdenv.cc.cc zlib glib dbus gtk3 atk pango freetype - fontconfig gdk-pixbuf cairo cups expat libgpg-error alsa-lib nspr nss - xorg.libXrender xorg.libX11 xorg.libXext xorg.libXdamage xorg.libXtst - xorg.libXcomposite xorg.libXi xorg.libXfixes xorg.libXrandr - xorg.libXcursor xorg.libxkbfile xorg.libXScrnSaver libcap systemd libnotify - xorg.libxcb libsecret libuuid at-spi2-atk at-spi2-core libdbusmenu - libdrm - mesa # required for libgbm - ]; - - libPathNative = lib.makeLibraryPath packages; - libPath64 = lib.makeSearchPathOutput "lib" "lib64" packages; - libPath = "${libPathNative}:${libPath64}"; - -in { inherit packages libPath; } diff --git a/pkgs/top-level/aliases.nix b/pkgs/top-level/aliases.nix index 7b6f8aa04ad7..608e7f5b29a4 100644 --- a/pkgs/top-level/aliases.nix +++ b/pkgs/top-level/aliases.nix @@ -109,6 +109,10 @@ mapAliases ({ asterisk_19 = throw "asterisk_19: Asterisk 19 is end of life and has been removed"; # Added 2023-04-19 at_spi2_atk = throw "'at_spi2_atk' has been renamed to/replaced by 'at-spi2-atk'"; # Converted to throw 2022-02-22 at_spi2_core = throw "'at_spi2_core' has been renamed to/replaced by 'at-spi2-core'"; # Converted to throw 2022-02-22 + atom = throw "'atom' has been removed because discontinued and deprecated. Consider using 'pulsar', a maintained fork"; # Added 2023-10-01 + atom-beta = throw "'atom-beta' has been removed because discontinued and deprecated. Consider using 'pulsar', a maintained fork"; # Added 2023-10-01 + atomEnv = throw "'atomEnv' has been removed because 'atom' is discontinued and deprecated. Consider using 'pulsar', a maintained fork"; # Added 2023-10-01 + atomPackages = throw "'atomPackages' has been removed because 'atom' is discontinued and deprecated. Consider using 'pulsar', a maintained fork"; # Added 2023-10-01 aucdtect = throw "aucdtect: Upstream no longer provides download urls"; # Added 2020-12-26 audacity-gtk2 = throw "'audacity-gtk2' has been removed to/replaced by 'audacity'"; # Added 2022-10-09 audacity-gtk3 = throw "'audacity-gtk3' has been removed to/replaced by 'audacity'"; # Added 2022-10-09 diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 8a6e84c60c5e..e5eff46406bc 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -30629,12 +30629,6 @@ with pkgs; atlassian-cli = callPackage ../applications/office/atlassian-cli { }; - atomEnv = callPackage ../applications/editors/atom/env.nix { }; - - atomPackages = dontRecurseIntoAttrs (callPackage ../applications/editors/atom { }); - - inherit (atomPackages) atom atom-beta; - pulsar = callPackage ../applications/editors/pulsar { }; asap = callPackage ../tools/audio/asap { }; diff --git a/pkgs/top-level/packages-config.nix b/pkgs/top-level/packages-config.nix index 223e31b3b72f..889ddccb0e1b 100644 --- a/pkgs/top-level/packages-config.nix +++ b/pkgs/top-level/packages-config.nix @@ -9,7 +9,6 @@ packageOverrides = super: with super; lib.mapAttrs (_: set: recurseIntoAttrs set) { inherit (super) apacheHttpdPackages - atomPackages fdbPackages fusePackages gns3Packages