From edb38f40835f13e969170381d0ac37dddd32f61e Mon Sep 17 00:00:00 2001 From: Keto Date: Wed, 1 May 2024 15:31:00 -0400 Subject: [PATCH 01/19] castero: propagate requests[socks] --- pkgs/by-name/ca/castero/package.nix | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) 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 From fda42f1beeda22cfe110562f5da943420eb06a09 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rg=20Thalheim?= Date: Sat, 25 May 2024 20:47:16 +0200 Subject: [PATCH 02/19] editline: enable sigstop SIGSTOP is send when a user presses CTRL-Z. It will send the application to the background. Without this option, ctrl-z will be ignored. With this option, it's possible to suspend editline-based applications such as Nix. --- pkgs/development/libraries/editline/default.nix | 2 ++ 1 file changed, 2 insertions(+) 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" ]; From 27f69fa93e485d747261d8068aecc9dc0e547a27 Mon Sep 17 00:00:00 2001 From: Emily Trau Date: Sun, 26 May 2024 15:59:02 +1000 Subject: [PATCH 03/19] ghidra: improve desktop support --- pkgs/tools/security/ghidra/build.nix | 54 +++++++++++-------- .../tools/security/ghidra/with-extensions.nix | 8 ++- 2 files changed, 40 insertions(+), 22 deletions(-) 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; }); From 064730b54f13497b5a1a91a7f816124d513097e0 Mon Sep 17 00:00:00 2001 From: Nanotwerp Date: Wed, 8 May 2024 11:26:57 -0400 Subject: [PATCH 04/19] gnomeExtensions.system-monitor: patch to add GTop to the extension's path --- .../gnome/extensions/extensionOverrides.nix | 9 +++++++ ...-shell-extensions.gcampax.github.com.patch | 25 +++++++++++++++++++ 2 files changed, 34 insertions(+) create mode 100644 pkgs/desktops/gnome/extensions/extensionOverridesPatches/system-monitor_at_gnome-shell-extensions.gcampax.github.com.patch diff --git a/pkgs/desktops/gnome/extensions/extensionOverrides.nix b/pkgs/desktops/gnome/extensions/extensionOverrides.nix index 22eff684afc4..ff6c11be7221 100644 --- a/pkgs/desktops/gnome/extensions/extensionOverrides.nix +++ b/pkgs/desktops/gnome/extensions/extensionOverrides.nix @@ -124,6 +124,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 From 1652a914fd32680fd8e6947a738b87c0fd41fa2b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=8C=97=E9=9B=81=20Cryolitia?= Date: Tue, 28 May 2024 12:05:43 +0800 Subject: [PATCH 05/19] nixos/steam: fix evaluation failure when `fonts.packages` contains path --- nixos/modules/programs/steam.nix | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) 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. From ea7f0ec8345e435d1a8fe2116b2efc8a0cc6ebb4 Mon Sep 17 00:00:00 2001 From: "R. Ryantm" Date: Tue, 28 May 2024 19:36:46 +0000 Subject: [PATCH 06/19] flarectl: 0.95.0 -> 0.96.0 --- pkgs/by-name/fl/flarectl/package.nix | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) 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" ]; From 050df1a7e6391db584d5bb88da6a845c26f19375 Mon Sep 17 00:00:00 2001 From: Daniel Nagy Date: Wed, 29 May 2024 00:45:00 +0200 Subject: [PATCH 07/19] go: Support WASI platform With this change it is now possible to build simple Go packages into WebAssembly and WASI. For example, it is now possible to build `wazero` to wasm: ```sh $ file $(nix-build -A pkgsCross.wasi32.wazero --no-out-link)/bin/wazero /nix/store/pzzzsnmyjjrxi8gmadksn99rgfbxqrp2-wazero-static-wasm32-unknown-wasi-1.7.2/bin/wazero: WebAssembly (wasm) binary module version 0x1 (MVP) ``` https://go.dev/blog/wasi --- pkgs/development/compilers/go/1.22.nix | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) 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"; }; }) From 7b95e19a1b96baacc5ddd7e2aae95052a5417a82 Mon Sep 17 00:00:00 2001 From: "R. Ryantm" Date: Wed, 29 May 2024 03:29:08 +0000 Subject: [PATCH 08/19] files-cli: 2.13.50 -> 2.13.53 --- pkgs/by-name/fi/files-cli/package.nix | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) 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" From 5b1dfed4a7dc1d488a55652c465a872dc30779be Mon Sep 17 00:00:00 2001 From: "R. Ryantm" Date: Wed, 29 May 2024 04:15:55 +0000 Subject: [PATCH 09/19] php83Extensions.mongodb: 1.19.0 -> 1.19.1 --- pkgs/development/php-packages/mongodb/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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; }; From 59135e4435c961f37784ac703dcc01e108828820 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rg=20Thalheim?= Date: Tue, 28 May 2024 08:07:00 +0200 Subject: [PATCH 10/19] jush: drop shell It hasn't received significant updates after its initial development 5 years ago. It seems more like a proof of concept of editline. I was trivially able to crash the shell multiple times by providing invalid syntax. Given the feature set I doubt that it has many users. --- pkgs/shells/jush/default.nix | 29 ----------------------------- pkgs/top-level/aliases.nix | 2 ++ pkgs/top-level/all-packages.nix | 2 -- 3 files changed, 2 insertions(+), 31 deletions(-) delete mode 100644 pkgs/shells/jush/default.nix 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/top-level/aliases.nix b/pkgs/top-level/aliases.nix index ffbaf10eb743..7a29eefc5f7e 100644 --- a/pkgs/top-level/aliases.nix +++ b/pkgs/top-level/aliases.nix @@ -583,6 +583,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 ac124ee6dc06..3caa2326f8a9 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -15039,8 +15039,6 @@ with pkgs; ion = callPackage ../shells/ion { }; - jush = callPackage ../shells/jush { }; - ksh = callPackage ../shells/ksh { }; liquidprompt = callPackage ../shells/liquidprompt { }; From e31484ad342815b50a1f614555b5b8e8ee378bd1 Mon Sep 17 00:00:00 2001 From: Vincent Laporte Date: Wed, 22 May 2024 07:20:35 +0200 Subject: [PATCH 11/19] ocamlPackages.rio: init at 0.0.8 --- .../development/ocaml-modules/rio/default.nix | 30 +++++++++++++++++++ pkgs/top-level/ocaml-packages.nix | 2 ++ 2 files changed, 32 insertions(+) create mode 100644 pkgs/development/ocaml-modules/rio/default.nix 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/top-level/ocaml-packages.nix b/pkgs/top-level/ocaml-packages.nix index 74aa545f2b85..3785a6b5ada6 100644 --- a/pkgs/top-level/ocaml-packages.nix +++ b/pkgs/top-level/ocaml-packages.nix @@ -1634,6 +1634,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 { }; From 7b7fe79bd9a781524ed30e3be6d49ba076d0efc9 Mon Sep 17 00:00:00 2001 From: Vincent Laporte Date: Wed, 22 May 2024 07:20:42 +0200 Subject: [PATCH 12/19] ocamlPackages.colors: init at 0.0.1 --- .../ocaml-modules/colors/default.nix | 35 +++++++++++++++++++ pkgs/top-level/ocaml-packages.nix | 2 ++ 2 files changed, 37 insertions(+) create mode 100644 pkgs/development/ocaml-modules/colors/default.nix 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/top-level/ocaml-packages.nix b/pkgs/top-level/ocaml-packages.nix index 3785a6b5ada6..2403c0cc4c39 100644 --- a/pkgs/top-level/ocaml-packages.nix +++ b/pkgs/top-level/ocaml-packages.nix @@ -231,6 +231,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 { }; From 3f656c8d993670dcc435acf0ab2c861cdb45e251 Mon Sep 17 00:00:00 2001 From: Vincent Laporte Date: Wed, 22 May 2024 07:20:47 +0200 Subject: [PATCH 13/19] ocamlPackages.spices: init at 0.0.2 --- .../ocaml-modules/spices/default.nix | 34 +++++++++++++++++++ pkgs/top-level/ocaml-packages.nix | 2 ++ 2 files changed, 36 insertions(+) create mode 100644 pkgs/development/ocaml-modules/spices/default.nix 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/top-level/ocaml-packages.nix b/pkgs/top-level/ocaml-packages.nix index 2403c0cc4c39..bd5e5523c1dd 100644 --- a/pkgs/top-level/ocaml-packages.nix +++ b/pkgs/top-level/ocaml-packages.nix @@ -1716,6 +1716,8 @@ let spelll = callPackage ../development/ocaml-modules/spelll { }; + spices = callPackage ../development/ocaml-modules/spices { }; + srt = callPackage ../development/ocaml-modules/srt { inherit (pkgs) srt; }; From aa198122d4343b2d8e1f82ab2e661ac1262adc43 Mon Sep 17 00:00:00 2001 From: Vincent Laporte Date: Wed, 22 May 2024 07:20:51 +0200 Subject: [PATCH 14/19] ocamlPackages.bytestring: init at 0.0.8 --- .../ocaml-modules/bytestring/default.nix | 45 +++++++++++++++++++ pkgs/top-level/ocaml-packages.nix | 2 + 2 files changed, 47 insertions(+) create mode 100644 pkgs/development/ocaml-modules/bytestring/default.nix 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/top-level/ocaml-packages.nix b/pkgs/top-level/ocaml-packages.nix index bd5e5523c1dd..4bef08626b29 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 ### From 4f31cd3de101aa207de844ae04cf8ab8999d048c Mon Sep 17 00:00:00 2001 From: Vincent Laporte Date: Wed, 22 May 2024 07:20:56 +0200 Subject: [PATCH 15/19] ocamlPackages.config: init at 0.0.3 --- .../ocaml-modules/config/default.nix | 27 +++++++++++++++++++ pkgs/top-level/ocaml-packages.nix | 2 ++ 2 files changed, 29 insertions(+) create mode 100644 pkgs/development/ocaml-modules/config/default.nix 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/top-level/ocaml-packages.nix b/pkgs/top-level/ocaml-packages.nix index 4bef08626b29..9f588d175cd5 100644 --- a/pkgs/top-level/ocaml-packages.nix +++ b/pkgs/top-level/ocaml-packages.nix @@ -245,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 { }; From b7ae13662397999a289cf727619f6460da2a5c26 Mon Sep 17 00:00:00 2001 From: Vincent Laporte Date: Wed, 22 May 2024 07:21:00 +0200 Subject: [PATCH 16/19] ocamlPackages.libc: init at 0.0.1 --- .../ocaml-modules/libc/default.nix | 26 +++++++++++++++++++ pkgs/top-level/ocaml-packages.nix | 2 ++ 2 files changed, 28 insertions(+) create mode 100644 pkgs/development/ocaml-modules/libc/default.nix 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/top-level/ocaml-packages.nix b/pkgs/top-level/ocaml-packages.nix index 9f588d175cd5..4eec4409552d 100644 --- a/pkgs/top-level/ocaml-packages.nix +++ b/pkgs/top-level/ocaml-packages.nix @@ -956,6 +956,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; }; From 242e322244556c206a73bd40ca94ee783e7469c0 Mon Sep 17 00:00:00 2001 From: Vincent Laporte Date: Wed, 22 May 2024 07:21:04 +0200 Subject: [PATCH 17/19] ocamlPackages.gluon: init at 0.0.9 --- .../ocaml-modules/gluon/default.nix | 42 +++++++++++++++++++ pkgs/top-level/ocaml-packages.nix | 2 + 2 files changed, 44 insertions(+) create mode 100644 pkgs/development/ocaml-modules/gluon/default.nix 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/top-level/ocaml-packages.nix b/pkgs/top-level/ocaml-packages.nix index 4eec4409552d..9185234ad38c 100644 --- a/pkgs/top-level/ocaml-packages.nix +++ b/pkgs/top-level/ocaml-packages.nix @@ -606,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 { }; From 51a4edb8c3c9705f0ad966a43f6c98c6167fbfe7 Mon Sep 17 00:00:00 2001 From: Vincent Laporte Date: Wed, 22 May 2024 07:21:09 +0200 Subject: [PATCH 18/19] =?UTF-8?q?ocamlPackages.riot:=200.0.7=20=E2=86=92?= =?UTF-8?q?=200.0.8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ocamlPackages.minttea: 0.0.1 → 0.0.3 --- .../ocaml-modules/minttea/default.nix | 6 ++-- .../ocaml-modules/riot/default.nix | 30 +++++++++---------- 2 files changed, 16 insertions(+), 20 deletions(-) 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/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 From 3892ca21ff9c6d508e32c40f9f5ac894accbf556 Mon Sep 17 00:00:00 2001 From: Vincent Laporte Date: Wed, 22 May 2024 21:46:27 +0200 Subject: [PATCH 19/19] =?UTF-8?q?hol=5Flight:=202023-11-03=20=E2=86=92=202?= =?UTF-8?q?024-05-10?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../science/logic/hol_light/default.nix | 22 +++++++++++-------- 1 file changed, 13 insertions(+), 9 deletions(-) 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"