···46 version = versions.linux;
4748 src = fetchurl {
49+ urls = [
50+ "https://packages.microsoft.com/repos/ms-teams/pool/main/t/teams/teams_${versions.linux}_amd64.deb"
51+ # NOTE: the archive.org timestamp must also be updated if the version changes.
52+ "https://web.archive.org/web/20221130115842if_/https://packages.microsoft.com/repos/ms-teams/pool/main/t/teams/teams_${versions.linux}_amd64.deb"
53+ ];
54 hash = hashes.linux;
55 };
56
···2, lib
3, cudatoolkit
4}:
5+6+# Type aliases
7+# Gpu = {
8+# archName: String, # e.g., "Hopper"
9+# computeCapability: String, # e.g., "9.0"
10+# minCudaVersion: String, # e.g., "11.8"
11+# maxCudaVersion: String, # e.g., "12.0"
12+# }
13+14let
15+ inherit (lib) attrsets lists strings trivial versions;
16+ cudaVersion = cudatoolkit.version;
1718 # Flags are determined based on your CUDA toolkit by default. You may benefit
19 # from improved performance, reduced file size, or greater hardware suppport by
···24 #
25 # Please see the accompanying documentation or https://github.com/NixOS/nixpkgs/pull/205351
2627+ # gpus :: List Gpu
28+ gpus = builtins.import ./gpus.nix;
29+30+ # isVersionIn :: Gpu -> Bool
31+ isSupported = gpu:
32+ let
33+ inherit (gpu) minCudaVersion maxCudaVersion;
34+ lowerBoundSatisfied = strings.versionAtLeast cudaVersion minCudaVersion;
35+ upperBoundSatisfied = !(strings.versionOlder maxCudaVersion cudaVersion);
36+ in
37+ lowerBoundSatisfied && upperBoundSatisfied;
38+39+ # supportedGpus :: List Gpu
40+ # GPUs which are supported by the provided CUDA version.
41+ supportedGpus = builtins.filter isSupported gpus;
42+43+ # cudaArchNameToVersions :: AttrSet String (List String)
44+ # Maps the name of a GPU architecture to different versions of that architecture.
45+ # For example, "Ampere" maps to [ "8.0" "8.6" "8.7" ].
46+ cudaArchNameToVersions =
47+ lists.groupBy'
48+ (versions: gpu: versions ++ [ gpu.computeCapability ])
49+ [ ]
50+ (gpu: gpu.archName)
51+ supportedGpus;
52+53+ # cudaArchNames :: List String
54+ # NOTE: It's important that we don't rely on builtins.attrNames cudaArchNameToVersions here;
55+ # otherwise, we'll get the names sorted in alphabetical order. The JSON array we read them
56+ # from is already sorted, so we'll preserve that order here.
57+ cudaArchNames = lists.unique (lists.map (gpu: gpu.archName) supportedGpus);
5859+ # cudaComputeCapabilityToName :: AttrSet String String
60+ # Maps the version of a GPU architecture to the name of that architecture.
61+ # For example, "8.0" maps to "Ampere".
62+ cudaComputeCapabilityToName = builtins.listToAttrs (
63+ lists.map
64+ (gpu: {
65+ name = gpu.computeCapability;
66+ value = gpu.archName;
67+ })
68+ supportedGpus
69+ );
7071+ # cudaComputeCapabilities :: List String
72+ # NOTE: It's important that we don't rely on builtins.attrNames cudaComputeCapabilityToName here;
73+ # otherwise, we'll get the versions sorted in alphabetical order. The JSON array we read them
74+ # from is already sorted, so we'll preserve that order here.
75+ # Use the user-provided list of CUDA capabilities if it's provided.
76+ cudaComputeCapabilities = config.cudaCapabilities
77+ or (lists.map (gpu: gpu.computeCapability) supportedGpus);
78+79+ # cudaForwardComputeCapability :: String
80+ cudaForwardComputeCapability = (lists.last cudaComputeCapabilities) + "+PTX";
81+82+ # cudaComputeCapabilitiesAndForward :: List String
83+ # The list of supported CUDA architectures, including the forward compatibility architecture.
84+ # If forward compatibility is disabled, this will be the same as cudaComputeCapabilities.
85+ cudaComputeCapabilitiesAndForward = cudaComputeCapabilities
86+ ++ lists.optional (config.cudaForwardCompat or true) cudaForwardComputeCapability;
8788+ # dropDot :: String -> String
89+ dropDot = ver: builtins.replaceStrings [ "." ] [ "" ] ver;
9091+ # archMapper :: String -> List String -> List String
92+ # Maps a feature across a list of architecture versions to produce a list of architectures.
93+ # For example, "sm" and [ "8.0" "8.6" "8.7" ] produces [ "sm_80" "sm_86" "sm_87" ].
94+ archMapper = feat: lists.map (computeCapability: "${feat}_${dropDot computeCapability}");
00009596+ # gencodeMapper :: String -> List String -> List String
97+ # Maps a feature across a list of architecture versions to produce a list of gencode arguments.
98+ # For example, "sm" and [ "8.0" "8.6" "8.7" ] produces [ "-gencode=arch=compute_80,code=sm_80"
99+ # "-gencode=arch=compute_86,code=sm_86" "-gencode=arch=compute_87,code=sm_87" ].
100+ gencodeMapper = feat: lists.map (
101+ computeCapability:
102+ "-gencode=arch=compute_${dropDot computeCapability},code=${feat}_${dropDot computeCapability}"
103+ );
104105+ # cudaRealArches :: List String
106+ # The real architectures are physical architectures supported by the CUDA version.
107+ # For example, "sm_80".
108+ cudaRealArches = archMapper "sm" cudaComputeCapabilities;
109110+ # cudaVirtualArches :: List String
111+ # The virtual architectures are typically used for forward compatibility, when trying to support
112+ # an architecture newer than the CUDA version allows.
113+ # For example, "compute_80".
114+ cudaVirtualArches = archMapper "compute" cudaComputeCapabilities;
115116+ # cudaArches :: List String
117+ # By default, build for all supported architectures and forward compatibility via a virtual
118+ # architecture for the newest supported architecture.
119+ cudaArches = cudaRealArches ++
120+ lists.optional (config.cudaForwardCompat or true) (lists.last cudaVirtualArches);
121122+ # cudaGencode :: List String
123+ # A list of CUDA gencode arguments to pass to NVCC.
124+ cudaGencode =
125+ let
126+ base = gencodeMapper "sm" cudaComputeCapabilities;
127+ forwardCompat = gencodeMapper "compute" [ (lists.last cudaComputeCapabilities) ];
128+ in
129+ base ++ lists.optionals (config.cudaForwardCompat or true) forwardCompat;
130131in
132{
133+ inherit
134+ cudaArchNames
135+ cudaArchNameToVersions cudaComputeCapabilityToName
136+ cudaRealArches cudaVirtualArches cudaArches
137+ cudaGencode;
138+ cudaCapabilities = cudaComputeCapabilitiesAndForward;
139}
···4849buildPythonPackage rec {
50 pname = "apache-beam";
51- version = "2.44.0";
5253 src = fetchFromGitHub {
54 owner = "apache";
55 repo = "beam";
56 rev = "refs/tags/v${version}";
57- hash = "sha256-5fnZxv2ZkFlv8vGDIt/6EL41v9P1iKa1tEd1nezq+PU=";
58 };
5960 patches = [
···76 # See https://github.com/NixOS/nixpkgs/issues/193613
77 "protobuf"
7879- # As of apache-beam v2.44.0, the requirement is httplib2>=0.8,<0.21.0, but
80 # the current (2023-02-08) nixpkgs's httplib2 version is 0.21.0. This can be
81 # removed once beam is upgraded since the current requirement on master is
82 # for httplib2>=0.8,<0.22.0.
83 "httplib2"
000084 ];
8586 sourceRoot = "source/sdks/python";
···4849buildPythonPackage rec {
50 pname = "apache-beam";
51+ version = "2.45.0";
5253 src = fetchFromGitHub {
54 owner = "apache";
55 repo = "beam";
56 rev = "refs/tags/v${version}";
57+ hash = "sha256-e+6Vt+SlOxi16udsdx7WFoDWYupuXhggpoEZPe4tPr0=";
58 };
5960 patches = [
···76 # See https://github.com/NixOS/nixpkgs/issues/193613
77 "protobuf"
7879+ # As of apache-beam v2.45.0, the requirement is httplib2>=0.8,<0.21.0, but
80 # the current (2023-02-08) nixpkgs's httplib2 version is 0.21.0. This can be
81 # removed once beam is upgraded since the current requirement on master is
82 # for httplib2>=0.8,<0.22.0.
83 "httplib2"
84+85+ # As of apache-beam v2.45.0, the requirement is pyarrow<10.0.0,>=0.15.1, but
86+ # the current (2023-02-22) nixpkgs's pyarrow version is 11.0.0.
87+ "pyarrow"
88 ];
8990 sourceRoot = "source/sdks/python";
+31
pkgs/development/python-modules/arpy/default.nix
···0000000000000000000000000000000
···1+{ lib
2+, buildPythonPackage
3+, fetchFromGitHub
4+, unittestCheckHook
5+}:
6+7+buildPythonPackage rec {
8+ pname = "arpy";
9+ version = "2.3.0";
10+ format = "setuptools";
11+12+ src = fetchFromGitHub {
13+ owner = "viraptor";
14+ repo = pname;
15+ rev = version;
16+ hash = "sha256-jD1XJJhcpJymn0CwZ65U06xLKm1JjHffmx/umEO7a5s=";
17+ };
18+19+ checkInputs = [
20+ unittestCheckHook
21+ ];
22+23+ pythonImportsCheck = [ "arpy" ];
24+25+ meta = with lib; {
26+ description = "A library for accessing the archive files and reading the contents";
27+ homepage = "https://github.com/viraptor/arpy";
28+ license = licenses.bsd2;
29+ maintainers = with maintainers; [ thornycrackers ];
30+ };
31+}
···29 '';
3031 meta = with lib; {
32- broken = stdenv.isDarwin;
33 homepage = "https://pgloader.io/";
34 description = "Loads data into PostgreSQL and allows you to implement Continuous Migration from your current database to PostgreSQL";
35 maintainers = with maintainers; [ mguentner ];
···29 '';
3031 meta = with lib; {
032 homepage = "https://pgloader.io/";
33 description = "Loads data into PostgreSQL and allows you to implement Continuous Migration from your current database to PostgreSQL";
34 maintainers = with maintainers; [ mguentner ];
+12-19
pkgs/development/tools/rbspy/default.nix
···2, stdenv
3, rustPlatform
4, fetchFromGitHub
5-, fetchpatch
6, ruby
7, which
8}:
9rustPlatform.buildRustPackage rec {
10 pname = "rbspy";
11- version = "0.12.1";
1213 src = fetchFromGitHub {
14 owner = pname;
15 repo = pname;
16 rev = "v${version}";
17- sha256 = "FnUUX7qQWVZMHtWvneTLzBL1YYwF8v4e1913Op4Lvbw=";
18 };
1920- cargoSha256 = "98vmUoWSehX/9rMlHNSvKHJvJxW99pOhS08FI3OeLGo=";
21 doCheck = true;
2223- patches = [
24- # Backport rust 1.62 support. Should be removed in the next rbspy release.
25- (fetchpatch {
26- name = "rust-1.62.patch";
27- url = "https://github.com/rbspy/rbspy/commit/f5a8eecfbf2ad0b3ff9105115988478fb760d54d.patch";
28- sha256 = "sha256-+04rvEXU7/lx5IQkk3Bhe+KLN8PwxZ0j4nH5ySnS154=";
29- })
30- ];
31-32- # Tests in initialize.rs rely on specific PIDs being queried and attaching
33- # tracing to forked processes, which don't work well with the isolated build.
34 preCheck = ''
35 substituteInPlace src/core/process.rs \
36 --replace /usr/bin/which '${which}/bin/which'
37 substituteInPlace src/sampler/mod.rs \
38- --replace /usr/bin/which '${which}/bin/which'
39- substituteInPlace src/core/initialize.rs \
40- --replace 'fn test_initialize_with_disallowed_process(' '#[ignore] fn test_initialize_with_disallowed_process(' \
41- --replace 'fn test_get_exec_trace(' '#[ignore] fn test_get_exec_trace(' \
00042 '';
4344 nativeBuildInputs = [ ruby which ];
···20 # We add Mesa to the end of $LD_LIBRARY_PATH to provide fallback
21 # software rendering. GCC is needed so that libgcc_s.so can be found
22 # when Mesa is used.
23- makeWrapper ${env}/ioquake3.* $out/bin/quake3 \
24 --suffix-each LD_LIBRARY_PATH ':' "${libPath}" \
25 --add-flags "+set fs_basepath ${env} +set r_allowSoftwareGL 1"
2627- makeWrapper ${env}/ioq3ded.* $out/bin/quake3-server \
28 --add-flags "+set fs_basepath ${env}"
29 '';
30
···20 # We add Mesa to the end of $LD_LIBRARY_PATH to provide fallback
21 # software rendering. GCC is needed so that libgcc_s.so can be found
22 # when Mesa is used.
23+ makeWrapper ${env}/bin/ioquake3.* $out/bin/quake3 \
24 --suffix-each LD_LIBRARY_PATH ':' "${libPath}" \
25 --add-flags "+set fs_basepath ${env} +set r_allowSoftwareGL 1"
2627+ makeWrapper ${env}/bin/ioq3ded.* $out/bin/quake3-server \
28 --add-flags "+set fs_basepath ${env}"
29 '';
30