about summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--pkgs/applications/science/molecular-dynamics/gromacs/default.nix6
-rw-r--r--pkgs/by-name/ll/llama-cpp/package.nix7
-rw-r--r--pkgs/by-name/ma/maa-assistant-arknights/fastdeploy-ppocr.nix6
-rw-r--r--pkgs/by-name/no/notary/package.nix (renamed from pkgs/tools/security/notary/default.nix)53
-rw-r--r--pkgs/development/libraries/onnxruntime/default.nix5
-rw-r--r--pkgs/development/libraries/science/math/faiss/default.nix5
-rw-r--r--pkgs/development/libraries/science/math/magma/generic.nix12
-rw-r--r--pkgs/development/libraries/science/math/tiny-cuda-nn/default.nix6
-rw-r--r--pkgs/development/tools/dazel/default.nix22
-rw-r--r--pkgs/tools/security/notary/no-git-usage.patch15
-rw-r--r--pkgs/top-level/all-packages.nix4
11 files changed, 61 insertions, 80 deletions
diff --git a/pkgs/applications/science/molecular-dynamics/gromacs/default.nix b/pkgs/applications/science/molecular-dynamics/gromacs/default.nix
index bf2fd1dbf3504..6531002ceb31b 100644
--- a/pkgs/applications/science/molecular-dynamics/gromacs/default.nix
+++ b/pkgs/applications/science/molecular-dynamics/gromacs/default.nix
@@ -24,7 +24,7 @@
 assert enableCuda -> singlePrec;
 
 let
-  inherit (cudaPackages.cudaFlags) cudaCapabilities dropDot;
+  inherit (cudaPackages.flags) cmakeCudaArchitecturesString;
 
   # Select reasonable defaults for all major platforms
   # The possible values are defined in CMakeLists.txt:
@@ -111,10 +111,10 @@ in stdenv.mkDerivation rec {
      ]
   ) ++ lib.optionals enableCuda [
     "-DGMX_GPU=CUDA"
-    (lib.cmakeFeature "CMAKE_CUDA_ARCHITECTURES" (builtins.concatStringsSep ";" (map dropDot cudaCapabilities)))
+    (lib.cmakeFeature "CMAKE_CUDA_ARCHITECTURES" cmakeCudaArchitecturesString)
 
     # Gromacs seems to ignore and override the normal variables, so we add this ad hoc:
-    (lib.cmakeFeature "GMX_CUDA_TARGET_COMPUTE" (builtins.concatStringsSep ";" (map dropDot cudaCapabilities)))
+    (lib.cmakeFeature "GMX_CUDA_TARGET_COMPUTE" cmakeCudaArchitecturesString)
   ];
 
   postInstall = ''
