Script 'mail_helper' called by obssrc
Hello community,

here is the log from the commit of package zug for openSUSE:Factory checked in 
at 2026-01-26 11:03:47
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/zug (Old)
 and      /work/SRC/openSUSE:Factory/.zug.new.1928 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "zug"

Mon Jan 26 11:03:47 2026 rev:4 rq:1328994 version:0.1.2

Changes:
--------
--- /work/SRC/openSUSE:Factory/zug/zug.changes  2025-02-12 21:39:51.250824281 
+0100
+++ /work/SRC/openSUSE:Factory/.zug.new.1928/zug.changes        2026-01-26 
11:04:01.102251547 +0100
@@ -1,0 +2,14 @@
+Sat Jan 24 12:13:11 UTC 2026 - Christophe Marin <[email protected]>
+
+- Update to 0.1.2
+  * Update CMake min version
+  * Fix typo in sequence_data move assignment operator
+  * fix: type trait removed in C++20
+  * fix: test rng doesn't satisfy standard
+  * feat: cpp20 compatibility
+  * fix: any_state missing typeinfo include
+  * zug/transducer/eager.hpp: include algorithm
+- Drop patch:
+  * zug-gcc15.patch
+
+-------------------------------------------------------------------

Old:
----
  zug-0.1.1.tar.gz
  zug-gcc15.patch

New:
----
  zug-0.1.2.tar.gz

----------(Old B)----------
  Old:- Drop patch:
  * zug-gcc15.patch
----------(Old E)----------

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ zug.spec ++++++
--- /var/tmp/diff_new_pack.qHNfyu/_old  2026-01-26 11:04:01.722277496 +0100
+++ /var/tmp/diff_new_pack.qHNfyu/_new  2026-01-26 11:04:01.726277664 +0100
@@ -1,7 +1,7 @@
 #
 # spec file for package zug
 #
-# Copyright (c) 2025 SUSE LLC
+# Copyright (c) 2026 SUSE LLC and contributors
 #
 # All modifications and additions to the file contributed by third parties
 # remain the property of their copyright owners, unless otherwise agreed
@@ -17,16 +17,14 @@
 
 
 Name:           zug
-Version:        0.1.1
+Version:        0.1.2
 Release:        0
 Summary:        Transducers for C++
 License:        BSL-1.0
 URL:            https://sinusoid.es/zug/
 Source0:        
https://github.com/arximboldi/zug/archive/refs/tags/v%{version}.tar.gz#/%{name}-%{version}.tar.gz
-# https://github.com/arximboldi/zug/issues/45
-Patch0:         zug-gcc15.patch
 BuildRequires:  boost-devel
-BuildRequires:  cmake
+BuildRequires:  cmake >= 3.10
 BuildRequires:  gcc-c++
 # includes catch2/catch.hpp
 BuildRequires:  cmake(Catch2) < 3.0

++++++ zug-0.1.1.tar.gz -> zug-0.1.2.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/zug-0.1.1/.dir-locals.el new/zug-0.1.2/.dir-locals.el
--- old/zug-0.1.1/.dir-locals.el        2023-10-15 14:49:36.000000000 +0200
+++ new/zug-0.1.2/.dir-locals.el        2026-01-13 17:46:26.000000000 +0100
@@ -1,8 +1,12 @@
-((nil .
-      ((indent-tabs-mode . nil)
-       (show-trailing-whitespace . t)
-       (fill-column . 80)))
- (c-mode .
-         ((mode . c++)))
- (c++-mode .
-          ((eval add-hook 'before-save-hook #'clang-format-buffer nil t))))
+((nil
+  . ((indent-tabs-mode . nil)
+     (show-trailing-whitespace . t)
+     (fill-column . 80)))
+ (c-mode
+  . ((mode . c++)))
+ (c++-mode
+  . ((eval add-hook 'before-save-hook #'clang-format-buffer nil t)))
+ (nix-mode
+  . ((mode . nixfmt-on-save)))
+ (cmake-mode
+  . ((eval add-hook 'before-save-hook #'cmake-format-buffer nil t))))
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/zug-0.1.1/.envrc new/zug-0.1.2/.envrc
--- old/zug-0.1.1/.envrc        1970-01-01 01:00:00.000000000 +0100
+++ new/zug-0.1.2/.envrc        2026-01-13 17:46:26.000000000 +0100
@@ -0,0 +1,2 @@
+DEV_SHELL=${DEV_SHELL:-default}
+use flake ".#${DEV_SHELL}"
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/zug-0.1.1/.github/workflows/test.yml 
new/zug-0.1.2/.github/workflows/test.yml
--- old/zug-0.1.1/.github/workflows/test.yml    2023-10-15 14:49:36.000000000 
+0200
+++ new/zug-0.1.2/.github/workflows/test.yml    2026-01-13 17:46:26.000000000 
+0100
@@ -1,14 +1,42 @@
 name: test
 on: [push, pull_request]
 jobs:
-  build:
+
+  nix-matrix:
     runs-on: ubuntu-latest
+    outputs:
+      matrix: ${{ steps.set-matrix.outputs.matrix }}
     steps:
