Unverified Commit 0ddf8d4c authored by Jörg Thalheim's avatar Jörg Thalheim Committed by GitHub
Browse files

nix-serve-ng: 1.0.0-unstable-2024-10-01 -> 1.0.0-unstable-2024-12-02 (#395451)

parents 4cf6b763 84880252
Loading
Loading
Loading
Loading
+6 −7
Original line number Diff line number Diff line
@@ -399,17 +399,16 @@ builtins.intersectAttrs super {
      src = pkgs.fetchFromGitHub {
        repo = "nix-serve-ng";
        owner = "aristanetworks";
        rev = "578ad85b3096d99b25cae0a73c03df4e82f587c7";
        hash = "sha256-2LPx4iRJonX4gtd3r73DBM/ZhN/hKu1lb/MHOav8c5s=";
        rev = "6e8d82a451fccbaa4714da8f7a3db5907bdfa96d";
        hash = "sha256-Ht5wD/n2I/tQWNgYIdmi3UQbm1FNwp9m9JmDjZEd6ng=";
      };
      version = "1.0.0-unstable-2024-10-01";
      version = "1.0.0-unstable-2024-12-02";
      #editedCabalFile = null;
      # Doesn't declare boost dependency
      pkg-configDepends = (old.pkg-configDepends or [ ]) ++ [ pkgs.boost.dev ];
      patches = (old.patches or [ ]) ++ [
        # Part of https://github.com/aristanetworks/nix-serve-ng/pull/40
        ./patches/nix-serve-ng-nix.2.24.patch
      ];
      # error: output '/nix/store/hv6lzj1nlshn8q5lirzgys8f4vgym4hg-nix-serve-ng-1.0.0-unstable-2024-12-02' is not allowed to refer to the following paths:
      #    /nix/store/qza2y18fwkq1wzi02qywf691r42r5jfy-ghc-9.6.6
      broken = pkgs.stdenv.hostPlatform.system == "aarch64-darwin";
    }) super.nix-serve-ng).override
      {
        nix = pkgs.nixVersions.nix_2_24;
+0 −55
Original line number Diff line number Diff line
From 97cb18bee646a23bd08e3959d6544e703e0bb862 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?J=C3=B6rg=20Thalheim?= <joerg@thalheim.io>
Date: Tue, 26 Nov 2024 08:39:30 +0100
Subject: [PATCH] fix build against nix 2.24

---
 cbits/nix.cpp      | 6 +++---
 nix-serve-ng.cabal | 2 +-
 2 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/cbits/nix.cpp b/cbits/nix.cpp
index 8872af1..6305001 100644
--- a/cbits/nix.cpp
+++ b/cbits/nix.cpp
@@ -1,6 +1,7 @@
 #include <cstddef>
 #include <cstdlib>
 #include <nix/store-api.hh>
+#include <nix/shared.hh>
 #include <nix/log-store.hh>
 #include "nix.hh"

@@ -14,8 +15,7 @@ static ref<Store> getStore()
     static std::shared_ptr<Store> _store;

     if (!_store) {
-        initLibStore();
-        loadConfFile();
+        initLibStore(true);

         _store = openStore();
     }
@@ -120,7 +120,7 @@ void queryPathInfo
         output->deriver = emptyString;
     };

-    copyString(validPathInfo->narHash.to_string(Base32, true), &output->narHash);
+    copyString(validPathInfo->narHash.to_string(nix::HashFormat::Nix32, true), &output->narHash);

     output->narSize = validPathInfo->narSize;

diff --git a/nix-serve-ng.cabal b/nix-serve-ng.cabal
index 9298f9a..8443b04 100644
--- a/nix-serve-ng.cabal
+++ b/nix-serve-ng.cabal
@@ -36,7 +36,7 @@ executable nix-serve
     cxx-sources:      cbits/nix.cpp
                     , cbits/nix.hh

-    cxx-options:      -std=c++17
+    cxx-options:      -std=c++20

     build-depends:    base < 5
                     , base16 >= 1.0