diff --git a/pkgs/by-name/ll/llama-cpp/package.nix b/pkgs/by-name/ll/llama-cpp/package.nix
index 2e5514dd15f29..254f8c2a51f6f 100644
--- a/pkgs/by-name/ll/llama-cpp/package.nix
+++ b/pkgs/by-name/ll/llama-cpp/package.nix
@@ -122,12 +122,7 @@ effectiveStdenv.mkDerivation (finalAttrs: {
     (cmakeBool "LLAMA_VULKAN" vulkanSupport)
   ]
       ++ optionals cudaSupport [
-        (
-          with cudaPackages.flags;
-          cmakeFeature "CMAKE_CUDA_ARCHITECTURES" (
-            builtins.concatStringsSep ";" (map dropDot cudaCapabilities)
-          )
-        )
+        (cmakeFeature "CMAKE_CUDA_ARCHITECTURES" cudaPackages.flags.cmakeCudaArchitecturesString)
       ]
       ++ optionals rocmSupport [
         (cmakeFeature "CMAKE_C_COMPILER" "hipcc")
diff --git a/pkgs/by-name/ma/maa-assistant-arknights/fastdeploy-ppocr.nix b/pkgs/by-name/ma/maa-assistant-arknights/fastdeploy-ppocr.nix
index 53ac9fa3bfc11..77b7e00b06186 100644
--- a/pkgs/by-name/ma/maa-assistant-arknights/fastdeploy-ppocr.nix
+++ b/pkgs/by-name/ma/maa-assistant-arknights/fastdeploy-ppocr.nix
@@ -14,10 +14,6 @@
 
 let
   effectiveStdenv = if cudaSupport then cudaPackages.backendStdenv else inputs.stdenv;
-  cudaCapabilities = cudaPackages.cudaFlags.cudaCapabilities;
-  # E.g. [ "80" "86" "90" ]
-  cudaArchitectures = (builtins.map cudaPackages.cudaFlags.dropDot cudaCapabilities);
-  cudaArchitecturesString = lib.strings.concatStringsSep ";" cudaArchitectures;
 in
 effectiveStdenv.mkDerivation (finalAttrs: {
   pname = "fastdeploy-ppocr";
@@ -65,7 +61,7 @@ effectiveStdenv.mkDerivation (finalAttrs: {
       (lib.cmakeBool "BUILD_SHARED_LIBS" true)
     ]
     ++ lib.optionals cudaSupport [
-      (lib.cmakeFeature "CMAKE_CUDA_ARCHITECTURES" cudaArchitecturesString)
+      (lib.cmakeFeature "CMAKE_CUDA_ARCHITECTURES" cudaPackages.flags.cmakeCudaArchitecturesString)
     ];
 
   postInstall = ''
diff --git a/pkgs/tools/security/notary/default.nix b/pkgs/by-name/no/notary/package.nix
index be147369ffe29..1f35222ee9600 100644
--- a/pkgs/tools/security/notary/default.nix
+++ b/pkgs/by-name/no/notary/package.nix
@@ -1,41 +1,32 @@
-{ lib, fetchFromGitHub, buildGoPackage, libtool }:
-
-buildGoPackage rec {
+{ lib
+, fetchFromGitHub
+, buildGoModule
+}:
+buildGoModule rec {
   pname = "notary";
-  version = "0.6.1";
-  gitcommit = "d6e1431f";
+  version = "0.6.1-unstable-2024-04-16";
 
   src = fetchFromGitHub {
-    owner = "theupdateframework";
+    owner = "notaryproject";
     repo = "notary";
-    rev = "v${version}";
-    sha256 = "1ak9dk6vjny5069hp3w36dbjawcnaq82l3i2qvf7mn7zfglbsnf9";
+    rev = "9d2b3b35929392c9945d976b8bdecbe2f53a299e";
+    sha256 = "sha256-u19BfTJwRWholK0b3BcgSmcMM9AR7OeXo64AOi87r0A=";
   };
 
-  patches = [ ./no-git-usage.patch ];
-
-  buildInputs = [ libtool ];
-  buildPhase = ''
-    runHook preBuild
-    cd go/src/github.com/theupdateframework/notary
-    SKIPENVCHECK=1 make client GITCOMMIT=${gitcommit}
-    runHook postBuild
-  '';
+  vendorHash = null;
 
-  goPackagePath = "github.com/theupdateframework/notary";
+  tags = [
+    "pkcs11"
+  ];
 
-  installPhase = ''
-    runHook preInstall
-    install -D bin/notary $out/bin/notary
-    runHook postInstall
-  '';
+  ldflags = [
+    "-X github.com/theupdateframework/notary/version.NotaryVersion=${version}"
+  ];
 
-  #doCheck = true; # broken by tzdata: 2018g -> 2019a
-  checkPhase = ''
-    make test PKGS=github.com/theupdateframework/notary/cmd/notary
-  '';
+  # Tests try to use network.
+  doCheck = false;
 
-  meta = with lib; {
+  meta = {
     description = "Project that allows anyone to have trust over arbitrary collections of data";
     mainProgram = "notary";
     longDescription = ''
@@ -58,9 +49,9 @@ buildGoPackage rec {
       relying only on the publisher's key to determine the validity and
       integrity of the received content.
     '';
-    license = licenses.asl20;
+    license = lib.licenses.asl20;
     homepage = "https://github.com/theupdateframework/notary";
-    maintainers = with maintainers; [ vdemeester ];
-    platforms = platforms.unix;
+    maintainers = [ lib.maintainers.vdemeester ];
+    platforms = lib.platforms.unix;
   };
 }
diff --git a/pkgs/development/libraries/onnxruntime/default.nix b/pkgs/development/libraries/onnxruntime/default.nix
index b3117364984e9..169376b2d2924 100644
--- a/pkgs/development/libraries/onnxruntime/default.nix
+++ b/pkgs/development/libraries/onnxruntime/default.nix
@@ -29,10 +29,7 @@ let
   stdenv = throw "Use effectiveStdenv instead";
   effectiveStdenv = if cudaSupport then cudaPackages.backendStdenv else inputs.stdenv;
 
-  cudaCapabilities = cudaPackages.cudaFlags.cudaCapabilities;
-  # E.g. [ "80" "86" "90" ]
-  cudaArchitectures = (builtins.map cudaPackages.cudaFlags.dropDot cudaCapabilities);
-  cudaArchitecturesString = lib.strings.concatStringsSep ";" cudaArchitectures;
+  cudaArchitecturesString = cudaPackages.flags.cmakeCudaArchitecturesString;
 
   howard-hinnant-date = fetchFromGitHub {
     owner = "HowardHinnant";
diff --git a/pkgs/development/libraries/science/math/faiss/default.nix b/pkgs/development/libraries/science/math/faiss/default.nix
index 59494fadfd900..5af73735fdf60 100644
--- a/pkgs/development/libraries/science/math/faiss/default.nix
+++ b/pkgs/development/libraries/science/math/faiss/default.nix
@@ -29,8 +29,7 @@ let
   pname = "faiss";
   version = "1.7.4";
 
-  inherit (cudaPackages) cudaFlags backendStdenv;
-  inherit (cudaFlags) cudaCapabilities dropDot;
+  inherit (cudaPackages) flags backendStdenv;
 
   stdenv = if cudaSupport then backendStdenv else inputs.stdenv;
 
@@ -93,7 +92,7 @@ stdenv.mkDerivation {
     "-DFAISS_ENABLE_PYTHON=${if pythonSupport then "ON" else "OFF"}"
     "-DFAISS_OPT_LEVEL=${optLevel}"
   ] ++ lib.optionals cudaSupport [
-    "-DCMAKE_CUDA_ARCHITECTURES=${builtins.concatStringsSep ";" (map dropDot cudaCapabilities)}"
+    "-DCMAKE_CUDA_ARCHITECTURES=${flags.cmakeCudaArchitecturesString}"
     "-DCUDAToolkit_INCLUDE_DIR=${cudaJoined}/include"
   ];
 
diff --git a/pkgs/development/libraries/science/math/magma/generic.nix b/pkgs/development/libraries/science/math/magma/generic.nix
index 757a1b77dafc5..a675142f361d4 100644
--- a/pkgs/development/libraries/science/math/magma/generic.nix
+++ b/pkgs/development/libraries/science/math/magma/generic.nix
@@ -41,8 +41,7 @@ let
     then cudaPackages_11
     else cudaPackages;
 
-  inherit (effectiveCudaPackages) cudaAtLeast cudaFlags cudaOlder;
-  inherit (cudaFlags) cudaCapabilities;
+  inherit (effectiveCudaPackages) cudaAtLeast flags cudaOlder;
 
   # move to newer ROCm version once supported
   rocmPackages = rocmPackages_5;
@@ -52,7 +51,7 @@ let
   #   lists.subtractLists a b = b - a
 
   # For ROCm
-  # NOTE: The hip.gpuTargets are prefixed with "gfx" instead of "sm" like cudaFlags.realArches.
+  # NOTE: The hip.gpuTargets are prefixed with "gfx" instead of "sm" like flags.realArches.
   #   For some reason, Magma's CMakeLists.txt file does not handle the "gfx" prefix, so we must
   #   remove it.
   rocmArches = lists.map (x: strings.removePrefix "gfx" x) rocmPackages.clr.gpuTargets;
@@ -83,12 +82,11 @@ let
       throw "No GPU targets specified"
   );
 
-  # E.g. [ "80" "86" "90" ]
-  cudaArchitectures = (builtins.map cudaFlags.dropDot cudaCapabilities);
-
-  cudaArchitecturesString = strings.concatStringsSep ";" cudaArchitectures;
+  cudaArchitecturesString = flags.cmakeCudaArchitecturesString;
   minArch =
     let
+      # E.g. [ "80" "86" "90" ]
+      cudaArchitectures = (builtins.map flags.dropDot flags.cudaCapabilities);
       minArch' = builtins.head (builtins.sort strings.versionOlder cudaArchitectures);
     in
     # "75" -> "750"  Cf. https://bitbucket.org/icl/magma/src/f4ec79e2c13a2347eff8a77a3be6f83bc2daec20/CMakeLists.txt#lines-273
diff --git a/pkgs/development/libraries/science/math/tiny-cuda-nn/default.nix b/pkgs/development/libraries/science/math/tiny-cuda-nn/default.nix
index 2036c4c86253b..e9367d416e325 100644
--- a/pkgs/development/libraries/science/math/tiny-cuda-nn/default.nix
+++ b/pkgs/development/libraries/science/math/tiny-cuda-nn/default.nix
@@ -11,7 +11,7 @@
   which,
 }: let
   inherit (lib) lists strings;
-  inherit (cudaPackages) backendStdenv cudaFlags;
+  inherit (cudaPackages) backendStdenv flags;
 
   cuda-common-redist = with cudaPackages; [
     cuda_cudart.dev # cuda_runtime.h
@@ -89,9 +89,7 @@ in
     doCheck = false;
 
     preConfigure = ''
-      export TCNN_CUDA_ARCHITECTURES="${
-        strings.concatStringsSep ";" (lists.map cudaFlags.dropDot cudaFlags.cudaCapabilities)
-      }"
+      export TCNN_CUDA_ARCHITECTURES="${flags.cmakeCudaArchitecturesString}"
       export CUDA_HOME="${cuda-native-redist}"
       export LIBRARY_PATH="${cuda-native-redist}/lib/stubs:$LIBRARY_PATH"
       export CC="${backendStdenv.cc}/bin/cc"
diff --git a/pkgs/development/tools/dazel/default.nix b/pkgs/development/tools/dazel/default.nix
new file mode 100644
index 0000000000000..f19d469697835
--- /dev/null
+++ b/pkgs/development/tools/dazel/default.nix
@@ -0,0 +1,22 @@
+{ lib
+, buildPythonApplication
+, fetchPypi
+}:
+buildPythonApplication rec {
+  version = "0.0.42";
+  pname = "dazel";
+
+  src = fetchPypi {
+    inherit pname version;
+    sha256 = "sha256-JE7+GS7DpuFoC2LK3dvYvjtOdzRxFMHzgZRfvrGBDtQ=";
+  };
+
+  meta = {
+    homepage = "https://github.com/nadirizr/dazel";
+    description = "Run Google's bazel inside a docker container via a seamless proxy.";
+    license = lib.licenses.mit;
+    maintainers = with lib.maintainers; [
+      malt3
+    ];
+  };
+}
diff --git a/pkgs/tools/security/notary/no-git-usage.patch b/pkgs/tools/security/notary/no-git-usage.patch
deleted file mode 100644
index 363eefe36921d..0000000000000
--- a/pkgs/tools/security/notary/no-git-usage.patch
+++ /dev/null
@@ -1,15 +0,0 @@
-diff --git a/Makefile b/Makefile
-index ab794165..0cbd047f 100644
---- a/Makefile
-+++ b/Makefile
-@@ -5,8 +5,8 @@ PREFIX?=$(shell pwd)
- # Add to compile time flags
- NOTARY_PKG := github.com/theupdateframework/notary
- NOTARY_VERSION := $(shell cat NOTARY_VERSION)
--GITCOMMIT := $(shell git rev-parse --short HEAD)
--GITUNTRACKEDCHANGES := $(shell git status --porcelain --untracked-files=no)
-+GITCOMMIT ?= $(shell git rev-parse --short HEAD)
-+GITUNTRACKEDCHANGES :=
- ifneq ($(GITUNTRACKEDCHANGES),)
- GITCOMMIT := $(GITCOMMIT)-dirty
- endif
diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix
index d1bac5468fd8e..bc31279277b66 100644
--- a/pkgs/top-level/all-packages.nix
+++ b/pkgs/top-level/all-packages.nix
@@ -3613,6 +3613,8 @@ with pkgs;
 
   cyclonedx-python = callPackage ../tools/misc/cyclonedx-python { };
 
+  dazel = python3Packages.callPackage ../development/tools/dazel { };
+
   dcap = callPackage ../tools/networking/dcap { };
 
   deltachat-cursed = callPackage ../applications/networking/instant-messengers/deltachat-cursed { };
@@ -11009,8 +11011,6 @@ with pkgs;
 
   noisetorch = callPackage ../applications/audio/noisetorch { };
 
-  notary = callPackage ../tools/security/notary { };
-
   notation = callPackage ../tools/security/notation { };
 
   notify-osd = callPackage ../applications/misc/notify-osd { };