lol

Merge master into staging-next

authored by

github-actions[bot] and committed by
GitHub
4edfd12c aea14e9b

+545 -311
+6
maintainers/maintainer-list.nix
··· 21616 21616 name = "Kostas Karachalios"; 21617 21617 githubId = 81346; 21618 21618 }; 21619 + vringar = { 21620 + email = "git@zabka.it"; 21621 + github = "vringar"; 21622 + name = "Stefan Zabka"; 21623 + githubId = 13276717; 21624 + }; 21619 21625 vrthra = { 21620 21626 email = "rahul@gopinath.org"; 21621 21627 github = "vrthra";
+8
nixos/doc/manual/release-notes/rl-2405.section.md
··· 555 555 556 556 - `icu` no longer includes `install-sh` and `mkinstalldirs` in the shared folder. 557 557 558 + - The `go-ethereum` package has been updated to v1.14.3. Geth v1.14.0 introduced a brand new live-tracing feature, 559 + which required a number of breaking internal API changes. If you had your own native tracers implemented before this change, 560 + the [changelog](https://github.com/ethereum/go-ethereum/blob/master/core/tracing/CHANGELOG.md) contains the necessary steps needed to update your old code for the new APIs. 561 + Geth v1.14.0 drops support for running pre-merge networks ([#29169](https://github.com/ethereum/go-ethereum/pull/29169)). 562 + It also stops automatically constructing the pending block ([#28623](https://github.com/ethereum/go-ethereum/pull/28623)), 563 + removes support for filtering pending logs, switched to using Go v1.22 by default (#28946), which means we've dropped support for Go v1.20. 564 + See [the 1.14.0 release notes](https://github.com/ethereum/go-ethereum/releases/tag/v1.14.0) for more details. 565 + 558 566 ## Other Notable Changes {#sec-release-24.05-notable-changes} 559 567 560 568 <!-- To avoid merge conflicts, consider adding your item at an arbitrary place in the list instead. -->
+20 -17
nixos/modules/programs/screen.nix
··· 12 12 package = lib.mkPackageOptionMD pkgs "screen" { }; 13 13 14 14 screenrc = lib.mkOption { 15 - type = with lib.types; nullOr lines; 15 + type = lib.types.lines; 16 + default = ""; 16 17 example = '' 17 18 defscrollback 10000 18 19 startup_message off ··· 22 23 }; 23 24 }; 24 25 25 - config = { 26 - # TODO: Added in 24.05, remove before 24.11 27 - assertions = [ 28 - { 29 - assertion = cfg.screenrc != null -> cfg.enable; 30 - message = "`programs.screen.screenrc` has been configured, but `programs.screen.enable` is not true"; 31 - } 32 - ]; 33 - } // lib.mkIf cfg.enable { 34 - environment.etc.screenrc = { 35 - enable = cfg.screenrc != null; 36 - text = cfg.screenrc; 37 - }; 38 - environment.systemPackages = [ cfg.package ]; 39 - security.pam.services.screen = {}; 40 - }; 26 + config = lib.mkMerge [ 27 + { 28 + # TODO: Added in 24.05, remove before 24.11 29 + assertions = [ 30 + { 31 + assertion = cfg.screenrc != "" -> cfg.enable; 32 + message = "`programs.screen.screenrc` has been configured, but `programs.screen.enable` is not true"; 33 + } 34 + ]; 35 + } 36 + (lib.mkIf cfg.enable { 37 + environment.etc.screenrc = { 38 + text = cfg.screenrc; 39 + }; 40 + environment.systemPackages = [ cfg.package ]; 41 + security.pam.services.screen = {}; 42 + }) 43 + ]; 41 44 }
+6 -4
pkgs/applications/audio/go-musicfox/default.nix
··· 2 2 , buildGoModule 3 3 , fetchFromGitHub 4 4 , pkg-config 5 + , flac 6 + , stdenv 5 7 , alsa-lib 6 - , flac 7 8 , nix-update-script 8 9 }: 9 10 10 11 buildGoModule rec { 11 12 pname = "go-musicfox"; 12 - version = "4.4.0"; 13 + version = "4.4.1"; 13 14 14 15 src = fetchFromGitHub { 15 16 owner = "go-musicfox"; 16 17 repo = "go-musicfox"; 17 18 rev = "v${version}"; 18 - hash = "sha256-11N3dykuEDKAryieNVaPfb3G7E/a4A7Znx9rBvFTHC4="; 19 + hash = "sha256-pIfQ0ufn8W0opm+N6IPFBPWNxNWMOU7FudPtIFop51c="; 19 20 }; 20 21 21 22 deleteVendor = true; ··· 35 36 ]; 36 37 37 38 buildInputs = [ 39 + flac 40 + ] ++ lib.optionals stdenv.isLinux [ 38 41 alsa-lib 39 - flac 40 42 ]; 41 43 42 44 passthru.updateScript = nix-update-script { };
+6 -4
pkgs/applications/blockchains/go-ethereum/default.nix
··· 9 9 10 10 in buildGoModule rec { 11 11 pname = "go-ethereum"; 12 - version = "1.13.5"; 12 + version = "1.14.3"; 13 13 14 14 src = fetchFromGitHub { 15 15 owner = "ethereum"; 16 16 repo = pname; 17 17 rev = "v${version}"; 18 - sha256 = "sha256-UbRsY9fSUYAwPcLfGGDHeqvSsLKUKR+2a93jH5xA9uQ="; 18 + sha256 = "sha256-h2i/q4gfvqO8SgFxjoIhm4y0icpt+qe0Tq+3W6Ld8KM="; 19 19 }; 20 20 21 - vendorHash = "sha256-dOvpOCMxxmcAaticSLVlro1L4crAVJWyvgx/JZZ7buE="; 21 + proxyVendor = true; 22 + vendorHash = "sha256-ugoRsxzJjPOS5yPhwqXhMPuThvyqCWvZD7PBnrkm0sQ="; 22 23 23 24 doCheck = false; 24 25 ··· 32 33 subPackages = [ 33 34 "cmd/abidump" 34 35 "cmd/abigen" 36 + "cmd/blsync" 35 37 "cmd/bootnode" 36 38 "cmd/clef" 37 39 "cmd/devp2p" 40 + "cmd/era" 38 41 "cmd/ethkey" 39 42 "cmd/evm" 40 - "cmd/faucet" 41 43 "cmd/geth" 42 44 "cmd/p2psim" 43 45 "cmd/rlpdump"
-24
pkgs/applications/version-management/git-credential-1password/default.nix
··· 1 - { lib, buildGoModule, fetchFromGitHub }: 2 - 3 - buildGoModule rec { 4 - pname = "git-credential-1password"; 5 - version = "1.2.1"; 6 - 7 - src = fetchFromGitHub { 8 - owner = "develerik"; 9 - repo = pname; 10 - rev = "v${version}"; 11 - sha256 = "sha256-8qdUOJ0MOk/xVvp3kDuxNRo3lMEJhLeI3Fle0tuZez0="; 12 - }; 13 - 14 - vendorHash = "sha256-B6BlVnUX4XLT+9EpL63Ht4S8Wo84RsmY99CL+srQfpw="; 15 - 16 - meta = with lib; { 17 - description = "A git credential helper for 1Password"; 18 - homepage = "https://github.com/develerik/git-credential-1password"; 19 - changelog = "https://github.com/develerik/git-credential-1password/releases/tag/v${version}"; 20 - license = licenses.isc; 21 - maintainers = [ maintainers.ivankovnatsky ]; 22 - mainProgram = "git-credential-1password"; 23 - }; 24 - }
+2 -3
pkgs/by-name/di/discordchatexporter-cli/deps.nix
··· 8 8 (fetchNuGet { pname = "CliFx"; version = "2.3.5"; sha256 = "0rlbv93ssw0d8kvhnvrz2f06ka66gz4gbz1va2q135dab99cmrin"; }) 9 9 (fetchNuGet { pname = "CSharpier.MsBuild"; version = "0.28.2"; sha256 = "10c3v3pqv49y5wi0slswfzkwjh9q93diihpmkbfp3r7yjpv6871d"; }) 10 10 (fetchNuGet { pname = "Deorcify"; version = "1.0.2"; sha256 = "0nwxyrl4rd5x621i2hs5fl3w7fxpm13lkdssxr9fd5042px2gqbm"; }) 11 - (fetchNuGet { pname = "DotnetRuntimeBootstrapper"; version = "2.5.4"; sha256 = "0pjzyvq0a975m0y7b0k8wsr7mskykv3bzba98xmcc29nsyib2a8h"; }) 12 11 (fetchNuGet { pname = "Gress"; version = "2.1.1"; sha256 = "1svz1flhyl26h3xjch0acjjinympgf6bhj5vpb188njfih3ip4ck"; }) 13 12 (fetchNuGet { pname = "JsonExtensions"; version = "1.2.0"; sha256 = "0g54hibabbqqfhxjlnxwv1rxagpali5agvnpymp2w3dk8h6q66xy"; }) 14 - (fetchNuGet { pname = "Polly"; version = "8.3.1"; sha256 = "19q7s493sv90879052pxfcbsk3bmxjg5688ya7l12964ddafiwsl"; }) 15 - (fetchNuGet { pname = "Polly.Core"; version = "8.3.1"; sha256 = "15ylkqdcwpr76n0nfzpvd6s00ywjagn1ignyrcz9arwahrxpsm4b"; }) 13 + (fetchNuGet { pname = "Polly"; version = "8.4.0"; sha256 = "1zpq6590zpj3sibdhrn3fydqrm9ga43xdxvjv3rwzhigrkddg9zl"; }) 14 + (fetchNuGet { pname = "Polly.Core"; version = "8.4.0"; sha256 = "1gp66r03zqvwwr4nw96n49bfv08bk54qpdbiqgxg93yhfsbsmkg8"; }) 16 15 (fetchNuGet { pname = "RazorBlade"; version = "0.6.0"; sha256 = "11k2j7d7ddb47sj4lkply8v4aqrfxl0b314cv0l4f5syi4ilfa6s"; }) 17 16 (fetchNuGet { pname = "Spectre.Console"; version = "0.49.1"; sha256 = "0fhl96p3xjd5k1wwvhs80cp35rrlgnza6mw9vy0knhmf7ji9b95n"; }) 18 17 (fetchNuGet { pname = "Superpower"; version = "3.0.0"; sha256 = "0p6riay4732j1fahc081dzgs9q4z3n2fpxrin4zfpj6q2226dhz4"; })
+2 -2
pkgs/by-name/di/discordchatexporter-cli/package.nix
··· 8 8 9 9 buildDotnetModule rec { 10 10 pname = "discordchatexporter-cli"; 11 - version = "2.43"; 11 + version = "2.43.1"; 12 12 13 13 src = fetchFromGitHub { 14 14 owner = "tyrrrz"; 15 15 repo = "discordchatexporter"; 16 16 rev = version; 17 - hash = "sha256-FbZ2Kt5lKTINpj0EsJGXWY1aK0qitks16GClBWa/iQ4="; 17 + hash = "sha256-MLOWZJehajB002SqBW2HJTjr00eU9RV+Weu3rmgoEew="; 18 18 }; 19 19 20 20 projectFile = "DiscordChatExporter.Cli/DiscordChatExporter.Cli.csproj";
+3 -3
pkgs/by-name/ho/home-manager/package.nix
··· 16 16 17 17 stdenvNoCC.mkDerivation (finalAttrs: { 18 18 pname = "home-manager"; 19 - version = "0-unstable-2024-05-12"; 19 + version = "0-unstable-2024-05-17"; 20 20 21 21 src = fetchFromGitHub { 22 22 name = "home-manager-source"; 23 23 owner = "nix-community"; 24 24 repo = "home-manager"; 25 - rev = "44677a1c96810a8e8c4ffaeaad10c842402647c1"; 26 - hash = "sha256-4pRuzsHZOW5W4CsXI9uhKtiJeQSUoe1d2M9mWU98HC4="; 25 + rev = "e3ad5108f54177e6520535768ddbf1e6af54b59d"; 26 + hash = "sha256-W9pyM3/vePxrffHtzlJI6lDS3seANQ+Nqp+i58O46LI="; 27 27 }; 28 28 29 29 nativeBuildInputs = [
+2 -2
pkgs/by-name/op/openvas-scanner/package.nix
··· 31 31 32 32 stdenv.mkDerivation rec { 33 33 pname = "openvas-scanner"; 34 - version = "23.2.1"; 34 + version = "23.3.0"; 35 35 36 36 src = fetchFromGitHub { 37 37 owner = "greenbone"; 38 38 repo = "openvas-scanner"; 39 39 rev = "refs/tags/v${version}"; 40 - hash = "sha256-fP21F9SGT20sGPsQI5BxwQUCgZdLCBt+fsXutZu463k="; 40 + hash = "sha256-CkwDhHPdTbXNrqY/obg1rOtGB1HC+fUwZ5+5d82vlV4="; 41 41 }; 42 42 43 43 nativeBuildInputs = [
+2 -2
pkgs/development/python-modules/mailchecker/default.nix
··· 8 8 9 9 buildPythonPackage rec { 10 10 pname = "mailchecker"; 11 - version = "6.0.4"; 11 + version = "6.0.5"; 12 12 pyproject = true; 13 13 14 14 disabled = pythonOlder "3.7"; 15 15 16 16 src = fetchPypi { 17 17 inherit pname version; 18 - hash = "sha256-XtZOk3KgIzu9vwI0HnoklGQVZ42KVOPQBXxJ1fpfJjA="; 18 + hash = "sha256-jdcewXJO8I83zvAKb4UbKmuQC4SUbtS5H+RmFDTNwcI="; 19 19 }; 20 20 21 21 build-system = [ setuptools ];
+3 -3
pkgs/servers/home-assistant/custom-lovelace-modules/android-tv-card/default.nix
··· 5 5 6 6 buildNpmPackage rec { 7 7 pname = "android-tv-card"; 8 - version = "3.7.0"; 8 + version = "3.7.1"; 9 9 10 10 src = fetchFromGitHub { 11 11 owner = "Nerwyn"; 12 12 repo = "android-tv-card"; 13 13 rev = version; 14 - hash = "sha256-6SwSoFeGS3kzk4jz+vSVb8ENMcSFxaunyTzuPe1kHBI="; 14 + hash = "sha256-+g93NybZreixpXylVqWQvjP0l9Z1x5JbEMC0RDpscBE="; 15 15 }; 16 16 17 17 patches = [ ./dont-call-git.patch ]; 18 18 19 - npmDepsHash = "sha256-QO3IAd7RC8VBa2YjQVn4HUm64mQL86OuAhjJO0Oo94M="; 19 + npmDepsHash = "sha256-oKIDL8BPalkIqtvA68D1YFINgg8qJ2C1KTuAr1IhJjE="; 20 20 21 21 installPhase = '' 22 22 runHook preInstall
+8 -11
pkgs/tools/archivers/7zz/default.nix
··· 11 11 , enableUnfree ? false 12 12 13 13 # For tests 14 - , _7zz 15 14 , testers 16 15 }: 17 16 ··· 26 25 in 27 26 stdenv.mkDerivation (finalAttrs: { 28 27 pname = "7zz"; 29 - version = "23.01"; 28 + version = "24.05"; 30 29 31 30 src = fetchurl { 32 31 url = "https://7-zip.org/a/7z${lib.replaceStrings [ "." ] [ "" ] finalAttrs.version}-src.tar.xz"; 33 32 hash = { 34 - free = "sha256-F1ybQsyReF2NBR/3eMZySvxVEntpwq2VUlRCHp/5nZs="; 35 - unfree = "sha256-NWBxAHNg5aGCTZkEmT6LJIC1G1cOjJ+vfA9Y6+S/n3Q="; 33 + free = "sha256-yYq3IEV2GeDWwW6KrdpgK2/QOsmDcBpIZvbk6VKZETY="; 34 + unfree = "sha256-Y/NBz4C40ofG6UVRmz2g+nVVPIVXKkcbf6bmj5qQt5A="; 36 35 }.${if enableUnfree then "unfree" else "free"}; 37 36 downloadToTemp = (!enableUnfree); 38 37 # remove the unRAR related code from the src drv ··· 55 54 56 55 patches = [ 57 56 ./fix-cross-mingw-build.patch 58 - # remove unneeded semicolons related to -Wextra-semi-stmt, caused by upstream 59 - ./fix-empty-expr-stmt.patch 60 57 ]; 61 58 62 59 postPatch = lib.optionalString stdenv.hostPlatform.isMinGW '' ··· 117 114 passthru = { 118 115 updateScript = ./update.sh; 119 116 tests.version = testers.testVersion { 120 - package = _7zz; 117 + package = finalAttrs.finalPackage; 121 118 command = "7zz --help"; 122 119 }; 123 120 }; 124 121 125 - meta = with lib; { 122 + meta = { 126 123 description = "Command line archiver utility"; 127 124 homepage = "https://7-zip.org"; 128 - license = with licenses; 125 + license = with lib.licenses; 129 126 # 7zip code is largely lgpl2Plus 130 127 # CPP/7zip/Compress/LzfseDecoder.cpp is bsd3 131 128 [ lgpl2Plus /* and */ bsd3 ] ++ 132 129 # and CPP/7zip/Compress/Rar* are unfree with the unRAR license restriction 133 130 # the unRAR compression code is disabled by default 134 131 lib.optionals enableUnfree [ unfree ]; 135 - maintainers = with maintainers; [ anna328p eclairevoyant jk peterhoeg ]; 136 - platforms = platforms.unix ++ platforms.windows; 132 + maintainers = with lib.maintainers; [ anna328p eclairevoyant jk peterhoeg ]; 133 + platforms = with lib.platforms; unix ++ windows; 137 134 mainProgram = "7zz"; 138 135 }; 139 136 })
+60 -32
pkgs/tools/archivers/7zz/fix-cross-mingw-build.patch
··· 1 - --- a/C/7zVersion.rc 2 - +++ b/C/7zVersion.rc 3 - @@ -5,7 +5,7 @@ 4 - #define MY_VFT_APP 0x00000001L 5 - #define MY_VFT_DLL 0x00000002L 6 - 7 - -// #include <WinVer.h> 8 - +// #include <winver.h> 9 - 10 - #ifndef MY_VERSION 11 - #include "7zVersion.h" 12 1 --- a/C/7zip_gcc_c.mak 13 2 +++ b/C/7zip_gcc_c.mak 14 3 @@ -106,7 +106,7 @@ ··· 20 9 21 10 CFLAGS_EXTRA = -DUNICODE -D_UNICODE 22 11 # -Wno-delete-non-virtual-dtor 23 - --- a/CPP/7zip/7zip_gcc.mak 24 - +++ b/CPP/7zip/7zip_gcc.mak 25 - @@ -124,8 +124,8 @@ 26 - DEL_OBJ_EXE = -$(RM) $(O)\*.o $(O)\$(PROG).exe $(O)\$(PROG).dll 27 - endif 12 + --- a/C/7zVersion.rc 13 + +++ b/C/7zVersion.rc 14 + @@ -5,7 +5,7 @@ 15 + #define MY_VFT_APP 0x00000001L 16 + #define MY_VFT_DLL 0x00000002L 28 17 29 - -LIB2_GUI = -lOle32 -lGdi32 -lComctl32 -lComdlg32 -lShell32 $(LIB_HTMLHELP) 30 - -LIB2 = -loleaut32 -luuid -ladvapi32 -lUser32 $(LIB2_GUI) 31 - +LIB2_GUI = -lole32 -lgdi32 -lcomctl32 -lcomdlg32 -lshell32 $(LIB_HTMLHELP) 32 - +LIB2 = -loleaut32 -luuid -ladvapi32 -luser32 $(LIB2_GUI) 18 + -// #include <WinVer.h> 19 + +// #include <winver.h> 33 20 34 - CXXFLAGS_EXTRA = -DUNICODE -D_UNICODE 35 - # -Wno-delete-non-virtual-dtor 21 + #ifndef MY_VERSION 22 + #include "7zVersion.h" 36 23 --- a/C/Util/7zipInstall/resource.rc 37 24 +++ b/C/Util/7zipInstall/resource.rc 38 - @@ -1,6 +1,6 @@ 39 - #include <winnt.h> 40 - #include <WinUser.h> 25 + @@ -1,7 +1,7 @@ 26 + #include <windows.h> 27 + // #include <winnt.h> 28 + // #include <WinUser.h> 41 29 -#include <CommCtrl.h> 42 30 +#include <commctrl.h> 43 31 44 32 #define USE_COPYRIGHT_CR 45 33 #include "../../7zVersion.rc" 34 + --- a/C/Util/7zipInstall/resource.rc.rej 35 + +++ b/C/Util/7zipInstall/resource.rc.rej 36 + @@ -0,0 +1,10 @@ 37 + +--- C/Util/7zipInstall/resource.rc 38 + ++++ C/Util/7zipInstall/resource.rc 39 + +@@ -1,6 +1,6 @@ 40 + + #include <winnt.h> 41 + + #include <WinUser.h> 42 + +-#include <CommCtrl.h> 43 + ++#include <commctrl.h> 44 + + 45 + + #define USE_COPYRIGHT_CR 46 + + #include "../../7zVersion.rc" 46 47 --- a/C/Util/7zipUninstall/resource.rc 47 48 +++ b/C/Util/7zipUninstall/resource.rc 48 - @@ -1,6 +1,6 @@ 49 - #include <winnt.h> 50 - #include <WinUser.h> 49 + @@ -1,7 +1,7 @@ 50 + #include <windows.h> 51 + // #include <winnt.h> 52 + // #include <WinUser.h> 51 53 -#include <CommCtrl.h> 52 54 +#include <commctrl.h> 53 55 54 56 #define USE_COPYRIGHT_CR 55 57 #include "../../7zVersion.rc" 58 + --- a/C/Util/7zipUninstall/resource.rc.rej 59 + +++ b/C/Util/7zipUninstall/resource.rc.rej 60 + @@ -0,0 +1,10 @@ 61 + +--- C/Util/7zipUninstall/resource.rc 62 + ++++ C/Util/7zipUninstall/resource.rc 63 + +@@ -1,6 +1,6 @@ 64 + + #include <winnt.h> 65 + + #include <WinUser.h> 66 + +-#include <CommCtrl.h> 67 + ++#include <commctrl.h> 68 + + 69 + + #define USE_COPYRIGHT_CR 70 + + #include "../../7zVersion.rc" 71 + --- a/CPP/7zip/7zip_gcc.mak 72 + +++ b/CPP/7zip/7zip_gcc.mak 73 + @@ -142,8 +142,8 @@ 74 + DEL_OBJ_EXE = -$(RM) $(O)\*.o $(O)\$(PROG).exe $(O)\$(PROG).dll 75 + endif 76 + 77 + -LIB2_GUI = -lOle32 -lGdi32 -lComctl32 -lComdlg32 -lShell32 $(LIB_HTMLHELP) 78 + -LIB2 = -loleaut32 -luuid -ladvapi32 -lUser32 $(LIB2_GUI) 79 + +LIB2_GUI = -lole32 -lgdi32 -lcomctl32 -lcomdlg32 -lshell32 $(LIB_HTMLHELP) 80 + +LIB2 = -loleaut32 -luuid -ladvapi32 -luser32 $(LIB2_GUI) 81 + 82 + # v24.00: -DUNICODE and -D_UNICODE are defined in precompilation header files 83 + # CXXFLAGS_EXTRA = -DUNICODE -D_UNICODE 56 84 --- a/CPP/7zip/Crypto/RandGen.cpp 57 85 +++ b/CPP/7zip/Crypto/RandGen.cpp 58 86 @@ -19,7 +19,7 @@ ··· 111 139 --- a/CPP/Windows/Control/ImageList.h 112 140 +++ b/CPP/Windows/Control/ImageList.h 113 141 @@ -3,7 +3,7 @@ 114 - #ifndef __WINDOWS_CONTROL_IMAGE_LIST_H 115 - #define __WINDOWS_CONTROL_IMAGE_LIST_H 142 + #ifndef ZIP7_INC_WINDOWS_CONTROL_IMAGE_LIST_H 143 + #define ZIP7_INC_WINDOWS_CONTROL_IMAGE_LIST_H 116 144 117 145 -#include <CommCtrl.h> 118 146 +#include <commctrl.h> ··· 144 172 --- a/CPP/Windows/SecurityUtils.h 145 173 +++ b/CPP/Windows/SecurityUtils.h 146 174 @@ -3,7 +3,7 @@ 147 - #ifndef __WINDOWS_SECURITY_UTILS_H 148 - #define __WINDOWS_SECURITY_UTILS_H 175 + #ifndef ZIP7_INC_WINDOWS_SECURITY_UTILS_H 176 + #define ZIP7_INC_WINDOWS_SECURITY_UTILS_H 149 177 150 178 -#include <NTSecAPI.h> 151 179 +#include <ntsecapi.h>
-184
pkgs/tools/archivers/7zz/fix-empty-expr-stmt.patch
··· 1 - diff -Naur a/C/7zCrc.c b/C/7zCrc.c 2 - --- a/C/7zCrc.c 3 - +++ b/C/7zCrc.c 4 - @@ -174,7 +174,7 @@ 5 - UInt32 Z7_FASTCALL CrcUpdateT0_32(UInt32 v, const void *data, size_t size, const UInt32 *table) 6 - { 7 - const Byte *p = (const Byte *)data; 8 - - UNUSED_VAR(table); 9 - + UNUSED_VAR(table) 10 - 11 - for (; size != 0 && ((unsigned)(ptrdiff_t)p & (T0_32_UNROLL_BYTES - 1)) != 0; size--) 12 - v = __crc32b(v, *p++); 13 - @@ -206,7 +206,7 @@ 14 - UInt32 Z7_FASTCALL CrcUpdateT0_64(UInt32 v, const void *data, size_t size, const UInt32 *table) 15 - { 16 - const Byte *p = (const Byte *)data; 17 - - UNUSED_VAR(table); 18 - + UNUSED_VAR(table) 19 - 20 - for (; size != 0 && ((unsigned)(ptrdiff_t)p & (T0_64_UNROLL_BYTES - 1)) != 0; size--) 21 - v = __crc32b(v, *p++); 22 - diff -Naur a/C/AesOpt.c b/C/AesOpt.c 23 - --- a/C/AesOpt.c 24 - +++ b/C/AesOpt.c 25 - @@ -639,7 +639,7 @@ 26 - const v128 k_z0 = w[2]; 27 - for (; numBlocks != 0; numBlocks--, data++) 28 - { 29 - - MM_XOR_m (*data); 30 - + MM_XOR_m (*data) 31 - AES_E_MC_m (k0) 32 - AES_E_MC_m (k1) 33 - AES_E_MC_m (k2) 34 - @@ -660,7 +660,7 @@ 35 - } 36 - } 37 - AES_E_m (k_z1) 38 - - MM_XOR_m (k_z0); 39 - + MM_XOR_m (k_z0) 40 - *data = m; 41 - } 42 - *p = m; 43 - @@ -745,7 +745,7 @@ 44 - while (w != p); 45 - WOP_KEY (AES_D, 1) 46 - WOP_KEY (AES_XOR, 0) 47 - - MM_XOR (m0, iv); 48 - + MM_XOR (m0, iv) 49 - WOP_M1 (XOR_data_M1) 50 - iv = data[NUM_WAYS - 1]; 51 - WOP (STORE_data) 52 - @@ -759,14 +759,14 @@ 53 - AES_D_IMC_m (w[2]) 54 - do 55 - { 56 - - AES_D_IMC_m (w[1]); 57 - - AES_D_IMC_m (w[0]); 58 - + AES_D_IMC_m (w[1]) 59 - + AES_D_IMC_m (w[0]) 60 - w -= 2; 61 - } 62 - while (w != p); 63 - - AES_D_m (w[1]); 64 - - MM_XOR_m (w[0]); 65 - - MM_XOR_m (iv); 66 - + AES_D_m (w[1]) 67 - + MM_XOR_m (w[0]) 68 - + MM_XOR_m (iv) 69 - iv = *data; 70 - *data = m; 71 - } 72 - @@ -809,11 +809,11 @@ 73 - { 74 - const v128 *w = p; 75 - v128 m; 76 - - CTR_START (m, 0); 77 - + CTR_START (m, 0) 78 - do 79 - { 80 - - AES_E_MC_m (w[0]); 81 - - AES_E_MC_m (w[1]); 82 - + AES_E_MC_m (w[0]) 83 - + AES_E_MC_m (w[1]) 84 - w += 2; 85 - } 86 - while (w != wEnd); 87 - diff -Naur a/C/LzmaEnc.c b/C/LzmaEnc.c 88 - --- a/C/LzmaEnc.c 89 - +++ b/C/LzmaEnc.c 90 - @@ -195,11 +195,11 @@ 91 - unsigned GetPosSlot1(UInt32 pos) 92 - { 93 - unsigned res; 94 - - BSR2_RET(pos, res); 95 - + BSR2_RET(pos, res) 96 - return res; 97 - } 98 - -#define GetPosSlot2(pos, res) { BSR2_RET(pos, res); } 99 - -#define GetPosSlot(pos, res) { if (pos < 2) res = pos; else BSR2_RET(pos, res); } 100 - +#define GetPosSlot2(pos, res) { BSR2_RET(pos, res) } 101 - +#define GetPosSlot(pos, res) { if (pos < 2) res = pos; else BSR2_RET(pos, res) } 102 - 103 - 104 - #else // ! LZMA_LOG_BSR 105 - diff -Naur a/C/Sha1Opt.c b/C/Sha1Opt.c 106 - --- a/C/Sha1Opt.c 107 - +++ b/C/Sha1Opt.c 108 - @@ -300,26 +300,26 @@ 109 - LOAD_SHUFFLE (m2, 2) 110 - LOAD_SHUFFLE (m3, 3) 111 - 112 - - T(m0, c0); H(e1); C(e0); 113 - - T(m1, c0); SU0(m0, m1, m2); H(e0); C(e1); 114 - - T(m2, c0); SU0(m1, m2, m3); SU1(m0, m3); H(e1); C(e0); 115 - - T(m3, c0); SU0(m2, m3, m0); SU1(m1, m0); H(e0); C(e1); 116 - - T(m0, c0); SU0(m3, m0, m1); SU1(m2, m1); H(e1); C(e0); 117 - - T(m1, c1); SU0(m0, m1, m2); SU1(m3, m2); H(e0); P(e1); 118 - - T(m2, c1); SU0(m1, m2, m3); SU1(m0, m3); H(e1); P(e0); 119 - - T(m3, c1); SU0(m2, m3, m0); SU1(m1, m0); H(e0); P(e1); 120 - - T(m0, c1); SU0(m3, m0, m1); SU1(m2, m1); H(e1); P(e0); 121 - - T(m1, c1); SU0(m0, m1, m2); SU1(m3, m2); H(e0); P(e1); 122 - - T(m2, c2); SU0(m1, m2, m3); SU1(m0, m3); H(e1); M(e0); 123 - - T(m3, c2); SU0(m2, m3, m0); SU1(m1, m0); H(e0); M(e1); 124 - - T(m0, c2); SU0(m3, m0, m1); SU1(m2, m1); H(e1); M(e0); 125 - - T(m1, c2); SU0(m0, m1, m2); SU1(m3, m2); H(e0); M(e1); 126 - - T(m2, c2); SU0(m1, m2, m3); SU1(m0, m3); H(e1); M(e0); 127 - - T(m3, c3); SU0(m2, m3, m0); SU1(m1, m0); H(e0); P(e1); 128 - - T(m0, c3); SU0(m3, m0, m1); SU1(m2, m1); H(e1); P(e0); 129 - - T(m1, c3); SU1(m3, m2); H(e0); P(e1); 130 - - T(m2, c3); H(e1); P(e0); 131 - - T(m3, c3); H(e0); P(e1); 132 - + T(m0, c0); H(e1); C(e0) 133 - + T(m1, c0); SU0(m0, m1, m2) H(e0); C(e1) 134 - + T(m2, c0); SU0(m1, m2, m3) SU1(m0, m3) H(e1); C(e0) 135 - + T(m3, c0); SU0(m2, m3, m0) SU1(m1, m0) H(e0); C(e1) 136 - + T(m0, c0); SU0(m3, m0, m1) SU1(m2, m1) H(e1); C(e0) 137 - + T(m1, c1); SU0(m0, m1, m2) SU1(m3, m2) H(e0); P(e1) 138 - + T(m2, c1); SU0(m1, m2, m3) SU1(m0, m3) H(e1); P(e0) 139 - + T(m3, c1); SU0(m2, m3, m0) SU1(m1, m0) H(e0); P(e1) 140 - + T(m0, c1); SU0(m3, m0, m1) SU1(m2, m1) H(e1); P(e0) 141 - + T(m1, c1); SU0(m0, m1, m2) SU1(m3, m2) H(e0); P(e1) 142 - + T(m2, c2); SU0(m1, m2, m3) SU1(m0, m3) H(e1); M(e0) 143 - + T(m3, c2); SU0(m2, m3, m0) SU1(m1, m0) H(e0); M(e1) 144 - + T(m0, c2); SU0(m3, m0, m1) SU1(m2, m1) H(e1); M(e0) 145 - + T(m1, c2); SU0(m0, m1, m2) SU1(m3, m2) H(e0); M(e1) 146 - + T(m2, c2); SU0(m1, m2, m3) SU1(m0, m3) H(e1); M(e0) 147 - + T(m3, c3); SU0(m2, m3, m0) SU1(m1, m0) H(e0); P(e1) 148 - + T(m0, c3); SU0(m3, m0, m1) SU1(m2, m1) H(e1); P(e0) 149 - + T(m1, c3); SU1(m3, m2) H(e0); P(e1) 150 - + T(m2, c3); H(e1); P(e0) 151 - + T(m3, c3); H(e0); P(e1) 152 - 153 - abcd = vaddq_u32(abcd, abcd_save); 154 - e0 += e0_save; 155 - diff -Naur a/C/Sha256Opt.c b/C/Sha256Opt.c 156 - --- a/C/Sha256Opt.c 157 - +++ b/C/Sha256Opt.c 158 - @@ -316,10 +316,10 @@ 159 - LOAD_SHUFFLE (m2, 2) 160 - LOAD_SHUFFLE (m3, 3) 161 - 162 - - R16 ( 0, NNN, NNN, SM1, NNN, SM1, SM2, SM1, SM2 ); 163 - - R16 ( 1, SM1, SM2, SM1, SM2, SM1, SM2, SM1, SM2 ); 164 - - R16 ( 2, SM1, SM2, SM1, SM2, SM1, SM2, SM1, SM2 ); 165 - - R16 ( 3, SM1, SM2, NNN, SM2, NNN, NNN, NNN, NNN ); 166 - + R16 ( 0, NNN, NNN, SM1, NNN, SM1, SM2, SM1, SM2 ) 167 - + R16 ( 1, SM1, SM2, SM1, SM2, SM1, SM2, SM1, SM2 ) 168 - + R16 ( 2, SM1, SM2, SM1, SM2, SM1, SM2, SM1, SM2 ) 169 - + R16 ( 3, SM1, SM2, NNN, SM2, NNN, NNN, NNN, NNN ) 170 - 171 - state0 = vaddq_u32(state0, state0_save); 172 - state1 = vaddq_u32(state1, state1_save); 173 - diff -Naur a/CPP/Windows/System.h b/CPP/Windows/System.h 174 - --- a/CPP/Windows/System.h 175 - +++ b/CPP/Windows/System.h 176 - @@ -105,7 +105,7 @@ 177 - } 178 - 179 - void CpuZero() { } 180 - - void CpuSet(unsigned cpuIndex) { UNUSED_VAR(cpuIndex); } 181 - + void CpuSet(unsigned cpuIndex) { UNUSED_VAR(cpuIndex) } 182 - int IsCpuSet(unsigned cpuIndex) const { return (cpuIndex < numSysThreads) ? 1 : 0; } 183 - 184 - BOOL SetProcAffinity() const
+6 -7
pkgs/tools/archivers/7zz/update.sh
··· 1 1 #! /usr/bin/env nix-shell 2 - #! nix-shell -i bash -p coreutils gnused curl jq nix-prefetch 2 + #! nix-shell -i bash -p curl xq-xml nix-prefetch 3 3 set -euo pipefail 4 4 cd "$(dirname "${BASH_SOURCE[0]}")" 5 5 6 6 DRV_DIR="$PWD" 7 7 8 8 OLD_VERSION="$(sed -nE 's/\s*version = "(.*)".*/\1/p' ./default.nix)" 9 - # The best_release.json is not always up-to-date 10 - # In those cases you can force the version by calling `./update.sh <newer_version>` 11 - NEW_VERSION="${1:-$(curl -H "Accept: application/json" 'https://sourceforge.net/projects/sevenzip/best_release.json' | jq '.platform_releases.linux.filename' -r | cut -d/ -f3)}" 9 + NEW_VERSION="$(curl -H 'Accept: application/rss+xml' 'https://sourceforge.net/projects/sevenzip/rss?path=/7-Zip' | xq -x "substring((/rss/channel/item[link[contains(., 'src.tar.xz')]])[1]/title, 8, 5)")" 12 10 13 11 echo "comparing versions $OLD_VERSION => $NEW_VERSION" 14 12 if [[ "$OLD_VERSION" == "$NEW_VERSION" ]]; then ··· 26 24 NEW_VERSION_FORMATTED="$(echo "$NEW_VERSION" | tr -d '.')" 27 25 URL="https://7-zip.org/a/7z${NEW_VERSION_FORMATTED}-src.tar.xz" 28 26 27 + # `nix-prefetch` is broken without flakes 28 + # see https://github.com/msteen/nix-prefetch/issues/51 29 + NEW_FREE_HASH=$(nix-prefetch -f "$NIXPKGS_ROOT" -E "_7zz.src" --url "$URL" --option extra-experimental-features flakes) 29 30 30 - NEW_FREE_HASH=$(nix-prefetch -f "$NIXPKGS_ROOT" -E "_7zz.src" --url "$URL") 31 - 32 - NEW_UNFREE_OUT=$(nix-prefetch -f "$NIXPKGS_ROOT" -E "(_7zz.override { enableUnfree = true; }).src" --url "$URL" --output raw --print-path) 31 + NEW_UNFREE_OUT=$(nix-prefetch -f "$NIXPKGS_ROOT" -E "(_7zz.override { enableUnfree = true; }).src" --url "$URL" --output raw --print-path --option extra-experimental-features flakes) 33 32 # first line of raw output is the hash 34 33 NEW_UNFREE_HASH="$(echo "$NEW_UNFREE_OUT" | sed -n 1p)" 35 34 # second line of raw output is the src path
+15
pkgs/tools/security/ghidra/0002-Load-nix-extensions.patch
··· 1 + diff --git a/Ghidra/Framework/Utility/src/main/java/utility/application/ApplicationUtilities.java b/Ghidra/Framework/Utility/src/main/java/utility/application/ApplicationUtilities.java 2 + index ea12a661f0..da7779b07f 100644 3 + --- a/Ghidra/Framework/Utility/src/main/java/utility/application/ApplicationUtilities.java 4 + +++ b/Ghidra/Framework/Utility/src/main/java/utility/application/ApplicationUtilities.java 5 + @@ -36,6 +36,10 @@ public class ApplicationUtilities { 6 + */ 7 + public static Collection<ResourceFile> findDefaultApplicationRootDirs() { 8 + Collection<ResourceFile> applicationRootDirs = new ArrayList<>(); 9 + + String nixGhidraHome = System.getenv("NIX_GHIDRAHOME"); 10 + + if (nixGhidraHome != null) { 11 + + applicationRootDirs.add(new ResourceFile(nixGhidraHome)); 12 + + }; 13 + ResourceFile applicationRootDir = findPrimaryApplicationRootDir(); 14 + if (applicationRootDir != null) { 15 + applicationRootDirs.add(applicationRootDir);
+26
pkgs/tools/security/ghidra/0003-Remove-build-datestamp.patch
··· 1 + diff --git a/Ghidra/RuntimeScripts/Common/support/buildExtension.gradle b/Ghidra/RuntimeScripts/Common/support/buildExtension.gradle 2 + index bc194f219..94b00fabd 100644 3 + --- a/Ghidra/RuntimeScripts/Common/support/buildExtension.gradle 4 + +++ b/Ghidra/RuntimeScripts/Common/support/buildExtension.gradle 5 + @@ -82,7 +82,7 @@ dependencies { 6 + helpPath fileTree(dir: ghidraDir + '/Features/Base', include: "**/Base.jar") 7 + } 8 + 9 + -def ZIP_NAME_PREFIX = "${DISTRO_PREFIX}_${RELEASE_NAME}_${getCurrentDate()}" 10 + +def ZIP_NAME_PREFIX = "${DISTRO_PREFIX}_${RELEASE_NAME}" 11 + def DISTRIBUTION_DIR = file("dist") 12 + 13 + def pathInZip = "${project.name}" 14 + diff --git a/gradle/root/distribution.gradle b/gradle/root/distribution.gradle 15 + index f44c8267b..f6231c417 100644 16 + --- a/gradle/root/distribution.gradle 17 + +++ b/gradle/root/distribution.gradle 18 + @@ -32,7 +32,7 @@ apply from: "$rootProject.projectDir/gradle/support/sbom.gradle" 19 + def currentPlatform = getCurrentPlatformName() 20 + def PROJECT_DIR = file (rootProject.projectDir.absolutePath) 21 + ext.DISTRIBUTION_DIR = file("$buildDir/dist") 22 + -ext.ZIP_NAME_PREFIX = "${rootProject.DISTRO_PREFIX}_${rootProject.BUILD_DATE_SHORT}" 23 + +ext.ZIP_NAME_PREFIX = "${rootProject.DISTRO_PREFIX}" 24 + ext.ZIP_DIR_PREFIX = "${rootProject.DISTRO_PREFIX}" 25 + ext.ALL_REPOS = [rootProject.file('.').getName()] 26 +
+78
pkgs/tools/security/ghidra/build-extension.nix
··· 1 + { lib 2 + , stdenv 3 + , unzip 4 + , jdk 5 + , gradle 6 + , ghidra 7 + }: 8 + 9 + let 10 + metaCommon = oldMeta: 11 + oldMeta // (with lib; { 12 + maintainers = (oldMeta.maintainers or []) ++ (with maintainers; [ vringar ]); 13 + platforms = oldMeta.platforms or ghidra.meta.platforms; 14 + }); 15 + 16 + buildGhidraExtension = { 17 + pname, nativeBuildInputs ? [], meta ? { }, ... 18 + }@args: 19 + stdenv.mkDerivation (args // { 20 + nativeBuildInputs = nativeBuildInputs ++ [ 21 + unzip 22 + jdk 23 + gradle 24 + ]; 25 + 26 + buildPhase = args.buildPhase or '' 27 + runHook preBuild 28 + 29 + # Set project name, otherwise defaults to directory name 30 + echo -e '\nrootProject.name = "${pname}"' >> settings.gradle 31 + 32 + export GRADLE_USER_HOME=$(mktemp -d) 33 + gradle \ 34 + --offline \ 35 + --no-daemon \ 36 + -PGHIDRA_INSTALL_DIR=${ghidra}/lib/ghidra 37 + 38 + runHook postBuild 39 + ''; 40 + 41 + installPhase = args.installPhase or '' 42 + runHook preInstall 43 + 44 + mkdir -p $out/lib/ghidra/Ghidra/Extensions 45 + unzip -d $out/lib/ghidra/Ghidra/Extensions dist/*.zip 46 + 47 + runHook postInstall 48 + ''; 49 + 50 + meta = metaCommon meta; 51 + }); 52 + 53 + buildGhidraScripts = { pname, meta ? { }, ... }@args: 54 + stdenv.mkDerivation (args // { 55 + installPhase = '' 56 + runHook preInstall 57 + 58 + GHIDRA_HOME=$out/lib/ghidra/Ghidra/Extensions/${pname} 59 + mkdir -p $GHIDRA_HOME 60 + cp -r . $GHIDRA_HOME/ghidra_scripts 61 + 62 + touch $GHIDRA_HOME/Module.manifest 63 + cat <<'EOF' > extension.properties 64 + name=${pname} 65 + description=${meta.description or ""} 66 + author= 67 + createdOn= 68 + version=${lib.getVersion ghidra} 69 + 70 + EOF 71 + 72 + runHook postInstall 73 + ''; 74 + 75 + meta = metaCommon meta; 76 + }); 77 + in 78 + { inherit buildGhidraExtension buildGhidraScripts; }
+61 -11
pkgs/tools/security/ghidra/build.nix
··· 1 1 { stdenv 2 2 , fetchFromGitHub 3 3 , lib 4 + , callPackage 4 5 , gradle_7 5 6 , perl 6 7 , makeWrapper ··· 10 11 , icoutils 11 12 , xcbuild 12 13 , protobuf 14 + , ghidra-extensions 13 15 }: 14 16 15 17 let ··· 17 19 pname = "ghidra"; 18 20 version = "11.0.3"; 19 21 22 + releaseName = "NIX"; 23 + distroPrefix = "ghidra_${version}_${releaseName}"; 20 24 src = fetchFromGitHub { 21 25 owner = "NationalSecurityAgency"; 22 26 repo = "Ghidra"; 23 27 rev = "Ghidra_${version}_build"; 24 - hash = "sha256-Id595aKYHP1R3Zw9sV1oL32nAUAr7D/K4wn6Zs7q3Jo="; 28 + hash = "sha256-IiLxaJvfJcK275FDZEsUCGp7haJjp8O2fUIoM4F9H30="; 29 + # populate values that require us to use git. By doing this in postFetch we 30 + # can delete .git afterwards and maintain better reproducibility of the src. 31 + leaveDotGit = true; 32 + postFetch = '' 33 + cd "$out" 34 + git rev-parse HEAD > $out/COMMIT 35 + # 1970-Jan-01 36 + date -u -d "@$(git log -1 --pretty=%ct)" "+%Y-%b-%d" > $out/SOURCE_DATE_EPOCH 37 + # 19700101 38 + date -u -d "@$(git log -1 --pretty=%ct)" "+%Y%m%d" > $out/SOURCE_DATE_EPOCH_SHORT 39 + find "$out" -name .git -print0 | xargs -0 rm -rf 40 + ''; 25 41 }; 26 42 27 43 gradle = gradle_7; 28 44 45 + patches = [ 46 + # Use our own protoc binary instead of the prebuilt one 47 + ./0001-Use-protobuf-gradle-plugin.patch 48 + 49 + # Override installation directory to allow loading extensions 50 + ./0002-Load-nix-extensions.patch 51 + 52 + # Remove build dates from output filenames for easier reference 53 + ./0003-Remove-build-datestamp.patch 54 + ]; 55 + 29 56 desktopItem = makeDesktopItem { 30 57 name = "ghidra"; 31 58 exec = "ghidra"; ··· 35 62 categories = [ "Development" ]; 36 63 }; 37 64 38 - # postPatch scripts. 65 + postPatch = '' 66 + # Set name of release (eg. PUBLIC, DEV, etc.) 67 + sed -i -e 's/application\.release\.name=.*/application.release.name=${releaseName}/' Ghidra/application.properties 68 + 69 + # Set build date and git revision 70 + echo "application.build.date=$(cat SOURCE_DATE_EPOCH)" >> Ghidra/application.properties 71 + echo "application.build.date.short=$(cat SOURCE_DATE_EPOCH_SHORT)" >> Ghidra/application.properties 72 + echo "application.revision.ghidra=$(cat COMMIT)" >> Ghidra/application.properties 73 + 74 + # Tells ghidra to use our own protoc binary instead of the prebuilt one. 75 + cat >>Ghidra/Debug/Debugger-gadp/build.gradle <<HERE 76 + protobuf { 77 + protoc { 78 + path = '${protobuf}/bin/protoc' 79 + } 80 + } 81 + HERE 82 + ''; 83 + 39 84 # Adds a gradle step that downloads all the dependencies to the gradle cache. 40 85 addResolveStep = '' 41 86 cat >>build.gradle <<HERE ··· 64 109 # Taken from mindustry derivation. 65 110 deps = stdenv.mkDerivation { 66 111 pname = "${pname}-deps"; 67 - inherit version src; 112 + inherit version src patches; 68 113 69 - patches = [ ./0001-Use-protobuf-gradle-plugin.patch ]; 70 114 postPatch = addResolveStep; 71 115 72 116 nativeBuildInputs = [ gradle perl ] ++ lib.optional stdenv.isDarwin xcbuild; ··· 98 142 outputHash = "sha256-nKfJiGoZlDEpbCmYVKNZXz2PYIosCd4nPFdy3MfprHc="; 99 143 }; 100 144 101 - in stdenv.mkDerivation { 102 - inherit pname version src; 145 + in stdenv.mkDerivation (finalAttrs: { 146 + inherit pname version src patches postPatch; 103 147 104 148 nativeBuildInputs = [ 105 149 gradle unzip makeWrapper icoutils protobuf ··· 107 151 108 152 dontStrip = true; 109 153 110 - patches = [ 111 - ./0001-Use-protobuf-gradle-plugin.patch 112 - ]; 154 + __darwinAllowLocalNetworking = true; 113 155 114 156 buildPhase = '' 115 157 runHook preBuild ··· 152 194 mkdir -p "$out/bin" 153 195 ln -s "${pkg_path}/ghidraRun" "$out/bin/ghidra" 154 196 wrapProgram "${pkg_path}/support/launch.sh" \ 197 + --set-default NIX_GHIDRAHOME "${pkg_path}/Ghidra" \ 155 198 --prefix PATH : ${lib.makeBinPath [ openjdk17 ]} 156 199 ''; 157 200 201 + passthru = { 202 + inherit releaseName distroPrefix; 203 + inherit (ghidra-extensions.override { ghidra = finalAttrs.finalPackage; }) buildGhidraExtension buildGhidraScripts; 204 + 205 + withExtensions = callPackage ./with-extensions.nix { ghidra = finalAttrs.finalPackage; }; 206 + }; 207 + 158 208 meta = with lib; { 159 209 description = "A software reverse engineering (SRE) suite of tools developed by NSA's Research Directorate in support of the Cybersecurity mission"; 160 210 mainProgram = "ghidra"; ··· 165 215 binaryBytecode # deps 166 216 ]; 167 217 license = licenses.asl20; 168 - maintainers = with maintainers; [ roblabla ]; 218 + maintainers = with maintainers; [ roblabla vringar ]; 169 219 broken = stdenv.isDarwin && stdenv.isx86_64; 170 220 }; 171 221 172 - } 222 + })
+14
pkgs/tools/security/ghidra/extensions.nix
··· 1 + { lib, newScope, callPackage, ghidra }: 2 + 3 + lib.makeScope newScope (self: { 4 + inherit (callPackage ./build-extension.nix { inherit ghidra; }) buildGhidraExtension buildGhidraScripts; 5 + 6 + ghidraninja-ghidra-scripts = self.callPackage ./extensions/ghidraninja-ghidra-scripts { }; 7 + 8 + gnudisassembler = self.callPackage ./extensions/gnudisassembler { inherit ghidra; }; 9 + 10 + machinelearning = self.callPackage ./extensions/machinelearning { inherit ghidra; }; 11 + 12 + sleighdevtools = self.callPackage ./extensions/sleighdevtools { inherit ghidra; }; 13 + 14 + })
+36
pkgs/tools/security/ghidra/extensions/ghidraninja-ghidra-scripts/default.nix
··· 1 + { lib 2 + , fetchFromGitHub 3 + , buildGhidraScripts 4 + , binwalk 5 + , swift 6 + , yara 7 + }: 8 + 9 + buildGhidraScripts { 10 + pname = "ghidraninja-ghidra-scripts"; 11 + version = "unstable-2020-10-07"; 12 + 13 + src = fetchFromGitHub { 14 + owner = "ghidraninja"; 15 + repo = "ghidra_scripts"; 16 + rev = "99f2a8644a29479618f51e2d4e28f10ba5e9ac48"; 17 + sha256 = "aElx0mp66/OHQRfXwTkqdLL0gT2T/yL00bOobYleME8="; 18 + }; 19 + 20 + postPatch = '' 21 + # Replace subprocesses with store versions 22 + substituteInPlace binwalk.py --replace-fail 'subprocess.call(["binwalk"' 'subprocess.call(["${binwalk}/bin/binwalk"' 23 + substituteInPlace swift_demangler.py --replace-fail '"swift"' '"${swift}/bin/swift"' 24 + substituteInPlace yara.py --replace-fail 'subprocess.check_output(["yara"' 'subprocess.check_output(["${yara}/bin/yara"' 25 + substituteInPlace YaraSearch.py --replace-fail '"yara "' '"${yara}/bin/yara "' 26 + ''; 27 + 28 + meta = with lib; { 29 + description = "Scripts for the Ghidra software reverse engineering suite"; 30 + homepage = "https://github.com/ghidraninja/ghidra_scripts"; 31 + license = with licenses; [ 32 + gpl3Only 33 + gpl2Only 34 + ]; 35 + }; 36 + }
+71
pkgs/tools/security/ghidra/extensions/gnudisassembler/default.nix
··· 1 + { lib 2 + , stdenv 3 + , fetchurl 4 + , buildGhidraExtension 5 + , ghidra 6 + , flex 7 + , bison 8 + , texinfo 9 + , perl 10 + , zlib 11 + , xcbuild 12 + }: 13 + 14 + let 15 + # Incorporates source from binutils 16 + # https://github.com/NationalSecurityAgency/ghidra/blob/7ab9bf6abffb6938d61d072040fc34ad3331332b/GPL/GnuDisassembler/build.gradle#L34-L35 17 + binutils-version = "2.41"; 18 + binutils-src = fetchurl { 19 + url = "mirror://gnu/binutils/binutils-${binutils-version}.tar.bz2"; 20 + sha256 = "sha256-pMS+wFL3uDcAJOYDieGUN38/SLVmGEGOpRBn9nqqsws="; 21 + }; 22 + in 23 + buildGhidraExtension { 24 + pname = "gnudisassembler"; 25 + version = lib.getVersion ghidra; 26 + 27 + src = "${ghidra}/lib/ghidra/Extensions/Ghidra/${ghidra.distroPrefix}_GnuDisassembler.zip"; 28 + 29 + postPatch = '' 30 + ln -s ${binutils-src} binutils-${binutils-version}.tar.bz2 31 + ''; 32 + 33 + # Don't modify ELF stub resources 34 + dontPatchELF = true; 35 + dontStrip = true; 36 + 37 + __darwinAllowLocalNetworking = true; 38 + 39 + nativeBuildInputs = [ 40 + flex 41 + bison 42 + texinfo 43 + perl 44 + ] ++ lib.optionals stdenv.hostPlatform.isDarwin [ 45 + xcbuild 46 + ]; 47 + 48 + buildInputs = [ 49 + zlib 50 + ]; 51 + 52 + installPhase = '' 53 + runHook preInstall 54 + 55 + EXTENSIONS_ROOT=$out/lib/ghidra/Ghidra/Extensions 56 + mkdir -p $EXTENSIONS_ROOT 57 + unzip -d $EXTENSIONS_ROOT $src 58 + 59 + mkdir -p $EXTENSIONS_ROOT/GnuDisassembler/build 60 + cp -r build/os $EXTENSIONS_ROOT/GnuDisassembler/build/ 61 + 62 + runHook postInstall 63 + ''; 64 + 65 + meta = with lib; { 66 + description = "Leverage the binutils disassembler capabilities for various processors"; 67 + homepage = "https://ghidra-sre.org/"; 68 + downloadPage = "https://github.com/NationalSecurityAgency/ghidra/tree/master/GPL/GnuDisassembler"; 69 + license = licenses.gpl2Only; 70 + }; 71 + }
+34
pkgs/tools/security/ghidra/extensions/machinelearning/default.nix
··· 1 + { lib 2 + , buildGhidraExtension 3 + , ghidra 4 + }: 5 + 6 + buildGhidraExtension { 7 + pname = "machinelearning"; 8 + version = lib.getVersion ghidra; 9 + 10 + src = "${ghidra}/lib/ghidra/Extensions/Ghidra/${ghidra.distroPrefix}_MachineLearning.zip"; 11 + dontUnpack = true; 12 + 13 + # Built as part ghidra 14 + dontBuild = true; 15 + 16 + installPhase = '' 17 + runHook preInstall 18 + 19 + mkdir -p $out/lib/ghidra/Ghidra/Extensions 20 + unzip -d $out/lib/ghidra/Ghidra/Extensions $src 21 + 22 + runHook postInstall 23 + ''; 24 + 25 + meta = with lib; { 26 + inherit (ghidra.meta) homepage license; 27 + description = "Finds functions using ML"; 28 + downloadPage = "https://github.com/NationalSecurityAgency/ghidra/tree/master/Ghidra/Extensions/MachineLearning"; 29 + sourceProvenance = with sourceTypes; [ 30 + fromSource 31 + binaryBytecode # deps 32 + ]; 33 + }; 34 + }
+40
pkgs/tools/security/ghidra/extensions/sleighdevtools/default.nix
··· 1 + { lib 2 + , buildGhidraExtension 3 + , ghidra 4 + , python3 5 + }: 6 + 7 + buildGhidraExtension { 8 + pname = "sleighdevtools"; 9 + version = lib.getVersion ghidra; 10 + 11 + src = "${ghidra}/lib/ghidra/Extensions/Ghidra/${ghidra.distroPrefix}_SleighDevTools.zip"; 12 + dontUnpack = true; 13 + 14 + # Built as part ghidra 15 + dontBuild = true; 16 + buildInputs = [ python3 ]; 17 + 18 + installPhase = '' 19 + runHook preInstall 20 + 21 + mkdir -p $out/lib/ghidra/Ghidra/Extensions 22 + unzip -d $out/lib/ghidra/Ghidra/Extensions $src 23 + 24 + runHook postInstall 25 + ''; 26 + 27 + meta = with lib; { 28 + inherit (ghidra.meta) homepage license; 29 + description = "Sleigh language development tools including external disassembler capabilities"; 30 + longDescription = '' 31 + Sleigh language development tools including external disassembler capabilities. 32 + The GnuDisassembler extension may be also be required as a disassembly provider. 33 + ''; 34 + downloadPage = "https://github.com/NationalSecurityAgency/ghidra/tree/master/Ghidra/Extensions/SleighDevTools"; 35 + sourceProvenance = with sourceTypes; [ 36 + fromSource 37 + binaryBytecode # deps 38 + ]; 39 + }; 40 + }
+30
pkgs/tools/security/ghidra/with-extensions.nix
··· 1 + { lib 2 + , callPackage 3 + , symlinkJoin 4 + , makeBinaryWrapper 5 + , ghidra 6 + }: 7 + 8 + let 9 + ghidra-extensions = callPackage ./extensions.nix { inherit ghidra; }; 10 + allExtensions = lib.filterAttrs (n: pkg: lib.isDerivation pkg) ghidra-extensions; 11 + 12 + /* Make Ghidra with additional extensions 13 + Example: 14 + pkgs.ghidra.withExtensions (p: with p; [ 15 + ghostrings 16 + ]); 17 + => /nix/store/3yn0rbnz5mbrxf0x70jbjq73wgkszr5c-ghidra-with-extensions-10.2.2 18 + */ 19 + withExtensions = f: (symlinkJoin { 20 + name = "${ghidra.pname}-with-extensions-${lib.getVersion ghidra}"; 21 + paths = (f allExtensions); 22 + nativeBuildInputs = [ makeBinaryWrapper ]; 23 + postBuild = '' 24 + makeWrapper '${ghidra}/bin/ghidra' "$out/bin/ghidra" \ 25 + --set NIX_GHIDRAHOME "$out/lib/ghidra/Ghidra" 26 + ''; 27 + inherit (ghidra) meta; 28 + }); 29 + in 30 + withExtensions
+3
pkgs/tools/typesetting/tex/texlive/build-tex-env.nix
··· 308 308 postBuild = '' 309 309 . "${./build-tex-env.sh}" 310 310 ''; 311 + 312 + allowSubstitutes = true; 313 + preferLocalBuild = false; 311 314 }; 312 315 # outputsToInstall must be set *after* overrideAttrs (used in buildEnv') or it fails the checkMeta tests 313 316 in if __combine || __formatsOf != null then out else lib.addMetaAttrs { inherit (pkgList) outputsToInstall; } out)
+1
pkgs/top-level/aliases.nix
··· 407 407 ghostwriter = libsForQt5.kdeGear.ghostwriter; # Added 2023-03-18 408 408 go-dependency-manager = throw "'go-dependency-manager' is unmaintained and the go community now uses 'go.mod' mostly instead"; # Added 2023-10-04 409 409 gotktrix = throw "'gotktrix' has been removed, as it was broken and unmaintained"; # Added 2023-12-06 410 + git-credential-1password = throw "'git-credential-1password' has been removed, as the upstream project is deleted."; # Added 2024-05-20 410 411 git-subset = throw "'git-subset' has been removed in favor of 'git-filter-repo'"; # Added 2023-01-13 411 412 412 413 gitAndTools = self // {
+2 -2
pkgs/top-level/all-packages.nix
··· 2332 2332 2333 2333 git-crecord = callPackage ../applications/version-management/git-crecord { }; 2334 2334 2335 - git-credential-1password = callPackage ../applications/version-management/git-credential-1password { }; 2336 - 2337 2335 git-credential-keepassxc = darwin.apple_sdk_11_0.callPackage ../applications/version-management/git-credential-keepassxc { 2338 2336 inherit (darwin.apple_sdk.frameworks) DiskArbitration Foundation; 2339 2337 }; ··· 5383 5381 ghidra = darwin.apple_sdk_11_0.callPackage ../tools/security/ghidra/build.nix { 5384 5382 protobuf = protobuf_21; 5385 5383 }; 5384 + 5385 + ghidra-extensions = recurseIntoAttrs (callPackage ../tools/security/ghidra/extensions.nix { }); 5386 5386 5387 5387 ghidra-bin = callPackage ../tools/security/ghidra { }; 5388 5388