diff --git a/nixos/modules/programs/steam.nix b/nixos/modules/programs/steam.nix index 6af8d3aea903..5138588dbd3e 100644 --- a/nixos/modules/programs/steam.nix +++ b/nixos/modules/programs/steam.nix @@ -104,8 +104,9 @@ in { fontPackages = lib.mkOption { type = lib.types.listOf lib.types.package; - default = config.fonts.packages; - defaultText = lib.literalExpression "fonts.packages"; + # `fonts.packages` is a list of paths now, filter out which are not packages + default = builtins.filter lib.types.package.check config.fonts.packages; + defaultText = lib.literalExpression "builtins.filter lib.types.package.check config.fonts.packages"; example = lib.literalExpression "with pkgs; [ source-han-sans ]"; description = '' Font packages to use in Steam. diff --git a/pkgs/applications/science/logic/hol_light/default.nix b/pkgs/applications/science/logic/hol_light/default.nix index 813397ba01f9..0e3dee4b0c0a 100644 --- a/pkgs/applications/science/logic/hol_light/default.nix +++ b/pkgs/applications/science/logic/hol_light/default.nix @@ -1,8 +1,12 @@ -{ lib, stdenv, runtimeShell, fetchFromGitHub, fetchpatch, ocaml, findlib, num, camlp5, camlp-streams }: +{ lib, stdenv, runtimeShell, fetchFromGitHub, fetchpatch, ocaml, findlib, num, zarith, camlp5, camlp-streams }: let + use_zarith = lib.versionAtLeast ocaml.version "4.14"; load_num = - lib.optionalString (num != null) '' + if use_zarith then '' + -I ${zarith}/lib/ocaml/${ocaml.version}/site-lib/zarith \ + -I ${zarith}/lib/ocaml/${ocaml.version}/site-lib/stublibs \ + '' else lib.optionalString (num != null) '' -I ${num}/lib/ocaml/${ocaml.version}/site-lib/num \ -I ${num}/lib/ocaml/${ocaml.version}/site-lib/top-num \ -I ${num}/lib/ocaml/${ocaml.version}/site-lib/stublibs \ @@ -22,18 +26,15 @@ let ''; in -lib.throwIf (lib.versionAtLeast ocaml.version "5.0") - "hol_light is not available for OCaml ${ocaml.version}" - stdenv.mkDerivation { pname = "hol_light"; - version = "unstable-2023-11-03"; + version = "unstable-2024-05-10"; src = fetchFromGitHub { owner = "jrh13"; repo = "hol-light"; - rev = "dcd765c6032f52a0c0bf21fce5da4794a823e880"; - hash = "sha256-k2RBNDo4tc3eobKB84Y2xr0UQJvef0hv6jyFCaDCQFM="; + rev = "d8366986e22555c4e4c8ff49667d646d15c35f14"; + hash = "sha256-dN9X7yQlFof759I5lxxL4DxDe8V3XAhCRaryO9NabY4="; }; patches = [ @@ -46,7 +47,10 @@ stdenv.mkDerivation { strictDeps = true; nativeBuildInputs = [ ocaml findlib camlp5 ]; - propagatedBuildInputs = [ camlp-streams num ]; + propagatedBuildInputs = [ + camlp-streams + (if use_zarith then zarith else num) + ]; installPhase = '' mkdir -p "$out/lib/hol_light" "$out/bin" diff --git a/pkgs/by-name/ca/castero/package.nix b/pkgs/by-name/ca/castero/package.nix index 6359c5c69536..0b9f727dda92 100644 --- a/pkgs/by-name/ca/castero/package.nix +++ b/pkgs/by-name/ca/castero/package.nix @@ -15,8 +15,7 @@ python3.pkgs.buildPythonApplication rec { hash = "sha256-6/7oCKBMEcQeJ8PaFP15Xef9sQRYCpigtzINv2M6GUY="; }; - nativeBuildInputs = with python3.pkgs; [ - setuptools + build-system = with python3.pkgs; [ wheel ]; @@ -29,7 +28,7 @@ python3.pkgs.buildPythonApplication rec { lxml mpv python-vlc - ]; + ] ++ requests.optional-dependencies.socks; nativeCheckInputs = with python3.pkgs; [ pytestCheckHook diff --git a/pkgs/by-name/fi/files-cli/package.nix b/pkgs/by-name/fi/files-cli/package.nix index 1bc90b5420cf..7c5125c8add0 100644 --- a/pkgs/by-name/fi/files-cli/package.nix +++ b/pkgs/by-name/fi/files-cli/package.nix @@ -7,16 +7,16 @@ buildGoModule rec { pname = "files-cli"; - version = "2.13.50"; + version = "2.13.53"; src = fetchFromGitHub { repo = "files-cli"; owner = "files-com"; rev = "v${version}"; - hash = "sha256-UeRB+vmnLr85oGwaiuyfe5pVCN1EmEQqyoU5tY2hst8="; + hash = "sha256-fUOcAluc/H6ZfE14FjLH60cQeUarJ+4PeIb6IkaBwtE="; }; - vendorHash = "sha256-L6UnKbqS6aO8+XSPt5KaKGYr30y9RE+l4U3hapPHHvA="; + vendorHash = "sha256-yVr4u96L+Kgd1Qi2jhvWhwo/EnENwlZgJZtkGOWbteM="; ldflags = [ "-s" diff --git a/pkgs/by-name/fl/flarectl/package.nix b/pkgs/by-name/fl/flarectl/package.nix index c094fe961af9..fb5786857ef4 100644 --- a/pkgs/by-name/fl/flarectl/package.nix +++ b/pkgs/by-name/fl/flarectl/package.nix @@ -5,16 +5,16 @@ buildGoModule rec { pname = "flarectl"; - version = "0.95.0"; + version = "0.96.0"; src = fetchFromGitHub { owner = "cloudflare"; repo = "cloudflare-go"; rev = "v${version}"; - hash = "sha256-GcmFRtQ8aqicvawCpFDo+oheUSOgKewBETIizPKcyGU="; + hash = "sha256-iqR+9qgHYCk7DGX64f50ANUYxTn0h4+AoBHE6yGAvtU="; }; - vendorHash = "sha256-Jtap4hGwNr8lpXi6huGikL4iUSP242cIiFyvGveszq8="; + vendorHash = "sha256-SkJTLOJ6518MQ0pAPM3TR8T5dOSwEbyQNZHr1jq936A="; subPackages = [ "cmd/flarectl" ]; diff --git a/pkgs/desktops/gnome/extensions/extensionOverrides.nix b/pkgs/desktops/gnome/extensions/extensionOverrides.nix index 7867fe8387c7..28e451e47eb2 100644 --- a/pkgs/desktops/gnome/extensions/extensionOverrides.nix +++ b/pkgs/desktops/gnome/extensions/extensionOverrides.nix @@ -114,6 +114,15 @@ super: lib.trivial.pipe super [ ]; })) + (patchExtension "system-monitor@gnome-shell-extensions.gcampax.github.com" (old: { + patches = [ + (substituteAll { + src = ./extensionOverridesPatches/system-monitor_at_gnome-shell-extensions.gcampax.github.com.patch; + gtop_path = "${libgtop}/lib/girepository-1.0"; + }) + ]; + })) + (patchExtension "system-monitor-next@paradoxxx.zero.gmail.com" (old: { patches = [ (substituteAll { diff --git a/pkgs/desktops/gnome/extensions/extensionOverridesPatches/system-monitor_at_gnome-shell-extensions.gcampax.github.com.patch b/pkgs/desktops/gnome/extensions/extensionOverridesPatches/system-monitor_at_gnome-shell-extensions.gcampax.github.com.patch new file mode 100644 index 000000000000..eb8fc58169fa --- /dev/null +++ b/pkgs/desktops/gnome/extensions/extensionOverridesPatches/system-monitor_at_gnome-shell-extensions.gcampax.github.com.patch @@ -0,0 +1,25 @@ +diff --git a/extension.js b/extension.js +index 37d2eb1..232d0d5 100644 +--- a/extension.js ++++ b/extension.js +@@ -6,9 +6,9 @@ + + import Clutter from 'gi://Clutter'; + import Gio from 'gi://Gio'; ++import GIRepository from "gi://GIRepository"; + import GLib from 'gi://GLib'; + import GObject from 'gi://GObject'; +-import GTop from 'gi://GTop'; + import Pango from 'gi://Pango'; + import Shell from 'gi://Shell'; + import St from 'gi://St'; +@@ -19,6 +19,9 @@ import * as PopupMenu from 'resource:///org/gnome/shell/ui/popupMenu.js'; + + import * as Main from 'resource:///org/gnome/shell/ui/main.js'; + ++GIRepository.Repository.prepend_search_path('@gtop_path@'); ++const GTop = (await import("gi://GTop")).default; ++ + const THRESHOLD_HIGH = 0.80; + + // adapted from load-graph.cpp in gnome-system-monitor diff --git a/pkgs/development/compilers/go/1.22.nix b/pkgs/development/compilers/go/1.22.nix index c0103090b331..aad242c88606 100644 --- a/pkgs/development/compilers/go/1.22.nix +++ b/pkgs/development/compilers/go/1.22.nix @@ -37,6 +37,7 @@ let "riscv64" = "riscv64"; "s390x" = "s390x"; "x86_64" = "amd64"; + "wasm32" = "wasm"; }.${platform.parsed.cpu.name} or (throw "Unsupported system: ${platform.parsed.cpu.name}"); # We need a target compiler which is still runnable at build time, @@ -90,7 +91,7 @@ stdenv.mkDerivation (finalAttrs: { ./go_no_vendor_checks-1.22.patch ]; - GOOS = stdenv.targetPlatform.parsed.kernel.name; + GOOS = if stdenv.targetPlatform.isWasi then "wasip1" else stdenv.targetPlatform.parsed.kernel.name; GOARCH = goarch stdenv.targetPlatform; # GOHOSTOS/GOHOSTARCH must match the building system, not the host system. # Go will nevertheless build a for host system that we will copy over in @@ -113,7 +114,8 @@ stdenv.mkDerivation (finalAttrs: { GOARM = toString (lib.intersectLists [ (stdenv.hostPlatform.parsed.cpu.version or "") ] [ "5" "6" "7" ]); GO386 = "softfloat"; # from Arch: don't assume sse2 on i686 - CGO_ENABLED = 1; + # Wasi does not support CGO + CGO_ENABLED = if stdenv.targetPlatform.isWasi then 0 else 1; GOROOT_BOOTSTRAP = if useGccGoBootstrap then goBootstrap else "${goBootstrap}/share/go"; @@ -184,7 +186,7 @@ stdenv.mkDerivation (finalAttrs: { homepage = "https://go.dev/"; license = licenses.bsd3; maintainers = teams.golang.members; - platforms = platforms.darwin ++ platforms.linux; + platforms = platforms.darwin ++ platforms.linux ++ platforms.wasi; mainProgram = "go"; }; }) diff --git a/pkgs/development/libraries/editline/default.nix b/pkgs/development/libraries/editline/default.nix index 4f891a24f1f0..e3c9ba32f392 100644 --- a/pkgs/development/libraries/editline/default.nix +++ b/pkgs/development/libraries/editline/default.nix @@ -26,6 +26,8 @@ stdenv.mkDerivation rec { }) ]; + configureFlags = [ (lib.enableFeature true "sigstop") ]; + nativeBuildInputs = [ autoreconfHook ]; outputs = [ "out" "dev" "man" "doc" ]; diff --git a/pkgs/development/ocaml-modules/bytestring/default.nix b/pkgs/development/ocaml-modules/bytestring/default.nix new file mode 100644 index 000000000000..3714846ee6b5 --- /dev/null +++ b/pkgs/development/ocaml-modules/bytestring/default.nix @@ -0,0 +1,45 @@ +{ lib +, buildDunePackage +, fetchurl +, ppxlib +, rio +, sedlex +, spices +, uutf +, qcheck +}: + +buildDunePackage rec { + pname = "bytestring"; + version = "0.0.8"; + + minimalOCamlVersion = "5.1"; + + src = fetchurl { + url = "https://github.com/riot-ml/riot/releases/download/${version}/riot-${version}.tbz"; + hash = "sha256-SsiDz53b9bMIT9Q3IwDdB3WKy98WSd9fiieU41qZpeE="; + }; + + propagatedBuildInputs = [ + ppxlib + sedlex + spices + rio + uutf + ]; + + checkInputs = [ + qcheck + ]; + + # Checks fail with OCaml 5.2 + doCheck = false; + + meta = { + description = "Efficient, immutable, pattern-matchable, UTF friendly byte strings"; + homepage = "https://github.com/riot-ml/riot"; + license = lib.licenses.mit; + maintainers = with lib.maintainers; [ ]; + }; +} + diff --git a/pkgs/development/ocaml-modules/colors/default.nix b/pkgs/development/ocaml-modules/colors/default.nix new file mode 100644 index 000000000000..0335d5e425ba --- /dev/null +++ b/pkgs/development/ocaml-modules/colors/default.nix @@ -0,0 +1,35 @@ +{ lib +, buildDunePackage +, fetchurl +, mdx +}: + +buildDunePackage rec { + pname = "colors"; + version = "0.0.1"; + + minimalOCamlVersion = "4.13"; + + src = fetchurl { + url = "https://github.com/leostera/colors/releases/download/${version}/colors-${version}.tbz"; + hash = "sha256-fY1j9FODVnifwsI8qkKm0QSmssgWqYFXJ7y8o7/KmEY="; + }; + + doCheck = true; + + checkInputs = [ + mdx + ]; + + nativeCheckInputs = [ + mdx.bin + ]; + + meta = { + description = "A pure OCaml library for manipulating colors across color spaces"; + homepage = "https://github.com/leostera/colors"; + changelog = "https://github.com/leostera/colors/blob/${version}/CHANGES.md"; + license = lib.licenses.mit; + maintainers = with lib.maintainers; [ ]; + }; +} diff --git a/pkgs/development/ocaml-modules/config/default.nix b/pkgs/development/ocaml-modules/config/default.nix new file mode 100644 index 000000000000..43ad500602ee --- /dev/null +++ b/pkgs/development/ocaml-modules/config/default.nix @@ -0,0 +1,27 @@ +{ lib +, buildDunePackage +, fetchurl +, ppxlib +, spices +}: + +buildDunePackage rec { + pname = "config"; + version = "0.0.3"; + + src = fetchurl { + url = "https://github.com/ocaml-sys/config.ml/releases/download/${version}/config-${version}.tbz"; + hash = "sha256-bcRCfLX2ro8vnQTJiX2aYGJC+eD26vkPynMYg817YFM="; + }; + + propagatedBuildInputs = [ + ppxlib + spices + ]; + + meta = { + description = "Ergonomic, lightweight conditional compilation through attributes"; + homepage = "https://github.com/ocaml-sys/config.ml"; + license = lib.licenses.mit; + }; +} diff --git a/pkgs/development/ocaml-modules/gluon/default.nix b/pkgs/development/ocaml-modules/gluon/default.nix new file mode 100644 index 000000000000..df700d933ebf --- /dev/null +++ b/pkgs/development/ocaml-modules/gluon/default.nix @@ -0,0 +1,42 @@ +{ lib +, buildDunePackage +, fetchurl +, bytestring +, config +, libc +, rio +, uri +}: + +buildDunePackage rec { + pname = "gluon"; + version = "0.0.9"; + + minimalOCamlVersion = "5.1"; + + src = fetchurl { + url = "https://github.com/riot-ml/gluon/releases/download/${version}/gluon-${version}.tbz"; + hash = "sha256-YWJCPokY1A7TGqCGoxJl14oKDVeMNybEEB7KiK92WSo="; + }; + + buildInputs = [ + config + ]; + + propagatedBuildInputs = [ + bytestring + libc + rio + uri + ]; + + meta = { + description = "A minimal, portable, and fast API on top of the operating-system's evented I/O API"; + homepage = "https://github.com/riot-ml/gluon"; + changelog = "https://github.com/riot-ml/gluon/blob/${version}/CHANGES.md"; + license = lib.licenses.mit; + maintainers = [ ]; + }; +} + + diff --git a/pkgs/development/ocaml-modules/libc/default.nix b/pkgs/development/ocaml-modules/libc/default.nix new file mode 100644 index 000000000000..13e0f04ddfc7 --- /dev/null +++ b/pkgs/development/ocaml-modules/libc/default.nix @@ -0,0 +1,26 @@ +{ lib +, buildDunePackage +, fetchurl +, config +}: + +buildDunePackage rec { + pname = "libc"; + version = "0.0.1"; + + src = fetchurl { + url = "https://github.com/ocaml-sys/libc.ml/releases/download/${version}/libc-${version}.tbz"; + hash = "sha256-e5x5Yae7V6qOpq+aLZaV+6L9ldy9qDqd9Kc8nkAsENg="; + }; + + buildInputs = [ + config + ]; + + meta = { + description = "Raw definitions and bindings to platforms system libraries"; + homepage = "https://github.com/ocaml-sys/libc.ml"; + license = lib.licenses.mit; + }; +} + diff --git a/pkgs/development/ocaml-modules/minttea/default.nix b/pkgs/development/ocaml-modules/minttea/default.nix index 8d81317edd1f..75ff04929f9b 100644 --- a/pkgs/development/ocaml-modules/minttea/default.nix +++ b/pkgs/development/ocaml-modules/minttea/default.nix @@ -7,13 +7,13 @@ buildDunePackage rec { pname = "minttea"; - version = "0.0.1"; + version = "0.0.3"; minimalOCamlVersion = "5.1"; src = fetchurl { url = "https://github.com/leostera/minttea/releases/download/${version}/minttea-${version}.tbz"; - hash = "sha256-+4nVeYKx2A2i2nll/PbStcEa+Dvxd0T7e/KsdJqY4bI="; + hash = "sha256-WEaJVCCvsmKcF8+yzovljt8dGWaIv4UmAr74jq6Vo9M="; }; propagatedBuildInputs = [ @@ -21,8 +21,6 @@ buildDunePackage rec { tty ]; - doCheck = true; - meta = { description = "A fun, functional, and stateful way to build terminal apps in OCaml heavily inspired by Go's BubbleTea"; homepage = "https://github.com/leostera/minttea"; diff --git a/pkgs/development/ocaml-modules/rio/default.nix b/pkgs/development/ocaml-modules/rio/default.nix new file mode 100644 index 000000000000..853670be3528 --- /dev/null +++ b/pkgs/development/ocaml-modules/rio/default.nix @@ -0,0 +1,30 @@ +{ lib +, buildDunePackage +, fetchurl +, cstruct +}: + +buildDunePackage rec { + pname = "rio"; + version = "0.0.8"; + + minimalOCamlVersion = "5.1"; + + src = fetchurl { + url = "https://github.com/riot-ml/riot/releases/download/${version}/riot-${version}.tbz"; + hash = "sha256-SsiDz53b9bMIT9Q3IwDdB3WKy98WSd9fiieU41qZpeE="; + }; + + propagatedBuildInputs = [ + cstruct + ]; + + meta = { + description = "Ergonomic, composable, efficient read/write streams"; + homepage = "https://github.com/riot-ml/riot"; + changelog = "https://github.com/riot-ml/riot/blob/${version}/CHANGES.md"; + license = lib.licenses.mit; + maintainers = [ ]; + }; +} + diff --git a/pkgs/development/ocaml-modules/riot/default.nix b/pkgs/development/ocaml-modules/riot/default.nix index a6f599639111..4e88d0c8d090 100644 --- a/pkgs/development/ocaml-modules/riot/default.nix +++ b/pkgs/development/ocaml-modules/riot/default.nix @@ -1,36 +1,34 @@ { lib , buildDunePackage -, cstruct , fetchurl -, mdx -, poll -, ptime +, mirage-crypto-rng +, mtime +, gluon +, randomconv +, rio , telemetry -, uri +, tls }: buildDunePackage rec { pname = "riot"; - version = "0.0.7"; + version = "0.0.8"; minimalOCamlVersion = "5.1"; src = fetchurl { url = "https://github.com/leostera/riot/releases/download/${version}/riot-${version}.tbz"; - hash = "sha256-t+PMBh4rZXi82dUljv3nLzZX5o1iagBbQ9FfGnr/dp4="; + hash = "sha256-SsiDz53b9bMIT9Q3IwDdB3WKy98WSd9fiieU41qZpeE="; }; propagatedBuildInputs = [ - cstruct - poll - ptime + gluon + mirage-crypto-rng + mtime + randomconv + rio telemetry - uri - ]; - - checkInputs = [ - mdx - mdx.bin + tls ]; doCheck = false; # fails on sandbox diff --git a/pkgs/development/ocaml-modules/spices/default.nix b/pkgs/development/ocaml-modules/spices/default.nix new file mode 100644 index 000000000000..a1d6b06d156b --- /dev/null +++ b/pkgs/development/ocaml-modules/spices/default.nix @@ -0,0 +1,34 @@ +{ lib +, buildDunePackage +, fetchurl +, colors +, tty +}: + +buildDunePackage rec { + pname = "spices"; + version = "0.0.2"; + + minimalOCamlVersion = "5.1"; + + src = fetchurl { + url = "https://github.com/leostera/minttea/releases/download/${version}/minttea-${version}.tbz"; + hash = "sha256-0eB7OuxcPdv9bf2aIQEeir44mQfx5W2AJj7Vb4pGtLI="; + }; + + propagatedBuildInputs = [ + colors + tty + ]; + + doCheck = true; + + meta = { + description = "Declarative styles for TUI applications"; + homepage = "https://github.com/leostera/minttea"; + changelog = "https://github.com/leostera/minttea/blob/${version}/CHANGES.md"; + license = lib.licenses.mit; + maintainers = with lib.maintainers; [ ]; + }; +} + diff --git a/pkgs/development/php-packages/mongodb/default.nix b/pkgs/development/php-packages/mongodb/default.nix index 8a1b224627d0..f79a308a33ce 100644 --- a/pkgs/development/php-packages/mongodb/default.nix +++ b/pkgs/development/php-packages/mongodb/default.nix @@ -16,13 +16,13 @@ buildPecl rec { pname = "mongodb"; - version = "1.19.0"; + version = "1.19.1"; src = fetchFromGitHub { owner = "mongodb"; repo = "mongo-php-driver"; rev = version; - hash = "sha256-hog6bOKAhLwZMjrUD5yOJ607B1MLYaZJjq6CXIYPlH4="; + hash = "sha256-5HGQDgZZu+miPijJD/Y48WlUVfxjkeU9gA7hByzxb/o="; fetchSubmodules = true; }; diff --git a/pkgs/shells/jush/default.nix b/pkgs/shells/jush/default.nix deleted file mode 100644 index 42e8e13cceae..000000000000 --- a/pkgs/shells/jush/default.nix +++ /dev/null @@ -1,29 +0,0 @@ -{ lib, stdenv, fetchFromGitHub, autoreconfHook, pkg-config, editline }: - -stdenv.mkDerivation rec { - pname = "jush"; - version = "0.1"; - - src = fetchFromGitHub { - owner = "troglobit"; - repo = pname; - rev = "v${version}"; - sha256 = "1azvghrh31gawd798a254ml4id642qvbva64zzg30pjszh1087n8"; - }; - - strictDeps = true; - nativeBuildInputs = [ autoreconfHook pkg-config ]; - - buildInputs = [ editline ]; - - passthru.shellPath = "/bin/jush"; - - meta = with lib; { - description = "just a useless shell"; - mainProgram = "jush"; - homepage = "https://github.com/troglobit/jush"; - license = licenses.isc; - platforms = platforms.all; - maintainers = with maintainers; [ dtzWill ]; - }; -} diff --git a/pkgs/tools/security/ghidra/build.nix b/pkgs/tools/security/ghidra/build.nix index c0a8dca4cd0e..ba23647c9c2d 100644 --- a/pkgs/tools/security/ghidra/build.nix +++ b/pkgs/tools/security/ghidra/build.nix @@ -4,10 +4,12 @@ , callPackage , gradle_7 , perl -, makeWrapper +, makeBinaryWrapper , openjdk17 , unzip , makeDesktopItem +, copyDesktopItems +, desktopToDarwinBundle , icoutils , xcbuild , protobuf @@ -53,15 +55,6 @@ let ./0003-Remove-build-datestamp.patch ]; - desktopItem = makeDesktopItem { - name = "ghidra"; - exec = "ghidra"; - icon = "ghidra"; - desktopName = "Ghidra"; - genericName = "Ghidra Software Reverse Engineering Suite"; - categories = [ "Development" ]; - }; - postPatch = '' # Set name of release (eg. PUBLIC, DEV, etc.) sed -i -e 's/application\.release\.name=.*/application.release.name=${releaseName}/' Ghidra/application.properties @@ -145,9 +138,28 @@ HERE in stdenv.mkDerivation (finalAttrs: { inherit pname version src patches postPatch; + desktopItems = [ + (makeDesktopItem { + name = "ghidra"; + exec = "ghidra"; + icon = "ghidra"; + desktopName = "Ghidra"; + genericName = "Ghidra Software Reverse Engineering Suite"; + categories = [ "Development" ]; + terminal = false; + }) + ]; + nativeBuildInputs = [ - gradle unzip makeWrapper icoutils protobuf - ] ++ lib.optional stdenv.isDarwin xcbuild; + gradle + unzip + makeBinaryWrapper + copyDesktopItems + protobuf + ] ++ lib.optionals stdenv.isDarwin [ + xcbuild + desktopToDarwinBundle + ]; dontStrip = true; @@ -169,6 +181,7 @@ in stdenv.mkDerivation (finalAttrs: { installPhase = '' runHook preInstall + mkdir -p "${pkg_path}" "$out/share/applications" ZIP=build/dist/$(ls build/dist) @@ -178,15 +191,13 @@ in stdenv.mkDerivation (finalAttrs: { mv "${pkg_path}"/*/* "${pkg_path}" rmdir "''${f[@]}" - ln -s ${desktopItem}/share/applications/* $out/share/applications - - icotool -x "Ghidra/RuntimeScripts/Windows/support/ghidra.ico" - rm ghidra_4_40x40x32.png - for f in ghidra_*.png; do - res=$(basename "$f" ".png" | cut -d"_" -f3 | cut -d"x" -f1-2) - mkdir -pv "$out/share/icons/hicolor/$res/apps" - mv "$f" "$out/share/icons/hicolor/$res/apps/ghidra.png" + for f in Ghidra/Framework/Gui/src/main/resources/images/GhidraIcon*.png; do + res=$(basename "$f" ".png" | cut -d"_" -f3 | cut -c11-) + install -Dm444 "$f" "$out/share/icons/hicolor/''${res}x''${res}/apps/ghidra.png" done; + # improved macOS icon support + install -Dm444 Ghidra/Framework/Gui/src/main/resources/images/GhidraIcon64.png $out/share/icons/hicolor/32x32@2/apps/ghidra.png + runHook postInstall ''; @@ -206,7 +217,8 @@ in stdenv.mkDerivation (finalAttrs: { }; meta = with lib; { - description = "A software reverse engineering (SRE) suite of tools developed by NSA's Research Directorate in support of the Cybersecurity mission"; + changelog = "https://htmlpreview.github.io/?https://github.com/NationalSecurityAgency/ghidra/blob/Ghidra_${finalAttrs.version}_build/Ghidra/Configurations/Public_Release/src/global/docs/ChangeHistory.html"; + description = "Software reverse engineering (SRE) suite of tools"; mainProgram = "ghidra"; homepage = "https://ghidra-sre.org/"; platforms = [ "x86_64-linux" "aarch64-linux" "x86_64-darwin" "aarch64-darwin" ]; diff --git a/pkgs/tools/security/ghidra/with-extensions.nix b/pkgs/tools/security/ghidra/with-extensions.nix index 8ce4a04c2d46..38165ed94f71 100644 --- a/pkgs/tools/security/ghidra/with-extensions.nix +++ b/pkgs/tools/security/ghidra/with-extensions.nix @@ -1,7 +1,9 @@ { lib +, stdenv , callPackage , symlinkJoin , makeBinaryWrapper +, desktopToDarwinBundle , ghidra }: @@ -19,10 +21,14 @@ let withExtensions = f: (symlinkJoin { name = "${ghidra.pname}-with-extensions-${lib.getVersion ghidra}"; paths = (f allExtensions); - nativeBuildInputs = [ makeBinaryWrapper ]; + nativeBuildInputs = [ makeBinaryWrapper ] + ++ lib.optional stdenv.hostPlatform.isDarwin desktopToDarwinBundle; postBuild = '' makeWrapper '${ghidra}/bin/ghidra' "$out/bin/ghidra" \ --set NIX_GHIDRAHOME "$out/lib/ghidra/Ghidra" + ln -s ${ghidra}/share $out/share + '' + lib.optionalString stdenv.hostPlatform.isDarwin '' + convertDesktopFiles $prefix ''; inherit (ghidra) meta; }); diff --git a/pkgs/top-level/aliases.nix b/pkgs/top-level/aliases.nix index 721d077e047c..4f54816185f0 100644 --- a/pkgs/top-level/aliases.nix +++ b/pkgs/top-level/aliases.nix @@ -590,6 +590,8 @@ mapAliases ({ julia_18 = throw "'julia_18' has been removed from nixpkgs as it has reached end of life"; # Added 2024-01-11 julia_18-bin = throw "'julia_18-bin' has been removed from nixpkgs as it has reached end of life"; # Added 2024-01-11 + jush = throw "jush has been removed from nixpkgs because it is unmaintained"; # Added 2024-05-28 + ### K ### k3s_1_24 = throw "'k3s_1_24' has been removed from nixpkgs as it has reached end of life"; # Added 2024-03-14 diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index d9dfc0772199..b1871ba3feea 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -15035,8 +15035,6 @@ with pkgs; ion = callPackage ../shells/ion { }; - jush = callPackage ../shells/jush { }; - ksh = callPackage ../shells/ksh { }; liquidprompt = callPackage ../shells/liquidprompt { }; diff --git a/pkgs/top-level/ocaml-packages.nix b/pkgs/top-level/ocaml-packages.nix index 74aa545f2b85..9185234ad38c 100644 --- a/pkgs/top-level/ocaml-packages.nix +++ b/pkgs/top-level/ocaml-packages.nix @@ -119,6 +119,8 @@ let bwd = callPackage ../development/ocaml-modules/bwd { }; + bytestring = callPackage ../development/ocaml-modules/bytestring { }; + bz2 = callPackage ../development/ocaml-modules/bz2 { }; ### C ### @@ -231,6 +233,8 @@ let color = callPackage ../development/ocaml-modules/color { }; + colors = callPackage ../development/ocaml-modules/colors { }; + conduit = callPackage ../development/ocaml-modules/conduit { }; conduit-async = callPackage ../development/ocaml-modules/conduit/async.nix { }; @@ -241,6 +245,8 @@ let conduit-mirage = callPackage ../development/ocaml-modules/conduit/mirage.nix { }; + config = callPackage ../development/ocaml-modules/config { }; + config-file = callPackage ../development/ocaml-modules/config-file { }; containers = callPackage ../development/ocaml-modules/containers { }; @@ -600,6 +606,8 @@ let github-jsoo = callPackage ../development/ocaml-modules/github/jsoo.nix { }; github-unix = callPackage ../development/ocaml-modules/github/unix.nix { }; + gluon = callPackage ../development/ocaml-modules/gluon { }; + gluten = callPackage ../development/ocaml-modules/gluten { }; gluten-eio = callPackage ../development/ocaml-modules/gluten/eio.nix { }; gluten-lwt = callPackage ../development/ocaml-modules/gluten/lwt.nix { }; @@ -950,6 +958,8 @@ let letsencrypt-mirage = callPackage ../development/ocaml-modules/letsencrypt/mirage.nix { }; + libc = callPackage ../development/ocaml-modules/libc { }; + lilv = callPackage ../development/ocaml-modules/lilv { inherit (pkgs) lilv; }; @@ -1634,6 +1644,8 @@ let ringo = callPackage ../development/ocaml-modules/ringo { }; + rio = callPackage ../development/ocaml-modules/rio { }; + riot = callPackage ../development/ocaml-modules/riot { }; rock = callPackage ../development/ocaml-modules/rock { }; @@ -1712,6 +1724,8 @@ let spelll = callPackage ../development/ocaml-modules/spelll { }; + spices = callPackage ../development/ocaml-modules/spices { }; + srt = callPackage ../development/ocaml-modules/srt { inherit (pkgs) srt; };