-      - uses: actions/checkout@v2
-      - uses: cachix/install-nix-action@v22
+      - uses: actions/checkout@v4
+      - uses: cachix/install-nix-action@v31
+      - id: set-matrix
+        name: Generate Nix Matrix
+        run: |
+          set -Eeu
+          matrix="$(nix eval --json '.#githubActions.matrix')"
+          echo "matrix=$matrix" >> "$GITHUB_OUTPUT"
+
+  build-nix:
+    name: "nix: ${{ matrix.name }} (${{ matrix.system }})"
+    needs: nix-matrix
+    runs-on: ${{ matrix.os }}
+    strategy:
+      matrix: ${{fromJSON(needs.nix-matrix.outputs.matrix)}}
+    steps:
+      - uses: actions/checkout@v4
+      - uses: cachix/install-nix-action@v31
+      - uses: cachix/cachix-action@v16
         with:
-          nix_path: nixpkgs=channel:nixos-unstable
-      - uses: cachix/cachix-action@v12
+          name: arximboldi
+          signingKey: '${{ secrets.CACHIX_SIGNING_KEY }}'
+      - run: nix build -L '.#${{ matrix.attr }}'
+
+  build-nix-compat:
+    runs-on: ubuntu-latest
+    steps:
+      - uses: actions/checkout@v4
+      - uses: cachix/install-nix-action@v31
+      - uses: cachix/cachix-action@v15
         with:
           name: arximboldi
           signingKey: '${{ secrets.CACHIX_SIGNING_KEY }}'
@@ -17,55 +45,43 @@
   docs:
     runs-on: ubuntu-latest
     steps:
-      - uses: actions/checkout@v2
+      - uses: actions/checkout@v4
         with:
           submodules: true
-      - uses: cachix/install-nix-action@v22
-        with:
-          nix_path: nixpkgs=channel:nixos-unstable
-      - uses: cachix/cachix-action@v12
+      - uses: cachix/install-nix-action@v31
+      - uses: cachix/cachix-action@v15
         with:
           name: arximboldi
           signingKey: '${{ secrets.CACHIX_SIGNING_KEY }}'
-      - run: nix-shell --run "mkdir build"
-      - run: nix-shell --run "cd build && cmake .."
-      - run: nix-shell --run "cd build && make docs"
+      - run: nix develop --command cmake -B build
+      - run: nix develop --command cmake --build build --target docs
       - uses: shimataro/ssh-key-action@v2
-        if: github.ref == 'refs/heads/master'
+        if: github.ref == 'refs/heads/master' && github.repository_owner == 
'arximboldi'
         with:
           key: ${{ secrets.SINUSOIDES_SSH_KEY }}
           known_hosts: ${{ secrets.SINUSOIDES_KNOWN_HOSTS }}
-      - run: nix-shell --run "cd build && make upload-docs"
-        if: github.ref == 'refs/heads/master'
+      - run: nix develop --command make -C build upload-docs
+        if: github.ref == 'refs/heads/master' && github.repository_owner == 
'arximboldi'
 
   check:
     strategy:
       matrix:
         type: [Debug, Release]
-        compiler: [gcc, clang]
+        toolchain: [gnu, llvm]
         opts: [[]]
         include:
           - type: Debug
-            compiler: gcc
+            toolchain: gnu
             opts: ['coverage']
     runs-on: ubuntu-latest
     steps:
-      - uses: actions/checkout@v2
-      - uses: cachix/install-nix-action@v22
-        with:
-          nix_path: nixpkgs=channel:nixos-unstable
-      - uses: cachix/cachix-action@v12
+      - uses: actions/checkout@v4
+      - uses: cachix/install-nix-action@v31
+      - uses: cachix/cachix-action@v15
         with:
           name: arximboldi
           signingKey: '${{ secrets.CACHIX_SIGNING_KEY }}'
