my nixos/home-manager configuration
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

clean unused discord files

+14 -268
+1 -1
pkgs/default.nix
··· 1 1 { pkgs }: 2 2 { 3 - discord = (pkgs.callPackage ./discord { }).discord; 3 + discord = pkgs.callPackage ./discord { }; 4 4 graalvm21-ce = pkgs.callPackage ./graalvm-ce { }; 5 5 }
-126
pkgs/discord/darwin.nix
··· 1 - { 2 - pname, 3 - version, 4 - src, 5 - meta, 6 - stdenv, 7 - binaryName, 8 - desktopName, 9 - self, 10 - lib, 11 - undmg, 12 - makeWrapper, 13 - writeScript, 14 - python3, 15 - runCommand, 16 - branch, 17 - withOpenASAR ? false, 18 - openasar, 19 - withVencord ? false, 20 - vencord, 21 - withEquicord ? false, 22 - equicord, 23 - withMoonlight ? false, 24 - moonlight, 25 - commandLineArgs ? "", 26 - }: 27 - 28 - let 29 - discordMods = [ 30 - withVencord 31 - withEquicord 32 - withMoonlight 33 - ]; 34 - enabledDiscordModsCount = builtins.length (lib.filter (x: x) discordMods); 35 - 36 - disableBreakingUpdates = 37 - runCommand "disable-breaking-updates.py" 38 - { 39 - pythonInterpreter = "${python3.interpreter}"; 40 - configDirName = lib.toLower binaryName; 41 - meta.mainProgram = "disable-breaking-updates.py"; 42 - } 43 - '' 44 - mkdir -p $out/bin 45 - cp ${./disable-breaking-updates.py} $out/bin/disable-breaking-updates.py 46 - substituteAllInPlace $out/bin/disable-breaking-updates.py 47 - chmod +x $out/bin/disable-breaking-updates.py 48 - ''; 49 - in 50 - assert lib.assertMsg ( 51 - enabledDiscordModsCount <= 1 52 - ) "discord: Only one of Vencord, Equicord or Moonlight can be enabled at the same time"; 53 - stdenv.mkDerivation { 54 - inherit 55 - pname 56 - version 57 - src 58 - meta 59 - ; 60 - 61 - nativeBuildInputs = [ 62 - undmg 63 - makeWrapper 64 - ]; 65 - 66 - sourceRoot = "."; 67 - 68 - installPhase = '' 69 - runHook preInstall 70 - 71 - mkdir -p $out/Applications 72 - cp -r "${desktopName}.app" $out/Applications 73 - 74 - # wrap executable to $out/bin 75 - mkdir -p $out/bin 76 - makeWrapper "$out/Applications/${desktopName}.app/Contents/MacOS/${binaryName}" "$out/bin/${binaryName}" \ 77 - --run ${lib.getExe disableBreakingUpdates} \ 78 - --add-flags ${lib.escapeShellArg commandLineArgs} 79 - 80 - runHook postInstall 81 - ''; 82 - 83 - postInstall = 84 - lib.strings.optionalString withOpenASAR '' 85 - cp -f ${openasar} $out/Applications/${desktopName}.app/Contents/Resources/app.asar 86 - '' 87 - + lib.strings.optionalString withVencord '' 88 - mv $out/Applications/${desktopName}.app/Contents/Resources/app.asar $out/Applications/${desktopName}.app/Contents/Resources/_app.asar 89 - mkdir $out/Applications/${desktopName}.app/Contents/Resources/app.asar 90 - echo '{"name":"discord","main":"index.js"}' > $out/Applications/${desktopName}.app/Contents/Resources/app.asar/package.json 91 - echo 'require("${vencord}/patcher.js")' > $out/Applications/${desktopName}.app/Contents/Resources/app.asar/index.js 92 - '' 93 - + lib.strings.optionalString withEquicord '' 94 - mv $out/Applications/${desktopName}.app/Contents/Resources/app.asar $out/Applications/${desktopName}.app/Contents/Resources/_app.asar 95 - mkdir $out/Applications/${desktopName}.app/Contents/Resources/app.asar 96 - echo '{"name":"discord","main":"index.js"}' > $out/Applications/${desktopName}.app/Contents/Resources/app.asar/package.json 97 - echo 'require("${equicord}/desktop/patcher.js")' > $out/Applications/${desktopName}.app/Contents/Resources/app.asar/index.js 98 - '' 99 - + lib.strings.optionalString withMoonlight '' 100 - mv $out/Applications/${desktopName}.app/Contents/Resources/app.asar $out/Applications/${desktopName}.app/Contents/Resources/_app.asar 101 - mkdir $out/Applications/${desktopName}.app/Contents/Resources/app.asar 102 - echo '{"name":"discord","main":"injector.js","private": true}' > $out/Applications/${desktopName}.app/Contents/Resources/app.asar/package.json 103 - echo 'require("${moonlight}/injector.js").inject(require("path").join(__dirname, "../_app.asar"));' > $out/Applications/${desktopName}.app/Contents/Resources/app.asar/injector.js 104 - ''; 105 - 106 - passthru = { 107 - # make it possible to run disableBreakingUpdates standalone 108 - inherit disableBreakingUpdates; 109 - updateScript = ./update.py; 110 - 111 - tests = { 112 - withVencord = self.override { 113 - withVencord = true; 114 - }; 115 - withEquicord = self.override { 116 - withEquicord = true; 117 - }; 118 - withMoonlight = self.override { 119 - withMoonlight = true; 120 - }; 121 - withOpenASAR = self.override { 122 - withOpenASAR = true; 123 - }; 124 - }; 125 - }; 126 - }
+13 -99
pkgs/discord/default.nix
··· 2 2 callPackage, 3 3 fetchurl, 4 4 lib, 5 - stdenv, 6 5 discord, 7 - discord-ptb, 8 - discord-canary, 9 - discord-development, 10 6 }: 11 - let 12 - variants = rec { 13 - x86_64-linux = { 14 - discord = rec { 15 - branch = "stable"; 16 - binaryName = desktopName; 17 - desktopName = "Discord"; 18 - self = discord; 19 - }; 20 - discord-ptb = { 21 - branch = "ptb"; 22 - binaryName = "DiscordPTB"; 23 - desktopName = "Discord PTB"; 24 - self = discord-ptb; 25 - }; 26 - discord-canary = { 27 - branch = "canary"; 28 - binaryName = "DiscordCanary"; 29 - desktopName = "Discord Canary"; 30 - self = discord-canary; 31 - }; 32 - discord-development = { 33 - branch = "development"; 34 - binaryName = "DiscordDevelopment"; 35 - desktopName = "Discord Development"; 36 - self = discord-development; 37 - }; 38 - }; 39 - x86_64-darwin = { 40 - discord = rec { 41 - branch = "stable"; 42 - binaryName = desktopName; 43 - desktopName = "Discord"; 44 - self = discord; 45 - }; 46 - discord-ptb = rec { 47 - branch = "ptb"; 48 - binaryName = desktopName; 49 - desktopName = "Discord PTB"; 50 - self = discord-ptb; 51 - }; 52 - discord-canary = rec { 53 - branch = "canary"; 54 - binaryName = desktopName; 55 - desktopName = "Discord Canary"; 56 - self = discord-canary; 57 - }; 58 - discord-development = rec { 59 - branch = "development"; 60 - binaryName = desktopName; 61 - desktopName = "Discord Development"; 62 - self = discord-development; 63 - }; 64 - }; 7 + callPackage ./linux.nix rec { 8 + pname = "discord"; 9 + version = "0.0.118"; 65 10 66 - aarch64-darwin = x86_64-darwin; 67 - default = x86_64-linux; # Used for unsupported platforms, so we can return *something* there. 11 + src = fetchurl { 12 + url = "https://stable.dl2.discordapp.net/apps/linux/${version}/discord-${version}.tar.gz"; 13 + hash = "sha256-B7gCr+DGoEghMw624OwyBOnPVxDvrYHUBAB9gSStw4g="; 68 14 }; 69 15 16 + branch = "stable"; 17 + binaryName = desktopName; 18 + desktopName = "Discord"; 19 + self = discord; 20 + 70 21 meta = { 71 22 description = "All-in-one cross-platform voice and text chat for gamers"; 72 23 downloadPage = "https://discordapp.com/download"; 73 24 homepage = "https://discordapp.com/"; 74 25 license = lib.licenses.unfree; 75 26 mainProgram = "discord"; 76 - maintainers = with lib.maintainers; [ 77 - artturin 78 - FlameFlag 79 - infinidoge 80 - jopejoe1 81 - Scrumplex 82 - ]; 83 - platforms = [ 84 - "x86_64-linux" 85 - "x86_64-darwin" 86 - "aarch64-darwin" 87 - ]; 27 + platforms = [ "x86_64-linux" ]; 88 28 sourceProvenance = with lib.sourceTypes; [ binaryNativeCode ]; 89 29 }; 90 - package = if stdenv.hostPlatform.isLinux then ./linux.nix else ./darwin.nix; 91 - 92 - sources = lib.importJSON ./sources.json; 93 - in 94 - lib.genAttrs [ "discord" "discord-ptb" "discord-canary" "discord-development" ] ( 95 - pname: 96 - let 97 - args = (variants.${stdenv.hostPlatform.system} or variants.default).${pname}; 98 - platformName = if stdenv.hostPlatform.isDarwin then "osx" else "linux"; 99 - source = sources."${platformName}-${args.branch}"; 100 - in 101 - callPackage package ( 102 - args 103 - // { 104 - inherit pname; 105 - inherit (source) version; 106 - 107 - src = fetchurl { 108 - inherit (source) url hash; 109 - }; 110 - 111 - meta = meta // { 112 - mainProgram = args.binaryName; 113 - }; 114 - } 115 - ) 116 - ) 30 + }
-42
pkgs/discord/sources.json
··· 1 - { 2 - "linux-canary": { 3 - "hash": "sha256-hhrjKkXnhHm8gntPMGjst1eLu8xqube73lnbW5TEINY=", 4 - "url": "https://canary.dl2.discordapp.net/apps/linux/0.0.819/discord-canary-0.0.819.tar.gz", 5 - "version": "0.0.819" 6 - }, 7 - "linux-development": { 8 - "hash": "sha256-1zlRLOxWUA7QNAMi2SRWCdnx1dbmkwWQSCl7Pyexoac=", 9 - "url": "https://development.dl2.discordapp.net/apps/linux/0.0.93/discord-development-0.0.93.tar.gz", 10 - "version": "0.0.93" 11 - }, 12 - "linux-ptb": { 13 - "hash": "sha256-uz3QNIDzmB/4aLNRNgB1wzpNJlc8ous8aUvcqGaHE7c=", 14 - "url": "https://ptb.dl2.discordapp.net/apps/linux/0.0.168/discord-ptb-0.0.168.tar.gz", 15 - "version": "0.0.168" 16 - }, 17 - "linux-stable": { 18 - "hash": "sha256-PN1E8GjVopEPGW9ISb0y1Lo7nnj30CXylW0nTR1Pc6U=", 19 - "url": "https://stable.dl2.discordapp.net/apps/linux/0.0.117/discord-0.0.117.tar.gz", 20 - "version": "0.0.117" 21 - }, 22 - "osx-canary": { 23 - "hash": "sha256-bBimaZYUjkd7MwiqJiNjgQpiBOEUAVhTFOoQ/cnR+K0=", 24 - "url": "https://canary.dl2.discordapp.net/apps/osx/0.0.923/DiscordCanary.dmg", 25 - "version": "0.0.923" 26 - }, 27 - "osx-development": { 28 - "hash": "sha256-x4i/bbaR4XjzyZGkVerUl8oxxhm01A+2tpN+UEtKwwc=", 29 - "url": "https://development.dl2.discordapp.net/apps/osx/0.0.105/DiscordDevelopment.dmg", 30 - "version": "0.0.105" 31 - }, 32 - "osx-ptb": { 33 - "hash": "sha256-Yk9q4GageNb/Tt+R1SGwWnJBRrjG4QIO6qYLjhak460=", 34 - "url": "https://ptb.dl2.discordapp.net/apps/osx/0.0.200/DiscordPTB.dmg", 35 - "version": "0.0.200" 36 - }, 37 - "osx-stable": { 38 - "hash": "sha256-k4S9UyO2GLmT/nnR1BUcUVjhFvxjGeQv2tbuZzEh8Ro=", 39 - "url": "https://stable.dl2.discordapp.net/apps/osx/0.0.369/Discord.dmg", 40 - "version": "0.0.369" 41 - } 42 - }