-      - run: nix-shell --argstr compiler ${{ matrix.compiler }} --run "mkdir 
build"
-      - name: configure cmake
-        run: |
-          nix-shell --argstr compiler ${{ matrix.compiler }} --run "
-            cd build && cmake .. \
-              -DCMAKE_BUILD_TYPE=${{ matrix.type }} \
-              -DENABLE_COVERAGE=${{ contains(matrix.opts, 'coverage') }}
-          "
-      - run: nix-shell --argstr compiler ${{ matrix.compiler }} --run "cd 
build && make check -j`nproc`"
-      - run: nix-shell --argstr compiler ${{ matrix.compiler }} --run "bash 
<(curl -s https://codecov.io/bash)"
+      - run: nix develop .#${{ matrix.toolchain }} --command cmake -B build 
-DCMAKE_BUILD_TYPE=${{ matrix.type }} -DENABLE_COVERAGE=${{ 
contains(matrix.opts, 'coverage') }}
+      - run: nix develop .#${{ matrix.toolchain }} --command cmake --build 
build --target check -- -j$(nproc)
+      - run: nix develop .#${{ matrix.toolchain }} --command bash -c "cd build 
&& bash <(curl -s https://codecov.io/bash)"
         if: ${{ contains(matrix.opts, 'coverage') }}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/zug-0.1.1/.gitignore new/zug-0.1.2/.gitignore
--- old/zug-0.1.1/.gitignore    2023-10-15 14:49:36.000000000 +0200
+++ new/zug-0.1.2/.gitignore    2026-01-13 17:46:26.000000000 +0100
@@ -5,3 +5,4 @@
 doc/_build
 doc/_doxygen
 tools/travis/ssh-key
+.direnv/
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/zug-0.1.1/CMakeLists.txt new/zug-0.1.2/CMakeLists.txt
--- old/zug-0.1.1/CMakeLists.txt        2023-10-15 14:49:36.000000000 +0200
+++ new/zug-0.1.2/CMakeLists.txt        2026-01-13 17:46:26.000000000 +0100
@@ -1,15 +1,17 @@
-cmake_minimum_required(VERSION 3.8)
+cmake_minimum_required(VERSION 3.10)
 cmake_policy(SET CMP0048 NEW) # enable project VERSION
 cmake_policy(SET CMP0056 NEW) # honor link flags in try_compile()
 list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/cmake")
 
 project(zug VERSION 0.1.0)
 
-set(CMAKE_CXX_STANDARD 14)
+if(NOT CMAKE_CXX_STANDARD)
+  set(CMAKE_CXX_STANDARD 14)
+endif()
 set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall")
 set(CMAKE_EXPORT_COMPILE_COMMANDS on)
 set(CMAKE_CXX_EXTENSIONS off)
-if ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang")
+if("${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang")
   set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Qunused-arguments")
 endif()
 
@@ -21,16 +23,16 @@
 option(zug_BUILD_EXAMPLES "Build examples" ON)
 option(zug_BUILD_DOCS "Build docs" ON)
 
-if (NOT MSVC AND NOT DISABLE_WERROR)
+if(NOT MSVC AND NOT DISABLE_WERROR)
   set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Werror")
 endif()
 
-#  Targets
-#  =======
+# Targets
+# =======
 
 # ccache support
 find_program(CCACHE ccache)
-if (CCACHE)
+if(CCACHE)
   message(STATUS "Using ccache: ${CCACHE}")
   set_property(GLOBAL PROPERTY RULE_LAUNCH_COMPILE ${CCACHE})
   set_property(GLOBAL PROPERTY RULE_LAUNCH_LINK ${CCACHE})
@@ -40,17 +42,19 @@
 
 # the library
 add_library(zug INTERFACE)
-target_include_directories(zug INTERFACE
-  $<BUILD_INTERFACE:${zug_BINARY_DIR}/>
-  $<BUILD_INTERFACE:${zug_SOURCE_DIR}/>
-  $<INSTALL_INTERFACE:${CMAKE_INSTALL_INCLUDEDIR}>)
+target_include_directories(
+  zug
+  INTERFACE $<BUILD_INTERFACE:${zug_BINARY_DIR}/>
+            $<BUILD_INTERFACE:${zug_SOURCE_DIR}/>
+            $<INSTALL_INTERFACE:${CMAKE_INSTALL_INCLUDEDIR}>)
 
 install(TARGETS zug EXPORT ZugConfig)
 install(EXPORT ZugConfig DESTINATION "${CMAKE_INSTALL_LIBDIR}/cmake/Zug")
 install(DIRECTORY zug DESTINATION "${CMAKE_INSTALL_INCLUDEDIR}")
 
 enable_testing()
-add_custom_target(check
+add_custom_target(
+  check
   COMMAND ${CMAKE_CTEST_COMMAND} --output-on-failure
   WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
   COMMENT "Build and run all the tests and examples.")
@@ -61,7 +65,7 @@
 
   add_library(zug-dev INTERFACE)
   target_link_libraries(zug-dev INTERFACE zug)
-  if (ENABLE_COVERAGE)
+  if(ENABLE_COVERAGE)
     target_compile_options(zug-dev INTERFACE "--coverage")
     target_link_libraries(zug-dev INTERFACE "--coverage")
   endif()
@@ -73,6 +77,6 @@
   add_subdirectory(example)
 endif()
 
-if (zug_BUILD_DOCS)
+if(zug_BUILD_DOCS)
   add_subdirectory(doc)
 endif()
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/zug-0.1.1/README.rst new/zug-0.1.2/README.rst
--- old/zug-0.1.1/README.rst    2023-10-15 14:49:36.000000000 +0200
+++ new/zug-0.1.2/README.rst    2026-01-13 17:46:26.000000000 +0100
@@ -111,7 +111,7 @@
 Why?
 ----
 
-You have learn Sean Parent's lesson: `No Raw Loops
+You have learned Sean Parent's lesson: `No Raw Loops
 <https://www.youtube.com/watch?v=W2tWOdzgXHA>`_. Instead of iterating over
 sequences directly, you use STL algoriths like `transform`_, `filter`_, etc, or
 even better, the new `ranges`_ library.
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/zug-0.1.1/default.nix new/zug-0.1.2/default.nix
--- old/zug-0.1.1/default.nix   2023-10-15 14:49:36.000000000 +0200
+++ new/zug-0.1.2/default.nix   2026-01-13 17:46:26.000000000 +0100
@@ -1,26 +1,21 @@
-with import <nixpkgs> {};
+{
+  flake ? import ./nix/flake-compat.nix { },
+  pkgs ? import flake.inputs.nixpkgs { },
+}:
 
-stdenv.mkDerivation rec {
-  name = "zug-git";
-  version = "git";
-  src = builtins.filterSource (path: type:
-            baseNameOf path != ".git" &&
-            baseNameOf path != "build" &&
-            baseNameOf path != "_build" &&
-            baseNameOf path != "reports" &&
-            baseNameOf path != "tools")
-            ./.;
-  buildInputs = [
-    cmake
-    boost
-  ];
-  cmakeFlags = [
-    "-Dzug_BUILD_TESTS=OFF"
-    "-Dzug_BUILD_EXAMPLES=OFF"
-  ];
-  meta = with lib; {
-    homepage    = "https://github.com/arximboldi/zug";;
-    description = "library for functional interactive c++ programs";
-    license     = licenses.boost;
-  };
-}
+let
+  inherit (pkgs) lib;
+  inherit (import flake.inputs.gitignore { inherit lib; })
+    gitignoreSource
+    ;
+
+  nixFilter = name: type: !(lib.hasSuffix ".nix" name);
+  srcFilter =
+    src:
+    lib.cleanSourceWith {
+      filter = nixFilter;
+      src = gitignoreSource src;
+    };
+
+in
+pkgs.callPackage ./nix/zug.nix { sources = srcFilter ./.; }
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/zug-0.1.1/doc/CMakeLists.txt 
new/zug-0.1.2/doc/CMakeLists.txt
--- old/zug-0.1.1/doc/CMakeLists.txt    2023-10-15 14:49:36.000000000 +0200
+++ new/zug-0.1.2/doc/CMakeLists.txt    2026-01-13 17:46:26.000000000 +0100
@@ -11,13 +11,7 @@
   WORKING_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}")
 add_dependencies(docs doxygen)
 
-set(zug_ssh_method
-  ssh -p 5488
-      -o StrictHostKeyChecking=no
-      -i ${CMAKE_SOURCE_DIR}/tools/travis/ssh-key)
-
 add_custom_target(upload-docs
   COMMAND
-  rsync -av -e \"${zug_ssh_method}\"
-        ${CMAKE_CURRENT_SOURCE_DIR}/_build/html/*
-        [email protected]:public/zug/)
+  rsync -av ${CMAKE_CURRENT_SOURCE_DIR}/_build/html/*
+        [email protected]:/var/lib/syncthing/public/zug/)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/zug-0.1.1/flake.lock new/zug-0.1.2/flake.lock
--- old/zug-0.1.1/flake.lock    1970-01-01 01:00:00.000000000 +0100
+++ new/zug-0.1.2/flake.lock    2026-01-13 17:46:26.000000000 +0100
@@ -0,0 +1,103 @@
+{
+  "nodes": {
+    "flake-utils": {
+      "inputs": {
+        "systems": "systems"
+      },
+      "locked": {
+        "lastModified": 1731533236,
+        "narHash": "sha256-l0KFg5HjrsfsO/JpG+r7fRrqm12kzFHyUHqHCVpMMbI=",
+        "owner": "numtide",
+        "repo": "flake-utils",
+        "rev": "11707dc2f618dd54ca8739b309ec4fc024de578b",
+        "type": "github"
+      },
+      "original": {
+        "owner": "numtide",
+        "repo": "flake-utils",
+        "type": "github"
+      }
+    },
+    "gitignore": {
+      "inputs": {
+        "nixpkgs": [
+          "nixpkgs"
+        ]
+      },
+      "locked": {
+        "lastModified": 1762808025,
+        "narHash": "sha256-XmjITeZNMTQXGhhww6ed/Wacy2KzD6svioyCX7pkUu4=",
+        "owner": "hercules-ci",
+        "repo": "gitignore.nix",
+        "rev": "cb5e3fdca1de58ccbc3ef53de65bd372b48f567c",
+        "type": "github"
+      },
+      "original": {
+        "owner": "hercules-ci",
+        "repo": "gitignore.nix",
+        "type": "github"
+      }
+    },
+    "nix-github-actions": {
+      "inputs": {
+        "nixpkgs": [
+          "nixpkgs"
+        ]
+      },
+      "locked": {
+        "lastModified": 1737420293,
+        "narHash": "sha256-F1G5ifvqTpJq7fdkT34e/Jy9VCyzd5XfJ9TO8fHhJWE=",
+        "owner": "nix-community",
+        "repo": "nix-github-actions",
+        "rev": "f4158fa080ef4503c8f4c820967d946c2af31ec9",
+        "type": "github"
+      },
+      "original": {
+        "owner": "nix-community",
+        "repo": "nix-github-actions",
+        "type": "github"
+      }
+    },
+    "nixpkgs": {
+      "locked": {
+        "lastModified": 1768028080,
+        "narHash": "sha256-50aDK+8eLvsLK39TzQhKNq50/HcXyP4hyxOYoPoVxjo=",
+        "owner": "NixOS",
+        "repo": "nixpkgs",
+        "rev": "d03088749a110d52a4739348f39a63f84bb0be14",
+        "type": "github"
+      },
+      "original": {
+        "owner": "NixOS",
+        "ref": "nixos-25.11",
+        "repo": "nixpkgs",
+        "type": "github"
+      }
+    },
+    "root": {
+      "inputs": {
+        "flake-utils": "flake-utils",
+        "gitignore": "gitignore",
+        "nix-github-actions": "nix-github-actions",
+        "nixpkgs": "nixpkgs"
+      }
+    },
+    "systems": {
+      "locked": {
+        "lastModified": 1681028828,
+        "narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=",
+        "owner": "nix-systems",
+        "repo": "default",
+        "rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e",
+        "type": "github"
+      },
+      "original": {
+        "owner": "nix-systems",
+        "repo": "default",
+        "type": "github"
+      }
+    }
+  },
+  "root": "root",
+  "version": 7
+}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/zug-0.1.1/flake.nix new/zug-0.1.2/flake.nix
--- old/zug-0.1.1/flake.nix     1970-01-01 01:00:00.000000000 +0100
+++ new/zug-0.1.2/flake.nix     2026-01-13 17:46:26.000000000 +0100
@@ -0,0 +1,74 @@
+{
+  inputs = {
+    nixpkgs.url = "github:NixOS/nixpkgs/nixos-25.11";
+    flake-utils.url = "github:numtide/flake-utils";
+    nix-github-actions = {
+      url = "github:nix-community/nix-github-actions";
+      inputs.nixpkgs.follows = "nixpkgs";
+    };
+    gitignore = {
+      url = "github:hercules-ci/gitignore.nix";
+      inputs.nixpkgs.follows = "nixpkgs";
+    };
+  };
+
+  outputs =
+    {
+      self,
+      nixpkgs,
+      flake-utils,
+      gitignore,
+      nix-github-actions,
+    }:
+    {
+      githubActions = nix-github-actions.lib.mkGithubMatrix {
+        checks = nixpkgs.lib.getAttrs [
+          "x86_64-linux"
+          "aarch64-linux"
+          # "x86_64-darwin" not supported by GH Actions runners anymore
+          "aarch64-darwin"
+        ] self.checks;
+      };
+    }
+    // flake-utils.lib.eachDefaultSystem (
+      system:
+      let
+        pkgs = nixpkgs.legacyPackages.${system};
+        lib = nixpkgs.lib;
+
+        toolchains = [
+          "gnu"
+          "llvm"
+        ];
+      in
+      {
+        packages = {
+          default = pkgs.callPackage ./nix/zug.nix { sources = ./.; };
+
+          zug = pkgs.callPackage ./nix/zug.nix { sources = ./.; };
+
+          tests = pkgs.callPackage ./nix/zug.nix {
+            sources = ./.;
+            withTests = true;
+            withExamples = true;
+          };
+
+          tests-debug = pkgs.callPackage ./nix/zug.nix {
+            sources = ./.;
+            withTests = true;
+            withExamples = true;
+            withDebug = true;
+          };
+        };
+
+        devShells = {
+          default = pkgs.callPackage ./shell.nix { };
+        }
+        // lib.attrsets.genAttrs toolchains (
+          toolchain: pkgs.callPackage ./shell.nix { inherit toolchain; }
+        );
+
+        checks = self.packages.${system};
+      }
+    );
+}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/zug-0.1.1/nix/choose-stdenv.nix 
new/zug-0.1.2/nix/choose-stdenv.nix
--- old/zug-0.1.1/nix/choose-stdenv.nix 1970-01-01 01:00:00.000000000 +0100
+++ new/zug-0.1.2/nix/choose-stdenv.nix 2026-01-13 17:46:26.000000000 +0100
@@ -0,0 +1,30 @@
+{
+  pkgs,
+  toolchain ? "",
+}:
+
+#
+# `toolchain` is a string of the form "gnu-X" or "llvm-Y", empty for default.
+#
+# gnu => gccStdenv
+# llvm => llvmPackages.libcxxStdenv
+#
+
+if toolchain == "" then
+  pkgs.stdenv
+else if toolchain == "gnu" then
+  pkgs.gccStdenv
+else if toolchain == "llvm" then
+  pkgs.llvmPackages_latest.libcxxStdenv
+else
+  let
+    parts = builtins.split "-" toolchain;
+    compiler = builtins.elemAt parts 0;
+    version = builtins.elemAt parts 2;
+  in
+  if compiler == "gnu" then
+    pkgs."gcc${version}Stdenv"
+  else if compiler == "llvm" then
+    pkgs."llvmPackages_${version}".libcxxStdenv
+  else
+    abort "unknown toolchain: ${toolchain}"
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/zug-0.1.1/nix/docs.nix new/zug-0.1.2/nix/docs.nix
--- old/zug-0.1.1/nix/docs.nix  2023-10-15 14:49:36.000000000 +0200
+++ new/zug-0.1.2/nix/docs.nix  2026-01-13 17:46:26.000000000 +0100
@@ -1,27 +1,53 @@
-{ nixpkgs ? <nixpkgs>}:
+{
+  stdenv,
+  fetchFromGitHub,
+  lib,
+}:
 
-with import nixpkgs {};
+let
+  # For the documentation tools we use an older Nixpkgs since the
+  # newer versions seem to be not working great...
+  pkgs = import (fetchFromGitHub {
+    owner = "NixOS";
+    repo = "nixpkgs";
+    rev = "d0d905668c010b65795b57afdf7f0360aac6245b";
+    sha256 = "1kqxfmsik1s1jsmim20n5l4kq6wq8743h5h17igfxxbbwwqry88l";
+  }) { inherit (stdenv.hostPlatform) system; };
 
+in
 rec {
-  breathe = with python27Packages; buildPythonPackage rec {
-    version = "git-arximboldi-${commit}";
-    pname = "breathe";
-    name = "${pname}-${version}";
-    commit = "5074aecb5ad37bb70f50216eaa01d03a375801ec";
-    src = fetchFromGitHub {
-      owner = "arximboldi";
-      repo = "breathe";
-      rev = commit;
-      sha256 = "10kkh3wb0ggyxx1a7x50aklhhw0cq269g3jddf2gb3pv9gpbj7sa";
+  breathe =
+    with pkgs.python27Packages;
+    buildPythonPackage rec {
+      version = "git-arximboldi-${commit}";
+      pname = "breathe";
+      name = "${pname}-${version}";
+      commit = "5074aecb5ad37bb70f50216eaa01d03a375801ec";
+      src = pkgs.fetchFromGitHub {
+        owner = "arximboldi";
+        repo = "breathe";
+        rev = commit;
+        sha256 = "10kkh3wb0ggyxx1a7x50aklhhw0cq269g3jddf2gb3pv9gpbj7sa";
+      };
+      propagatedBuildInputs = [
+        docutils
+        sphinx
+      ];
+      meta = with lib; {
+        homepage = "https://github.com/michaeljones/breathe";;
+        license = licenses.bsd3;
+        description = "Sphinx Doxygen renderer";
+        inherit (sphinx.meta) platforms;
+      };
     };
-    propagatedBuildInputs = [ docutils sphinx ];
-    meta = with stdenv.lib; {
-      homepage = https://github.com/michaeljones/breathe;
-      license = licenses.bsd3;
-      description = "Sphinx Doxygen renderer";
-      inherit (sphinx.meta) platforms;
-    };
-  };
 
-  recommonmark = python27Packages.recommonmark;
+  recommonmark = pkgs.python27Packages.recommonmark;
+
+  doxygen = pkgs.doxygen;
+
+  python = pkgs.python.withPackages (ps: [
+    ps.sphinx
+    breathe
+    recommonmark
+  ]);
 }
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/zug-0.1.1/nix/flake-compat.nix 
new/zug-0.1.2/nix/flake-compat.nix
--- old/zug-0.1.1/nix/flake-compat.nix  1970-01-01 01:00:00.000000000 +0100
+++ new/zug-0.1.2/nix/flake-compat.nix  2026-01-13 17:46:26.000000000 +0100
@@ -0,0 +1,22 @@
+# Minimal Nix flake compatibility layer. It doesn't support all flake
+# features and versions, but supports enough for this repository's
+# flake usage. Alternatively one may use:
+#
+#   https://github.com/NixOS/flake-compat
+#
+# I prefer to have a minimal implementation here that doesn't require
+# fetching third party code and can be easily copy-pasted and modified
+# if needed.
+{
+  flakeLock ? ../flake.lock,
+}:
+let
+  lock = builtins.fromJSON (builtins.readFile flakeLock);
+  fetchNode = name: node: builtins.fetchTree node.locked;
+  inputs = builtins.mapAttrs fetchNode lock.nodes;
+  flake = import inputs.root { inherit inputs; };
+  outputs = flake.outputs inputs;
+in
+{
+  inherit flake inputs outputs;
+}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/zug-0.1.1/nix/zug.nix new/zug-0.1.2/nix/zug.nix
--- old/zug-0.1.1/nix/zug.nix   1970-01-01 01:00:00.000000000 +0100
+++ new/zug-0.1.2/nix/zug.nix   2026-01-13 17:46:26.000000000 +0100
@@ -0,0 +1,75 @@
+{
+  lib,
+  stdenv,
+  fetchFromGitHub,
+  cmake,
+  ninja,
+  boost,
+  catch2,
+  sources ? ../.,
+  withTests ? false,
+  withExamples ? false,
+  withDocs ? false,
+  withDebug ? false,
+  withCoverage ? false,
+}:
+
+let
+  docs = import ./docs.nix {
+    inherit
+      lib
+      stdenv
+      fetchFromGitHub
+      ;
+  };
+in
+stdenv.mkDerivation {
+  name = builtins.concatStringsSep "-" (
+    [ "zug" ]
+    ++ lib.optionals withDebug [ "debug" ]
+    ++ lib.optionals withTests [ "tests" ]
+    ++ lib.optionals withExamples [ "examples" ]
+    ++ lib.optionals withDocs [ "docs" ]
+    ++ lib.optionals withCoverage [ "coverage" ]
+  );
+  version = "git";
+
+  src = sources;
+
+  nativeBuildInputs = [
+    cmake
+    ninja
+  ];
+
+  buildInputs = [
+    boost
+  ]
+  ++ lib.optionals withTests [ catch2 ]
+  ++ lib.optionals withDocs [
+    docs.doxygen
+    docs.python
+  ];
+
+  dontUseCmakeBuildDir = true;
+
+  cmakeBuildType = if withDebug then "Debug" else "Release";
+
+  cmakeFlags = [
+    (lib.cmakeBool "zug_BUILD_TESTS" withTests)
+    (lib.cmakeBool "zug_BUILD_EXAMPLES" withExamples)
+    (lib.cmakeBool "zug_BUILD_DOCS" withDocs)
+    (lib.cmakeBool "ENABLE_COVERAGE" withCoverage)
+  ];
+
+  # Build test targets before running them
+  ninjaFlags = lib.optionals withTests [ "tests" ] ++ lib.optionals 
withExamples [ "examples" ];
+
+  doCheck = withTests;
+  checkTarget = "check";
+
+  meta = {
+    homepage = "https://github.com/arximboldi/zug";;
+    description = "Transducers for C++";
+    license = lib.licenses.boost;
+  };
+}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/zug-0.1.1/shell.nix new/zug-0.1.2/shell.nix
--- old/zug-0.1.1/shell.nix     2023-10-15 14:49:36.000000000 +0200
+++ new/zug-0.1.2/shell.nix     2026-01-13 17:46:26.000000000 +0100
@@ -1,51 +1,31 @@
-{ compiler ? "",
-  nixpkgs ? (import <nixpkgs> {}).fetchFromGitHub {
-    owner  = "NixOS";
-    repo   = "nixpkgs";
-    rev    = "31cd1b4afbaf0b1e81272ee9c31d1ab606503aed";
-    sha256 = "1hd48vkdrj8rgihrkjfhr3amqlf3phjshqyylslb836n6vlp18pp";
-  }}:
+{
+  flake ? import ./nix/flake-compat.nix { },
+  pkgs ? import flake.inputs.nixpkgs { },
+  toolchain ? "",
+  ...
+}@args:
+let
+  lib = pkgs.lib;
 
-with import nixpkgs {};
+  toolchain-stdenv = pkgs.callPackage ./nix/choose-stdenv.nix {
+    inherit toolchain;
+  };
+  stdenv = toolchain-stdenv;
 
-let
-  # For the documentation tools we use an older Nixpkgs since the
-  # newer versions seem to be not working great...
-  old-nixpkgs-src = fetchFromGitHub {
-                      owner  = "NixOS";
-                      repo   = "nixpkgs";
-                      rev    = "d0d905668c010b65795b57afdf7f0360aac6245b";
-                      sha256 = 
"1kqxfmsik1s1jsmim20n5l4kq6wq8743h5h17igfxxbbwwqry88l";
-                    };
-  old-nixpkgs     = import old-nixpkgs-src {};
-  docs            = import ./nix/docs.nix { nixpkgs = old-nixpkgs-src; };
-  compiler-pkg    = if compiler != ""
-                    then pkgs.${compiler}
-                    else stdenv.cc;
-  the-stdenv      = if compiler-pkg.isClang
-                    then clangStdenv
-                    else stdenv;
+  zug = pkgs.callPackage ./nix/zug.nix {
+    inherit stdenv;
+    withTests = true;
+    withExamples = true;
+    withDocs = stdenv.isLinux;
+  };
 
 in
-
-the-stdenv.mkDerivation rec {
-  name = "zug-env";
-  buildInputs = [
-    cmake
-    boost
-    catch2
-    ccache
-    old-nixpkgs.doxygen
-    (old-nixpkgs.python.withPackages (ps: [
-      ps.sphinx
-      docs.breathe
-      docs.recommonmark
-    ]))
-  ];
-  shellHook = ''
-    export ZUG_ROOT=`dirname ${toString ./shell.nix}`
-    addToSearchPath PATH "$ZUG_ROOT/build"
-    addToSearchPath PATH "$ZUG_ROOT/build/example"
-    addToSearchPath PATH "$ZUG_ROOT/build/test"
-  '';
+pkgs.mkShell.override { stdenv = toolchain-stdenv; } {
+  inputsFrom = [ zug ];
+  packages =
+    with pkgs;
+    [ ccache ]
+    ++ lib.optionals toolchain-stdenv.cc.isClang [ lldb ]
+    ++ lib.optionals toolchain-stdenv.cc.isGNU [ gdb ];
+  hardeningDisable = [ "fortify" ];
 }
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/zug-0.1.1/test/compose.cpp 
new/zug-0.1.2/test/compose.cpp
--- old/zug-0.1.1/test/compose.cpp      2023-10-15 14:49:36.000000000 +0200
+++ new/zug-0.1.2/test/compose.cpp      2026-01-13 17:46:26.000000000 +0100
@@ -46,7 +46,11 @@
 {
     static_assert(
         std::is_same<
+#if __cplusplus >= 201703L
+            std::invoke_result_t<decltype(comp(add_one, fst)), std::array<int, 
4>>,
+#else
             std::result_of_t<decltype(comp(add_one, fst))(std::array<int, 4>)>,
+#endif
             int>::value,
         "comp should support transformation from array to int");
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/zug-0.1.1/test/transducer/random_sample.cpp 
new/zug-0.1.2/test/transducer/random_sample.cpp
--- old/zug-0.1.1/test/transducer/random_sample.cpp     2023-10-15 
14:49:36.000000000 +0200
+++ new/zug-0.1.2/test/transducer/random_sample.cpp     2026-01-13 
17:46:26.000000000 +0100
@@ -13,6 +13,8 @@
 
 struct deterministic_engine
 {
+    using result_type = std::uint64_t;
+
     std::uint64_t count = 0;
 
     constexpr static std::uint64_t max()
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/zug-0.1.1/zug/any_state.hpp 
new/zug-0.1.2/zug/any_state.hpp
--- old/zug-0.1.1/zug/any_state.hpp     2023-10-15 14:49:36.000000000 +0200
+++ new/zug-0.1.2/zug/any_state.hpp     2026-01-13 17:46:26.000000000 +0100
@@ -13,6 +13,7 @@
 
 #include <stdexcept>
 #include <string>
+#include <typeinfo>
 
 #if ZUG_TRACE_ANY_STATE_ALLOC
 #include <iostream>
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/zug-0.1.1/zug/detail/iterator_facade.hpp 
new/zug-0.1.2/zug/detail/iterator_facade.hpp
--- old/zug-0.1.1/zug/detail/iterator_facade.hpp        2023-10-15 
14:49:36.000000000 +0200
+++ new/zug-0.1.2/zug/detail/iterator_facade.hpp        2026-01-13 
17:46:26.000000000 +0100
@@ -116,14 +116,16 @@
         return derived() + n;
     }
 
-    bool operator==(const DerivedT& rhs) const
+    friend bool operator==(const DerivedT& lhs, const DerivedT& rhs)
     {
-        return access_t::equal(derived(), rhs);
+        return access_t::equal(lhs, rhs);
     }
-    bool operator!=(const DerivedT& rhs) const
+#if __cplusplus < 202002L
+    friend bool operator!=(const DerivedT& lhs, const DerivedT& rhs)
     {
-        return !access_t::equal(derived(), rhs);
+        return !access_t::equal(lhs, rhs);
     }
+#endif
 
     DerivedT& operator++()
     {
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/zug-0.1.1/zug/reductor.hpp 
new/zug-0.1.2/zug/reductor.hpp
--- old/zug-0.1.1/zug/reductor.hpp      2023-10-15 14:49:36.000000000 +0200
+++ new/zug-0.1.2/zug/reductor.hpp      2026-01-13 17:46:26.000000000 +0100
@@ -118,12 +118,20 @@
 template <typename ReducingFnT, typename InitialStateT, typename... InputTs>
 struct reductor
     : reductor_base<ReducingFnT,
+#if __cplusplus >= 201703L
+                    std::invoke_result_t<ReducingFnT, InitialStateT, 
InputTs...>,
+#else
                     std::result_of_t<ReducingFnT(InitialStateT, InputTs...)>,
+#endif
                     InputTs...>
 {
     using base_t =
         reductor_base<ReducingFnT,
+#if __cplusplus >= 201703L
+                      std::invoke_result_t<ReducingFnT, InitialStateT, 
InputTs...>,
+#else
                       std::result_of_t<ReducingFnT(InitialStateT, InputTs...)>,
+#endif
                       InputTs...>;
 
     template <typename ReducingFnT2,
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/zug-0.1.1/zug/sequence.hpp 
new/zug-0.1.2/zug/sequence.hpp
--- old/zug-0.1.1/zug/sequence.hpp      2023-10-15 14:49:36.000000000 +0200
+++ new/zug-0.1.2/zug/sequence.hpp      2026-01-13 17:46:26.000000000 +0100
@@ -46,7 +46,11 @@
     };
 
     using reductor_t =
+#if __cplusplus >= 201703L
+        empty_reductor<std::decay_t<std::invoke_result_t<XformT, step_t>>, 
state_t>;
+#else
         empty_reductor<std::decay_t<std::result_of_t<XformT(step_t)>>, 
state_t>;
+#endif
 
     sequence_data(const XformT& xform)
         : impl_{std::size_t{}, cache_t{}, reductor_t{xform(step_t{}), this}}
@@ -72,7 +76,7 @@
 
     sequence_data& operator=(sequence_data&& other)
     {
-        impl_ = std::move(other.impl);
+        impl_ = std::move(other.impl_);
         impl_.reductor.current(this);
     }
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/zug-0.1.1/zug/transducer/eager.hpp 
new/zug-0.1.2/zug/transducer/eager.hpp
--- old/zug-0.1.1/zug/transducer/eager.hpp      2023-10-15 14:49:36.000000000 
+0200
+++ new/zug-0.1.2/zug/transducer/eager.hpp      2026-01-13 17:46:26.000000000 
+0100
@@ -15,6 +15,7 @@
 #include <zug/state_wrapper.hpp>
 #include <zug/util.hpp>
 
+#include <algorithm>
 #include <vector>
 
 namespace zug {
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/zug-0.1.1/zug/transducer/transducer.hpp 
new/zug-0.1.2/zug/transducer/transducer.hpp
--- old/zug-0.1.1/zug/transducer/transducer.hpp 2023-10-15 14:49:36.000000000 
+0200
+++ new/zug-0.1.2/zug/transducer/transducer.hpp 2026-01-13 17:46:26.000000000 
+0100
@@ -179,7 +179,11 @@
             {
                 using xformed_t = typename XformT::result_type;
                 using reduce_t  = std::decay_t<
+#if __cplusplus >= 201703L
+                    std::invoke_result_t<ReducingFnT, StateT, OutputTs...>>;
+#else
                     std::result_of_t<ReducingFnT(StateT, OutputTs...)>>;
+#endif
                 using complete_t = std::decay_t<decltype(
                     state_complete(std::declval<reduce_t>()))>;
                 using tag_t      = detail::transducer_tag<complete_t, 
reduce_t>;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/zug-0.1.1/zug/with_state.hpp 
new/zug-0.1.2/zug/with_state.hpp
--- old/zug-0.1.1/zug/with_state.hpp    2023-10-15 14:49:36.000000000 +0200
+++ new/zug-0.1.2/zug/with_state.hpp    2026-01-13 17:46:26.000000000 +0100
@@ -34,7 +34,11 @@
     -> meta::lazy_enable_if_t<
         !std::is_same<std::decay_t<StateT>,
                       std::decay_t<decltype(state_complete(st))>>::value,
+#if __cplusplus >= 201703L
+        std::invoke_result<WrappedFn, StateT>>
+#else
         std::result_of<WrappedFn(StateT)>>
+#endif
 {
     return std::forward<WrappedFn>(fn)(std::forward<StateT>(st));
 }
@@ -45,7 +49,11 @@
         !std::is_same<std::decay_t<StateT>, any_state>::value &&
             std::is_same<std::decay_t<StateT>,
                          std::decay_t<decltype(state_complete(st))>>::value,
+#if __cplusplus >= 201703L
+        std::invoke_result<UnwrappedFn, StateT>>
+#else
         std::result_of<UnwrappedFn(StateT)>>
+#endif
 {
     return std::forward<UnwrappedFn>(fn)(std::forward<StateT>(st));
 }
@@ -54,9 +62,17 @@
 auto with_state(StateT&& st, UnwrappedFn&& fn1, WrappedFn&& fn2)
     -> meta::lazy_enable_if_t<
         std::is_same<std::decay_t<StateT>, any_state>::value,
+#if __cplusplus >= 201703L
+        std::invoke_result<UnwrappedFn, StateT>>
+#else
         std::result_of<UnwrappedFn(StateT)>>
+#endif
 {
+#if __cplusplus >= 201703L
+    using wrapped_state_t = std::invoke_result_t<UnwrappedFn, StateT>;
+#else
     using wrapped_state_t = std::result_of_t<UnwrappedFn(StateT)>;
+#endif
 
     if (!st.template has<wrapped_state_t>()) {
         return std::forward<UnwrappedFn>(fn1)(std::forward<StateT>(st));

Reply via email to