Merge master into staging-next
This commit is contained in:
commit
57b5c92d8e
@ -1641,6 +1641,7 @@
|
||||
./system/boot/systemd/sysupdate.nix
|
||||
./system/boot/systemd/sysusers.nix
|
||||
./system/boot/systemd/tmpfiles.nix
|
||||
./system/boot/systemd/tpm2.nix
|
||||
./system/boot/systemd/user.nix
|
||||
./system/boot/systemd/userdbd.nix
|
||||
./system/boot/systemd/homed.nix
|
||||
|
@ -1088,6 +1088,8 @@ in
|
||||
storePaths = [
|
||||
"${config.boot.initrd.systemd.package}/bin/systemd-cryptsetup"
|
||||
"${config.boot.initrd.systemd.package}/lib/systemd/system-generators/systemd-cryptsetup-generator"
|
||||
] ++ lib.optionals config.boot.initrd.systemd.tpm2.enable [
|
||||
"${config.boot.initrd.systemd.package}/lib/cryptsetup/libcryptsetup-token-systemd-tpm2.so"
|
||||
];
|
||||
|
||||
};
|
||||
|
@ -37,8 +37,6 @@ let
|
||||
"cryptsetup.target"
|
||||
"cryptsetup-pre.target"
|
||||
"remote-cryptsetup.target"
|
||||
] ++ optionals cfg.package.withTpm2Tss [
|
||||
"tpm2.target"
|
||||
] ++ [
|
||||
"sigpwr.target"
|
||||
"timers.target"
|
||||
|
@ -68,7 +68,6 @@ let
|
||||
"systemd-reboot.service"
|
||||
"systemd-sysctl.service"
|
||||
"timers.target"
|
||||
"tpm2.target"
|
||||
"umount.target"
|
||||
"systemd-bsod.service"
|
||||
] ++ cfg.additionalUpstreamUnits;
|
||||
@ -349,15 +348,6 @@ in {
|
||||
visible = "shallow";
|
||||
description = "Definition of slice configurations.";
|
||||
};
|
||||
|
||||
enableTpm2 = mkOption {
|
||||
default = cfg.package.withTpm2Tss;
|
||||
defaultText = "boot.initrd.systemd.package.withTpm2Tss";
|
||||
type = types.bool;
|
||||
description = ''
|
||||
Whether to enable TPM2 support in the initrd.
|
||||
'';
|
||||
};
|
||||
};
|
||||
|
||||
config = mkIf (config.boot.initrd.enable && cfg.enable) {
|
||||
@ -394,9 +384,7 @@ in {
|
||||
# systemd needs this for some features
|
||||
"autofs"
|
||||
# systemd-cryptenroll
|
||||
] ++ lib.optional cfg.enableTpm2 "tpm-tis"
|
||||
++ lib.optional (cfg.enableTpm2 && !(pkgs.stdenv.hostPlatform.isRiscV64 || pkgs.stdenv.hostPlatform.isArmv7)) "tpm-crb"
|
||||
++ lib.optional cfg.package.withEfi "efivarfs";
|
||||
] ++ lib.optional cfg.package.withEfi "efivarfs";
|
||||
|
||||
boot.kernelParams = [
|
||||
"root=${config.boot.initrd.systemd.root}"
|
||||
@ -495,10 +483,6 @@ in {
|
||||
|
||||
# so NSS can look up usernames
|
||||
"${pkgs.glibc}/lib/libnss_files.so.2"
|
||||
] ++ optionals (cfg.package.withCryptsetup && cfg.enableTpm2) [
|
||||
# tpm2 support
|
||||
"${cfg.package}/lib/cryptsetup/libcryptsetup-token-systemd-tpm2.so"
|
||||
pkgs.tpm2-tss
|
||||
] ++ optionals cfg.package.withCryptsetup [
|
||||
# fido2 support
|
||||
"${cfg.package}/lib/cryptsetup/libcryptsetup-token-systemd-fido2.so"
|
||||
|
80
nixos/modules/system/boot/systemd/tpm2.nix
Normal file
80
nixos/modules/system/boot/systemd/tpm2.nix
Normal file
@ -0,0 +1,80 @@
|
||||
{
|
||||
lib,
|
||||
config,
|
||||
pkgs,
|
||||
...
|
||||
}:
|
||||
{
|
||||
meta.maintainers = [ lib.maintainers.elvishjerricco ];
|
||||
|
||||
imports = [
|
||||
(lib.mkRenamedOptionModule
|
||||
[
|
||||
"boot"
|
||||
"initrd"
|
||||
"systemd"
|
||||
"enableTpm2"
|
||||
]
|
||||
[
|
||||
"boot"
|
||||
"initrd"
|
||||
"systemd"
|
||||
"tpm2"
|
||||
"enable"
|
||||
]
|
||||
)
|
||||
];
|
||||
|
||||
options = {
|
||||
systemd.tpm2.enable = lib.mkEnableOption "systemd TPM2 support" // {
|
||||
default = config.systemd.package.withTpm2Tss;
|
||||
defaultText = "systemd.package.withTpm2Tss";
|
||||
};
|
||||
|
||||
boot.initrd.systemd.tpm2.enable = lib.mkEnableOption "systemd initrd TPM2 support" // {
|
||||
default = config.boot.initrd.systemd.package.withTpm2Tss;
|
||||
defaultText = "boot.initrd.systemd.package.withTpm2Tss";
|
||||
};
|
||||
};
|
||||
|
||||
# TODO: pcrphase, pcrextend, pcrfs, pcrmachine
|
||||
config = lib.mkMerge [
|
||||
# Stage 2
|
||||
(
|
||||
let
|
||||
cfg = config.systemd;
|
||||
in
|
||||
lib.mkIf cfg.tpm2.enable {
|
||||
systemd.additionalUpstreamSystemUnits = [
|
||||
"tpm2.target"
|
||||
"systemd-tpm2-setup-early.service"
|
||||
"systemd-tpm2-setup.service"
|
||||
];
|
||||
}
|
||||
)
|
||||
|
||||
# Stage 1
|
||||
(
|
||||
let
|
||||
cfg = config.boot.initrd.systemd;
|
||||
in
|
||||
lib.mkIf cfg.tpm2.enable {
|
||||
boot.initrd.systemd.additionalUpstreamUnits = [
|
||||
"tpm2.target"
|
||||
"systemd-tpm2-setup-early.service"
|
||||
];
|
||||
|
||||
boot.initrd.availableKernelModules =
|
||||
[ "tpm-tis" ]
|
||||
++ lib.optional (
|
||||
!(pkgs.stdenv.hostPlatform.isRiscV64 || pkgs.stdenv.hostPlatform.isArmv7)
|
||||
) "tpm-crb";
|
||||
boot.initrd.systemd.storePaths = [
|
||||
pkgs.tpm2-tss
|
||||
"${cfg.package}/lib/systemd/systemd-tpm2-setup"
|
||||
"${cfg.package}/lib/systemd/system-generators/systemd-tpm2-generator"
|
||||
];
|
||||
}
|
||||
)
|
||||
];
|
||||
}
|
File diff suppressed because it is too large
Load Diff
@ -38,12 +38,12 @@
|
||||
};
|
||||
apex = buildGrammar {
|
||||
language = "apex";
|
||||
version = "0.0.0+rev=602cc4b";
|
||||
version = "0.0.0+rev=69330ef";
|
||||
src = fetchFromGitHub {
|
||||
owner = "aheber";
|
||||
repo = "tree-sitter-sfapex";
|
||||
rev = "602cc4b050ef1e14a69acc2ea094968bf928fa59";
|
||||
hash = "sha256-OEaeH+iVWOtDKVBAAbFPN96uyKlcuDHIObsk6SP78SY=";
|
||||
rev = "69330ef89fb6b7b2dd16b639d86811e9262c7369";
|
||||
hash = "sha256-OO+KttgnPk18EtYmxNphn3if2p3QRNRrXQTYZOmmglc=";
|
||||
};
|
||||
location = "apex";
|
||||
meta.homepage = "https://github.com/aheber/tree-sitter-sfapex";
|
||||
@ -193,12 +193,12 @@
|
||||
};
|
||||
c = buildGrammar {
|
||||
language = "c";
|
||||
version = "0.0.0+rev=bc85948";
|
||||
version = "0.0.0+rev=f4c2115";
|
||||
src = fetchFromGitHub {
|
||||
owner = "tree-sitter";
|
||||
repo = "tree-sitter-c";
|
||||
rev = "bc85948c0bec746ebe921f72d2296d47e17d4ea7";
|
||||
hash = "sha256-nwo4V6eliE4P5ub3jx9DSBjLRjfFViMZKXfP1RdSMM8=";
|
||||
rev = "f4c21152f1952a99f4744e8c41d3ffb8038ae78c";
|
||||
hash = "sha256-DcW6KZVTjJtPx0iNXvizeAXWW8iaShKGF4+sHrwXPvs=";
|
||||
};
|
||||
meta.homepage = "https://github.com/tree-sitter/tree-sitter-c";
|
||||
};
|
||||
@ -325,12 +325,12 @@
|
||||
};
|
||||
cpp = buildGrammar {
|
||||
language = "cpp";
|
||||
version = "0.0.0+rev=30f973c";
|
||||
version = "0.0.0+rev=30d2fa3";
|
||||
src = fetchFromGitHub {
|
||||
owner = "tree-sitter";
|
||||
repo = "tree-sitter-cpp";
|
||||
rev = "30f973c2244f0bff444186185f475c3bd76bc3a5";
|
||||
hash = "sha256-r0rtjx0crbUK8euu5BAUW6NHdxC835tLW4YttvLNpkk=";
|
||||
rev = "30d2fa385735378388a55917e2910965fce19748";
|
||||
hash = "sha256-O7EVmGvkMCLTzoxNc+Qod6eCTWs6y8DYVpQqw+ziqGo=";
|
||||
};
|
||||
meta.homepage = "https://github.com/tree-sitter/tree-sitter-cpp";
|
||||
};
|
||||
@ -381,12 +381,12 @@
|
||||
};
|
||||
d = buildGrammar {
|
||||
language = "d";
|
||||
version = "0.0.0+rev=ac58458";
|
||||
version = "0.0.0+rev=45e5f1e";
|
||||
src = fetchFromGitHub {
|
||||
owner = "gdamore";
|
||||
repo = "tree-sitter-d";
|
||||
rev = "ac584585a15c4cacd6cda8e6bfe7cb1ca7b3898e";
|
||||
hash = "sha256-+6+9x+5pyjv252X3XzpN2CnrUXVzMvaCrCPVhhjEELo=";
|
||||
rev = "45e5f1e9d6de2c68591bc8e5ec662cf18e950b4a";
|
||||
hash = "sha256-q96RgJWrMop2HBBsQloVTspe3EaMtUL3wmVuT9xnE/g=";
|
||||
};
|
||||
meta.homepage = "https://github.com/gdamore/tree-sitter-d";
|
||||
};
|
||||
@ -526,12 +526,12 @@
|
||||
};
|
||||
editorconfig = buildGrammar {
|
||||
language = "editorconfig";
|
||||
version = "0.0.0+rev=faf014c";
|
||||
version = "0.0.0+rev=a761198";
|
||||
src = fetchFromGitHub {
|
||||
owner = "ValdezFOmar";
|
||||
repo = "tree-sitter-editorconfig";
|
||||
rev = "faf014c607f912ff666b20183d32a03dcfc3111d";
|
||||
hash = "sha256-gkbPpwe/FNeZuZEWOxchccWOk1erRMU8jabWoIFl2AY=";
|
||||
rev = "a761198025448c77ea11bcf22505b395a77fc0d0";
|
||||
hash = "sha256-KuaXFJGp1kxn0hqssiAFYL36zb0HY22warBb/40Ftzg=";
|
||||
};
|
||||
meta.homepage = "https://github.com/ValdezFOmar/tree-sitter-editorconfig";
|
||||
};
|
||||
@ -570,12 +570,12 @@
|
||||
};
|
||||
elm = buildGrammar {
|
||||
language = "elm";
|
||||
version = "0.0.0+rev=09dbf22";
|
||||
version = "0.0.0+rev=27f502e";
|
||||
src = fetchFromGitHub {
|
||||
owner = "elm-tooling";
|
||||
repo = "tree-sitter-elm";
|
||||
rev = "09dbf221d7491dc8d8839616b27c21b9c025c457";
|
||||
hash = "sha256-Bq2oWtqEAsKyV0iHNKC+hXW4fh4yUwbfUhPtZWg5pug=";
|
||||
rev = "27f502ed0a1cbd3c5912d284cc7934ee0d4cdddc";
|
||||
hash = "sha256-o5ou/9/TCzc9HuGzvSSZE2iyWCOwYk0c28KEgGrOiiI=";
|
||||
};
|
||||
meta.homepage = "https://github.com/elm-tooling/tree-sitter-elm";
|
||||
};
|
||||
@ -713,12 +713,12 @@
|
||||
};
|
||||
fortran = buildGrammar {
|
||||
language = "fortran";
|
||||
version = "0.0.0+rev=8f84294";
|
||||
version = "0.0.0+rev=c52e978";
|
||||
src = fetchFromGitHub {
|
||||
owner = "stadelmanma";
|
||||
repo = "tree-sitter-fortran";
|
||||
rev = "8f842945abefb76b9a68c0835619b37060b8f098";
|
||||
hash = "sha256-7nVAFWegMr/oShjSLaq9DESvaguPEK/bCCFu0Ru1QPQ=";
|
||||
rev = "c52e978afadf3faed52bb3c8082cc472c915f4e7";
|
||||
hash = "sha256-MQmS6IR/fyTo9qyYxt+g5kO4eToR6URrOHMN47rQ8kk=";
|
||||
};
|
||||
meta.homepage = "https://github.com/stadelmanma/tree-sitter-fortran";
|
||||
};
|
||||
@ -933,12 +933,12 @@
|
||||
};
|
||||
go = buildGrammar {
|
||||
language = "go";
|
||||
version = "0.0.0+rev=81a11f8";
|
||||
version = "0.0.0+rev=ecc2086";
|
||||
src = fetchFromGitHub {
|
||||
owner = "tree-sitter";
|
||||
repo = "tree-sitter-go";
|
||||
rev = "81a11f8252998ee6b98d59e6da91fc307491e53d";
|
||||
hash = "sha256-q6ChXb4nHkFlMz4QWX8DMlCMaHnTgq27c7a3hufYOvg=";
|
||||
rev = "ecc20866d1bd4d80f3aef06456ed3014d4d598e6";
|
||||
hash = "sha256-elPqkvVYs0vADOuN/umDteWP5hqcXhQAoSkqYDtTxaU=";
|
||||
};
|
||||
meta.homepage = "https://github.com/tree-sitter/tree-sitter-go";
|
||||
};
|
||||
@ -1209,12 +1209,12 @@
|
||||
};
|
||||
http = buildGrammar {
|
||||
language = "http";
|
||||
version = "0.0.0+rev=7c68e1c";
|
||||
version = "0.0.0+rev=231f1b1";
|
||||
src = fetchFromGitHub {
|
||||
owner = "rest-nvim";
|
||||
repo = "tree-sitter-http";
|
||||
rev = "7c68e1c8ce6eeef6bc4b749330c540dbbda5ba44";
|
||||
hash = "sha256-0Tj/hTVU8lK8j4MkcvlzpnbFFFZcNcXVdHvnB87AnyY=";
|
||||
rev = "231f1b1bafd12e46c8ed8c21dbbdd940d9f15e94";
|
||||
hash = "sha256-q8g7u3ctpfl0vq+RVBw7g7js/4SwAIkHg4CCRCuQ28w=";
|
||||
};
|
||||
meta.homepage = "https://github.com/rest-nvim/tree-sitter-http";
|
||||
};
|
||||
@ -1264,12 +1264,12 @@
|
||||
};
|
||||
inko = buildGrammar {
|
||||
language = "inko";
|
||||
version = "0.0.0+rev=234c87b";
|
||||
version = "0.0.0+rev=3a8887c";
|
||||
src = fetchFromGitHub {
|
||||
owner = "inko-lang";
|
||||
repo = "tree-sitter-inko";
|
||||
rev = "234c87be1dac20f766ddf6f486a7bde2a4bc5594";
|
||||
hash = "sha256-7BADt6NjH9chOzCDtJSLjBZaRqeLvOH006q0hI4pZaI=";
|
||||
rev = "3a8887ca16dd8add3905216ce63796d4097c7a6f";
|
||||
hash = "sha256-kJ3xJGlLdvvcJIOoooOMf0BGpk88etQJhRS74enVmNQ=";
|
||||
};
|
||||
meta.homepage = "https://github.com/inko-lang/tree-sitter-inko";
|
||||
};
|
||||
@ -1462,12 +1462,12 @@
|
||||
};
|
||||
lalrpop = buildGrammar {
|
||||
language = "lalrpop";
|
||||
version = "0.0.0+rev=854a40e";
|
||||
version = "0.0.0+rev=194c255";
|
||||
src = fetchFromGitHub {
|
||||
owner = "traxys";
|
||||
repo = "tree-sitter-lalrpop";
|
||||
rev = "854a40e99f7c70258e522bdb8ab584ede6196e2e";
|
||||
hash = "sha256-rVWmYF26DbPHoNRBv9FKEeacSbgw93PHy/wrQDGzlWk=";
|
||||
rev = "194c25539f435de415ee0551a5f07058833da915";
|
||||
hash = "sha256-I2Kozd0N8R0CCOVl4xTAL4fhZ5BIzSzW+MRQOfZ3cMY=";
|
||||
};
|
||||
meta.homepage = "https://github.com/traxys/tree-sitter-lalrpop";
|
||||
};
|
||||
@ -1774,12 +1774,12 @@
|
||||
};
|
||||
nix = buildGrammar {
|
||||
language = "nix";
|
||||
version = "0.0.0+rev=537095d";
|
||||
version = "0.0.0+rev=01bc5b1";
|
||||
src = fetchFromGitHub {
|
||||
owner = "cstrahan";
|
||||
repo = "tree-sitter-nix";
|
||||
rev = "537095ddc80cf610fa75a2a0149fe9799b011014";
|
||||
hash = "sha256-MMaeGnlNTKHjjzZd70OGCO0GOXhbjcL6bvRKpnLmDw0=";
|
||||
rev = "01bc5b18693055aab7a863d7608f4b3f85843cf8";
|
||||
hash = "sha256-hzHCcKl3T+zEHhK5U4Ym+puvOjgr+etdDHNpuCbOSzU=";
|
||||
};
|
||||
meta.homepage = "https://github.com/cstrahan/tree-sitter-nix";
|
||||
};
|
||||
@ -1829,24 +1829,24 @@
|
||||
};
|
||||
ocaml = buildGrammar {
|
||||
language = "ocaml";
|
||||
version = "0.0.0+rev=14beb5e";
|
||||
version = "0.0.0+rev=45ddc92";
|
||||
src = fetchFromGitHub {
|
||||
owner = "tree-sitter";
|
||||
repo = "tree-sitter-ocaml";
|
||||
rev = "14beb5ef0e7488bf1d93b8c67f69942324fee557";
|
||||
hash = "sha256-N8iqUa9CJ27wlUtfoMd9UO72q+kxTOGPVCblW07C0HU=";
|
||||
rev = "45ddc92d18fa11b2ca1a18cd94de4e63feea0806";
|
||||
hash = "sha256-xeUb/x1PennKS5N5TMPG0F+jLgAeY8DuIUkkbQ79QYQ=";
|
||||
};
|
||||
location = "grammars/ocaml";
|
||||
meta.homepage = "https://github.com/tree-sitter/tree-sitter-ocaml";
|
||||
};
|
||||
ocaml_interface = buildGrammar {
|
||||
language = "ocaml_interface";
|
||||
version = "0.0.0+rev=14beb5e";
|
||||
version = "0.0.0+rev=45ddc92";
|
||||
src = fetchFromGitHub {
|
||||
owner = "tree-sitter";
|
||||
repo = "tree-sitter-ocaml";
|
||||
rev = "14beb5ef0e7488bf1d93b8c67f69942324fee557";
|
||||
hash = "sha256-N8iqUa9CJ27wlUtfoMd9UO72q+kxTOGPVCblW07C0HU=";
|
||||
rev = "45ddc92d18fa11b2ca1a18cd94de4e63feea0806";
|
||||
hash = "sha256-xeUb/x1PennKS5N5TMPG0F+jLgAeY8DuIUkkbQ79QYQ=";
|
||||
};
|
||||
location = "grammars/interface";
|
||||
meta.homepage = "https://github.com/tree-sitter/tree-sitter-ocaml";
|
||||
@ -1920,12 +1920,12 @@
|
||||
};
|
||||
perl = buildGrammar {
|
||||
language = "perl";
|
||||
version = "0.0.0+rev=4659839";
|
||||
version = "0.0.0+rev=81c57e2";
|
||||
src = fetchFromGitHub {
|
||||
owner = "tree-sitter-perl";
|
||||
repo = "tree-sitter-perl";
|
||||
rev = "465983954cae2d2f984eae82de5ed5f11ca291dc";
|
||||
hash = "sha256-jSVmxGkumDXExLjT+Nnsu+E0IBB3z6wBb4y8hpp5IQs=";
|
||||
rev = "81c57e274c541c30d6c204c8dbceb90ec647ed8d";
|
||||
hash = "sha256-xtsLJx9tzj3KNhlCDuXnAGBz3EYnJ/J+EJ0UKHVN4g4=";
|
||||
};
|
||||
meta.homepage = "https://github.com/tree-sitter-perl/tree-sitter-perl";
|
||||
};
|
||||
@ -2233,12 +2233,12 @@
|
||||
};
|
||||
r = buildGrammar {
|
||||
language = "r";
|
||||
version = "0.0.0+rev=4279b69";
|
||||
version = "0.0.0+rev=2097fa5";
|
||||
src = fetchFromGitHub {
|
||||
owner = "r-lib";
|
||||
repo = "tree-sitter-r";
|
||||
rev = "4279b699c47fa87956045980c46c7d30f8c0121b";
|
||||
hash = "sha256-9IjhdtkQNshRJq48jBW6cvDd/tVNwgYfRK2YWhdFG84=";
|
||||
rev = "2097fa502efa21349d26af0ffee55d773015e481";
|
||||
hash = "sha256-a7vgmOY9K8w8vwMlOLBmUnXpWpVP+YlOilGODaI07y4=";
|
||||
};
|
||||
meta.homepage = "https://github.com/r-lib/tree-sitter-r";
|
||||
};
|
||||
@ -2487,12 +2487,12 @@
|
||||
};
|
||||
sflog = buildGrammar {
|
||||
language = "sflog";
|
||||
version = "0.0.0+rev=602cc4b";
|
||||
version = "0.0.0+rev=69330ef";
|
||||
src = fetchFromGitHub {
|
||||
owner = "aheber";
|
||||
repo = "tree-sitter-sfapex";
|
||||
rev = "602cc4b050ef1e14a69acc2ea094968bf928fa59";
|
||||
hash = "sha256-OEaeH+iVWOtDKVBAAbFPN96uyKlcuDHIObsk6SP78SY=";
|
||||
rev = "69330ef89fb6b7b2dd16b639d86811e9262c7369";
|
||||
hash = "sha256-OO+KttgnPk18EtYmxNphn3if2p3QRNRrXQTYZOmmglc=";
|
||||
};
|
||||
location = "sflog";
|
||||
meta.homepage = "https://github.com/aheber/tree-sitter-sfapex";
|
||||
@ -2565,24 +2565,24 @@
|
||||
};
|
||||
soql = buildGrammar {
|
||||
language = "soql";
|
||||
version = "0.0.0+rev=602cc4b";
|
||||
version = "0.0.0+rev=69330ef";
|
||||
src = fetchFromGitHub {
|
||||
owner = "aheber";
|
||||
repo = "tree-sitter-sfapex";
|
||||
rev = "602cc4b050ef1e14a69acc2ea094968bf928fa59";
|
||||
hash = "sha256-OEaeH+iVWOtDKVBAAbFPN96uyKlcuDHIObsk6SP78SY=";
|
||||
rev = "69330ef89fb6b7b2dd16b639d86811e9262c7369";
|
||||
hash = "sha256-OO+KttgnPk18EtYmxNphn3if2p3QRNRrXQTYZOmmglc=";
|
||||
};
|
||||
location = "soql";
|
||||
meta.homepage = "https://github.com/aheber/tree-sitter-sfapex";
|
||||
};
|
||||
sosl = buildGrammar {
|
||||
language = "sosl";
|
||||
version = "0.0.0+rev=602cc4b";
|
||||
version = "0.0.0+rev=69330ef";
|
||||
src = fetchFromGitHub {
|
||||
owner = "aheber";
|
||||
repo = "tree-sitter-sfapex";
|
||||
rev = "602cc4b050ef1e14a69acc2ea094968bf928fa59";
|
||||
hash = "sha256-OEaeH+iVWOtDKVBAAbFPN96uyKlcuDHIObsk6SP78SY=";
|
||||
rev = "69330ef89fb6b7b2dd16b639d86811e9262c7369";
|
||||
hash = "sha256-OO+KttgnPk18EtYmxNphn3if2p3QRNRrXQTYZOmmglc=";
|
||||
};
|
||||
location = "sosl";
|
||||
meta.homepage = "https://github.com/aheber/tree-sitter-sfapex";
|
||||
@ -2677,12 +2677,12 @@
|
||||
};
|
||||
supercollider = buildGrammar {
|
||||
language = "supercollider";
|
||||
version = "0.0.0+rev=affa438";
|
||||
version = "0.0.0+rev=1a8ee0d";
|
||||
src = fetchFromGitHub {
|
||||
owner = "madskjeldgaard";
|
||||
repo = "tree-sitter-supercollider";
|
||||
rev = "affa4389186b6939d89673e1e9d2b28364f5ca6f";
|
||||
hash = "sha256-j4CTKkSdKnSGdgC3zGglmZ6uQvbC2ObQ+WWlY0afSwo=";
|
||||
rev = "1a8ee0da9a4f2df5a8a22f4d637ac863623a78a7";
|
||||
hash = "sha256-G23AZO1zvTvRE9ciV7qMuSoaCYulhyOkwiRwgK06NRQ=";
|
||||
};
|
||||
meta.homepage = "https://github.com/madskjeldgaard/tree-sitter-supercollider";
|
||||
};
|
||||
@ -2710,12 +2710,12 @@
|
||||
};
|
||||
swift = buildGrammar {
|
||||
language = "swift";
|
||||
version = "0.0.0+rev=7d303df";
|
||||
version = "0.0.0+rev=032930d";
|
||||
src = fetchFromGitHub {
|
||||
owner = "alex-pinkus";
|
||||
repo = "tree-sitter-swift";
|
||||
rev = "7d303df70012edb7385a6a3b3938e0e7b89ecfbd";
|
||||
hash = "sha256-aTzbNyg248RG00qj7LiLDQAI63c7cXx++TGoANkyp2c=";
|
||||
rev = "032930d6218d8ae23bde074cf29ce8d276b87533";
|
||||
hash = "sha256-VhQ+OwkqOVJH9/R2eDVkCJbmh50EmZjVGX8Pk4uMGBw=";
|
||||
};
|
||||
generate = true;
|
||||
meta.homepage = "https://github.com/alex-pinkus/tree-sitter-swift";
|
||||
@ -2867,12 +2867,12 @@
|
||||
};
|
||||
tlaplus = buildGrammar {
|
||||
language = "tlaplus";
|
||||
version = "0.0.0+rev=bba02e7";
|
||||
version = "0.0.0+rev=a9f9c13";
|
||||
src = fetchFromGitHub {
|
||||
owner = "tlaplus-community";
|
||||
repo = "tree-sitter-tlaplus";
|
||||
rev = "bba02e79f85e335f310fc95e21c677e49f2c4439";
|
||||
hash = "sha256-FbOBkEtsFFD9jIWM2+fETstnvQyIj2DAF81v0dXjouo=";
|
||||
rev = "a9f9c136baa9b73c63850be92301fb5f1fc9b2fd";
|
||||
hash = "sha256-BakN8qW6IyEK2GfSpPDogiJXTZXGjRiHN0LNyVH7Z2Q=";
|
||||
};
|
||||
meta.homepage = "https://github.com/tlaplus-community/tree-sitter-tlaplus";
|
||||
};
|
||||
@ -3058,12 +3058,12 @@
|
||||
};
|
||||
v = buildGrammar {
|
||||
language = "v";
|
||||
version = "0.0.0+rev=83b7286";
|
||||
version = "0.0.0+rev=4f93826";
|
||||
src = fetchFromGitHub {
|
||||
owner = "vlang";
|
||||
repo = "v-analyzer";
|
||||
rev = "83b7286d8f4f33c88dff102bad22149d8e29d9eb";
|
||||
hash = "sha256-O9NXsijpl7+7KWLYwH95Pa4QeWfik6i+wAK5OWV/xgc=";
|
||||
rev = "4f93826aeb31066eb241f4ccbca61f052239803f";
|
||||
hash = "sha256-Tl4q6QksNu7Pm0Pt8rJka6o55LNN2GN6zK732XmLXb8=";
|
||||
};
|
||||
location = "tree_sitter_v";
|
||||
meta.homepage = "https://github.com/vlang/v-analyzer";
|
||||
@ -3280,12 +3280,12 @@
|
||||
};
|
||||
zig = buildGrammar {
|
||||
language = "zig";
|
||||
version = "0.0.0+rev=21e2218";
|
||||
version = "0.0.0+rev=eb7d58c";
|
||||
src = fetchFromGitHub {
|
||||
owner = "tree-sitter-grammars";
|
||||
repo = "tree-sitter-zig";
|
||||
rev = "21e2218e0ec7f4e3c0640d16bf8c67e6f0a61e18";
|
||||
hash = "sha256-BJ7rexbUbi92FRg5rhXTUpips4T9YtkEA/hVtd1tBFY=";
|
||||
rev = "eb7d58c2dc4fbeea4745019dee8df013034ae66b";
|
||||
hash = "sha256-iyb79SiMsV94RrWH/1Oi2aKBiX5io0Dp+zZf8qWZHwg=";
|
||||
};
|
||||
meta.homepage = "https://github.com/tree-sitter-grammars/tree-sitter-zig";
|
||||
};
|
||||
|
@ -382,12 +382,12 @@ in
|
||||
|
||||
codeium-nvim = let
|
||||
# Update according to https://github.com/Exafunction/codeium.nvim/blob/main/lua/codeium/versions.json
|
||||
codeiumVersion = "1.8.80";
|
||||
codeiumVersion = "1.16.18";
|
||||
codeiumHashes = {
|
||||
x86_64-linux = "sha256-ULHO7NrbW0DDlOYiSHGXwJ+NOa68Ma+HMHgq2WyAKBA=";
|
||||
aarch64-linux = "sha256-WVqPV/D9jPADkxt5XmydqXjSG8461URPsk1+W/kyZV0=";
|
||||
x86_64-darwin = "sha256-0P/eYZp0Wieza0btOA+yxqKtoIYlUN6MhN0dI6R8GEg=";
|
||||
aarch64-darwin = "sha256-2Cv22+Ii+otKLDQ404l9R/x42PkKTEzPB72/gc9wfig=";
|
||||
x86_64-linux = "sha256-/m+t4abPgVWeGpfDkPm5DGCIXm1LoM5znHfES9lotAo=";
|
||||
aarch64-linux = "sha256-0kR799yuxSFmyedJ14f5/EqOiFHs9cWjeJKvDIpIRl0=";
|
||||
x86_64-darwin = "sha256-7Go5qZVAe2UHn547HZG4fmh84iF2r15+0IIlJK72Fqg=";
|
||||
aarch64-darwin = "sha256-fe4GrgLRr66Qmme3p0X5BEwvKZhqG1aiE8xs5A1Dt6E=";
|
||||
};
|
||||
|
||||
codeium' = codeium.overrideAttrs rec {
|
||||
|
@ -13,19 +13,19 @@ let
|
||||
{
|
||||
x86_64-linux = {
|
||||
arch = "linux-x64";
|
||||
hash = "sha256-fvDzsFOG1pdmpC3RDY8zGP0yL/TzX6i00LnIX+yceVU=";
|
||||
hash = "sha256-NdVSQQ5OeBPGSLbynUArNbfm+a2HCc/gwJMKfEDgzDM=";
|
||||
};
|
||||
aarch64-linux = {
|
||||
arch = "linux-arm64";
|
||||
hash = "sha256-3yRZzOTuiTbkUUz1D3mZo7G5vayM6W9YBbJxTiVou9g=";
|
||||
hash = "sha256-4FjA3mUz+DVBiMUJAlGkUbpDtZuDYuUHPWA4QUiqd5w=";
|
||||
};
|
||||
x86_64-darwin = {
|
||||
arch = "darwin-x64";
|
||||
hash = "sha256-fKvR2bea4UxvnZ+LlWR/ahpKe8mk5f4mZrjqTFpsC5A=";
|
||||
hash = "sha256-aexe9hrUxb3ZnrgJrvEXu2PZPmxOGdkk9exrfDaXA7s=";
|
||||
};
|
||||
aarch64-darwin = {
|
||||
arch = "darwin-arm64";
|
||||
hash = "sha256-nkK3BH+MRi6KdThq4kYR9ZAfnuSkC2r/lKWpEtmD7Ak=";
|
||||
hash = "sha256-ijmKU+eU3R3mxeFxFr5AtVwGYVBuYWecD8W+0gHzP5w=";
|
||||
};
|
||||
}
|
||||
.${system} or (throw "Unsupported system: ${system}");
|
||||
@ -37,7 +37,7 @@ vscode-utils.buildVscodeMarketplaceExtension {
|
||||
# Please update the corresponding binary (typos-lsp)
|
||||
# when updating this extension.
|
||||
# See pkgs/by-name/ty/typos-lsp/package.nix
|
||||
version = "0.1.19";
|
||||
version = "0.1.26";
|
||||
inherit (extInfo) hash arch;
|
||||
};
|
||||
|
||||
|
@ -107,18 +107,18 @@ in
|
||||
|
||||
stdenv.mkDerivation (finalAttrs: {
|
||||
pname = "blender";
|
||||
version = "4.2.1";
|
||||
version = "4.2.2";
|
||||
|
||||
srcs = [
|
||||
(fetchzip {
|
||||
name = "source";
|
||||
url = "https://download.blender.org/source/blender-${finalAttrs.version}.tar.xz";
|
||||
hash = "sha256-+Y4JbzeK+30fO8WdEmvjOeQjm094ofsUhRFXs9mkcxI=";
|
||||
hash = "sha256-wv9EwB4DXSVS5K+lb+7gU3pTrMDO/ELeV2eErivfsWU=";
|
||||
})
|
||||
(fetchgit {
|
||||
name = "assets";
|
||||
url = "https://projects.blender.org/blender/blender-assets.git";
|
||||
rev = "6864f1832e71a31e1e04f72bb7a5a1f53f0cd01c";
|
||||
rev = "v${finalAttrs.version}";
|
||||
fetchLFS = true;
|
||||
hash = "sha256-vepK0inPMuleAJBSipwoI99nMBBiFaK/eSMHDetEtjY=";
|
||||
})
|
||||
|
@ -4,13 +4,13 @@
|
||||
# "nix-store --load-db" and "nix-store --register-validity
|
||||
# --hash-given".
|
||||
|
||||
{ stdenv, coreutils, jq }:
|
||||
{ stdenvNoCC, coreutils, jq }:
|
||||
|
||||
{ rootPaths }:
|
||||
|
||||
assert builtins.langVersion >= 5;
|
||||
|
||||
stdenv.mkDerivation {
|
||||
stdenvNoCC.mkDerivation {
|
||||
name = "closure-info";
|
||||
|
||||
__structuredAttrs = true;
|
||||
|
@ -8,7 +8,7 @@
|
||||
|
||||
rustPlatform.buildRustPackage rec {
|
||||
pname = "cosmic-screenshot";
|
||||
version = "1.0.0-alpha.1";
|
||||
version = "1.0.0-alpha.2";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "pop-os";
|
||||
@ -17,7 +17,7 @@ rustPlatform.buildRustPackage rec {
|
||||
hash = "sha256-+yHpRbK+AWnpcGrC5U0wKbt0u8tm3CFGjKTCDQpb3G0=";
|
||||
};
|
||||
|
||||
cargoHash = "sha256-d56y35npMPrQM0yF0ytNcOdMKBz9IQvEz37DNvKBBSk=";
|
||||
cargoHash = "sha256-fzIVyxzNknEjGJoR9sgXkY+gyuTC0T4Sy513X8umbWA=";
|
||||
|
||||
nativeBuildInputs = [ just pkg-config ];
|
||||
|
||||
|
@ -1,28 +1,28 @@
|
||||
{ stdenv
|
||||
, lib
|
||||
, callPackage
|
||||
, fetchFromGitHub
|
||||
, rustPlatform
|
||||
, cmake
|
||||
, protobuf
|
||||
, installShellFiles
|
||||
, libiconv
|
||||
, darwin
|
||||
, librusty_v8 ? callPackage ./librusty_v8.nix { }
|
||||
,
|
||||
{
|
||||
stdenv,
|
||||
lib,
|
||||
callPackage,
|
||||
fetchFromGitHub,
|
||||
rustPlatform,
|
||||
cmake,
|
||||
protobuf,
|
||||
installShellFiles,
|
||||
libiconv,
|
||||
darwin,
|
||||
librusty_v8 ? callPackage ./librusty_v8.nix { },
|
||||
}:
|
||||
rustPlatform.buildRustPackage rec {
|
||||
pname = "deno";
|
||||
version = "1.46.2";
|
||||
version = "1.46.3";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "denoland";
|
||||
repo = pname;
|
||||
rev = "v${version}";
|
||||
hash = "sha256-6rmAgGX7BnhbyDk0Pmp1uLBDywlK4cptTOfuvNhm0KE=";
|
||||
repo = "deno";
|
||||
rev = "refs/tags/v${version}";
|
||||
hash = "sha256-AM6SjcIHo6Koxcnznhkv3cXoKaMy2TEVpiWe/bczDuA=";
|
||||
};
|
||||
|
||||
cargoHash = "sha256-B+O2QYQDH+mqbnJhLumFWnv1b7dvnbpR7JG/3IS5tnI=";
|
||||
cargoHash = "sha256-D+CZpb6OTzM5Il0k8GQB7qSONy4myE5yKlaSkLLqHT8=";
|
||||
|
||||
postPatch = ''
|
||||
# upstream uses lld on aarch64-darwin for faster builds
|
||||
@ -39,8 +39,11 @@ rustPlatform.buildRustPackage rec {
|
||||
protobuf
|
||||
installShellFiles
|
||||
];
|
||||
buildInputs = lib.optionals stdenv.hostPlatform.isDarwin (
|
||||
[ libiconv darwin.libobjc ]
|
||||
buildInputs = lib.optionals stdenv.isDarwin (
|
||||
[
|
||||
libiconv
|
||||
darwin.libobjc
|
||||
]
|
||||
++ (with darwin.apple_sdk_11_0.frameworks; [
|
||||
Security
|
||||
CoreServices
|
||||
@ -102,6 +105,14 @@ rustPlatform.buildRustPackage rec {
|
||||
license = licenses.mit;
|
||||
mainProgram = "deno";
|
||||
maintainers = with maintainers; [ jk ];
|
||||
platforms = [ "x86_64-linux" "aarch64-linux" "x86_64-darwin" "aarch64-darwin" ];
|
||||
platforms = [
|
||||
"x86_64-linux"
|
||||
"aarch64-linux"
|
||||
"x86_64-darwin"
|
||||
"aarch64-darwin"
|
||||
];
|
||||
# NOTE: `aligned_alloc` error on darwin SDK < 10.15. Can't do usual overrideSDK with rust toolchain in current implementation.
|
||||
# Should be fixed with darwin SDK refactor and can be revisited.
|
||||
broken = stdenv.isDarwin && stdenv.isx86_64;
|
||||
};
|
||||
}
|
@ -12,8 +12,8 @@ const nixpkgs = Deno.cwd();
|
||||
// TODO: Read values from default.nix
|
||||
const owner = "denoland";
|
||||
const repo = "deno";
|
||||
const denoDir = `${nixpkgs}/pkgs/development/web/${repo}`;
|
||||
const src = `${denoDir}/default.nix`;
|
||||
const denoDir = `${nixpkgs}/pkgs/by-name/de/${repo}`;
|
||||
const src = `${denoDir}/package.nix`;
|
||||
const librusty_v8 = `${denoDir}/librusty_v8.nix`;
|
||||
const architectures: Architecture[] = [
|
||||
{ nix: "x86_64-linux", rust: "x86_64-unknown-linux-gnu" },
|
@ -7,19 +7,19 @@
|
||||
}:
|
||||
let
|
||||
pname = "open-webui";
|
||||
version = "0.3.28";
|
||||
version = "0.3.29";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "open-webui";
|
||||
repo = "open-webui";
|
||||
rev = "refs/tags/v${version}";
|
||||
hash = "sha256-DjwHylu6ke74dxPuMDbLMrfWL9yvmh4W8QGyLzzUZVg=";
|
||||
hash = "sha256-W1AjHzoQNCoK/Kbu+XX+tZG+aZqngDUkNKBM73kLBB0=";
|
||||
};
|
||||
|
||||
frontend = buildNpmPackage {
|
||||
inherit pname version src;
|
||||
|
||||
npmDepsHash = "sha256-AWKIqijjTKJJFOzFIcSas+cAq0mZSsYGsVNpk2yQ4ZE=";
|
||||
npmDepsHash = "sha256-9oe+6kEAGE/pHjBkHf3v/W53XPJAQ7Yfn0VecH3ZiQM=";
|
||||
|
||||
# Disabling `pyodide:fetch` as it downloads packages during `buildPhase`
|
||||
# Until this is solved, running python packages from the browser will not work.
|
||||
|
@ -1,7 +1,6 @@
|
||||
{
|
||||
lib,
|
||||
go_1_23,
|
||||
buildGoModule,
|
||||
buildGo123Module,
|
||||
fetchFromGitHub,
|
||||
installShellFiles,
|
||||
restic,
|
||||
@ -10,11 +9,7 @@
|
||||
resticprofile,
|
||||
}:
|
||||
|
||||
let
|
||||
# can be removed when the default go version is at least 1.23
|
||||
buildGoModule' = buildGoModule.override { go = go_1_23; };
|
||||
in
|
||||
buildGoModule' rec {
|
||||
buildGo123Module rec {
|
||||
pname = "resticprofile";
|
||||
version = "0.28.0";
|
||||
|
||||
|
2
pkgs/by-name/ry/rye/Cargo.lock
generated
2
pkgs/by-name/ry/rye/Cargo.lock
generated
@ -1819,7 +1819,7 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "rye"
|
||||
version = "0.39.0"
|
||||
version = "0.40.0"
|
||||
dependencies = [
|
||||
"age",
|
||||
"anyhow",
|
||||
|
@ -20,13 +20,13 @@
|
||||
|
||||
rustPlatform.buildRustPackage rec {
|
||||
pname = "rye";
|
||||
version = "0.39.0";
|
||||
version = "0.40.0";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "mitsuhiko";
|
||||
repo = "rye";
|
||||
rev = "refs/tags/${version}";
|
||||
hash = "sha256-qDXD5vNoIppe1EWKxr1tssgAelEKoMdZ/y7Dq979PwI=";
|
||||
hash = "sha256-EfmHCjDwpnxkKCxX1clFp1HxzlnJYkWscLMPonhOXOA=";
|
||||
};
|
||||
|
||||
cargoLock = {
|
||||
@ -85,11 +85,13 @@ rustPlatform.buildRustPackage rec {
|
||||
"--skip=test_config_show_path"
|
||||
"--skip=test_dotenv"
|
||||
"--skip=test_empty_sync"
|
||||
"--skip=test_exclude_hashes"
|
||||
"--skip=test_fetch"
|
||||
"--skip=test_init_default"
|
||||
"--skip=test_init_lib"
|
||||
"--skip=test_init_script"
|
||||
"--skip=test_lint_and_format"
|
||||
"--skip=test_list_never_overwrite"
|
||||
"--skip=test_list_not_rye_managed"
|
||||
"--skip=test_publish_outside_project"
|
||||
"--skip=test_version"
|
||||
|
@ -2,8 +2,7 @@
|
||||
lib,
|
||||
stdenv,
|
||||
fetchFromGitHub,
|
||||
buildGoModule,
|
||||
go_1_23,
|
||||
buildGo123Module,
|
||||
substituteAll,
|
||||
pandoc,
|
||||
nodejs,
|
||||
@ -45,7 +44,7 @@ stdenv.mkDerivation (finalAttrs: {
|
||||
hash = "sha256-xGxZ6xu8R/JoW4X+drEv943y1jah4ZijHB+RNN6hxig=";
|
||||
};
|
||||
|
||||
kernel = buildGoModule.override { go = go_1_23; } {
|
||||
kernel = buildGo123Module {
|
||||
name = "${finalAttrs.pname}-${finalAttrs.version}-kernel";
|
||||
inherit (finalAttrs) src;
|
||||
sourceRoot = "${finalAttrs.src.name}/kernel";
|
||||
|
@ -16,16 +16,16 @@ let
|
||||
in
|
||||
rustPlatform.buildRustPackage rec {
|
||||
pname = "surrealdb";
|
||||
version = "2.0.1";
|
||||
version = "2.0.2";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "surrealdb";
|
||||
repo = "surrealdb";
|
||||
rev = "v${version}";
|
||||
hash = "sha256-JFkTD/MGvak8EuDEABGH1xLykSNj4rtnnENAruls6W8=";
|
||||
hash = "sha256-kTTZx/IXXJrkC0qm4Nx0hYPbricNjwFshCq0aFYCTo0=";
|
||||
};
|
||||
|
||||
cargoHash = "sha256-N/4VHvBA9ij+VLPxJ+1237fnOHGoC6guZ62CYrwfHM4=";
|
||||
cargoHash = "sha256-K62RqJqYyuAPwm8zLIiASH7kbw6raXS6ZzINMevWav0=";
|
||||
|
||||
# error: linker `aarch64-linux-gnu-gcc` not found
|
||||
postPatch = ''
|
||||
|
@ -6,16 +6,16 @@ rustPlatform.buildRustPackage rec {
|
||||
pname = "typos-lsp";
|
||||
# Please update the corresponding VSCode extension too.
|
||||
# See pkgs/applications/editors/vscode/extensions/tekumara.typos-vscode/default.nix
|
||||
version = "0.1.19";
|
||||
version = "0.1.26";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "tekumara";
|
||||
repo = "typos-lsp";
|
||||
rev = "refs/tags/v${version}";
|
||||
hash = "sha256-3bXOMW6aU4ryJqrUmpCIbBqRWrh4R6tlkEHPqpPSsVI=";
|
||||
hash = "sha256-wyVNHWMxkRjfo2qOrAOIwUyTYdRyvwD+AfEBoLSchrA=";
|
||||
};
|
||||
|
||||
cargoHash = "sha256-3GHVGjn4upI7U8GyxwlrLpchWALGFuMSektCrwLiIIM=";
|
||||
cargoHash = "sha256-1wvDMAS0q0UzGb/jUNyq7G4cBxeRc+MSn7er378jaOw=";
|
||||
|
||||
# fix for compilation on aarch64
|
||||
# see https://github.com/NixOS/nixpkgs/issues/145726
|
||||
|
@ -0,0 +1,81 @@
|
||||
{
|
||||
cudaPackages,
|
||||
lib,
|
||||
writeGpuTestPython,
|
||||
# Configuration flags
|
||||
openCVFirst,
|
||||
useOpenCVDefaultCuda,
|
||||
useTorchDefaultCuda,
|
||||
}:
|
||||
let
|
||||
inherit (lib.strings) optionalString;
|
||||
|
||||
openCVBlock = ''
|
||||
|
||||
import cv2
|
||||
print("OpenCV version:", cv2.__version__)
|
||||
|
||||
# Ensure OpenCV can access the GPU.
|
||||
assert cv2.cuda.getCudaEnabledDeviceCount() > 0, "No CUDA devices found for OpenCV"
|
||||
print("OpenCV CUDA device:", cv2.cuda.printCudaDeviceInfo(cv2.cuda.getDevice()))
|
||||
|
||||
# Ensure OpenCV can access the GPU.
|
||||
print(cv2.getBuildInformation())
|
||||
|
||||
a = cv2.cuda.GpuMat(size=(256, 256), type=cv2.CV_32S, s=1)
|
||||
b = cv2.cuda.GpuMat(size=(256, 256), type=cv2.CV_32S, s=1)
|
||||
c = int(cv2.cuda.sum(cv2.cuda.add(a, b))[0]) # OpenCV returns a Scalar float object.
|
||||
|
||||
assert c == 2 * 256 * 256, f"Expected {2 * 256 * 256} OpenCV, got {c}"
|
||||
|
||||
'';
|
||||
|
||||
torchBlock = ''
|
||||
|
||||
import torch
|
||||
print("Torch version:", torch.__version__)
|
||||
|
||||
# Set up the GPU.
|
||||
torch.cuda.init()
|
||||
# Ensure the GPU is available.
|
||||
assert torch.cuda.is_available(), "CUDA is not available to Torch"
|
||||
print("Torch CUDA device:", torch.cuda.get_device_properties(torch.cuda.current_device()))
|
||||
|
||||
a = torch.ones(256, 256, dtype=torch.int32).cuda()
|
||||
b = torch.ones(256, 256, dtype=torch.int32).cuda()
|
||||
c = (a + b).sum().item()
|
||||
assert c == 2 * 256 * 256, f"Expected {2 * 256 * 256} for Torch, got {c}"
|
||||
|
||||
'';
|
||||
|
||||
content = if openCVFirst then openCVBlock + torchBlock else torchBlock + openCVBlock;
|
||||
|
||||
torchName = "torch" + optionalString useTorchDefaultCuda "-with-default-cuda";
|
||||
openCVName = "opencv4" + optionalString useOpenCVDefaultCuda "-with-default-cuda";
|
||||
in
|
||||
# TODO: Ensure the expected CUDA libraries are loaded.
|
||||
# TODO: Ensure GPU access works as expected.
|
||||
writeGpuTestPython {
|
||||
name = if openCVFirst then "${openCVName}-then-${torchName}" else "${torchName}-then-${openCVName}";
|
||||
libraries =
|
||||
# NOTE: These are purposefully in this order.
|
||||
pythonPackages:
|
||||
let
|
||||
effectiveOpenCV = pythonPackages.opencv4.override (prevAttrs: {
|
||||
cudaPackages = if useOpenCVDefaultCuda then prevAttrs.cudaPackages else cudaPackages;
|
||||
});
|
||||
effectiveTorch = pythonPackages.torchWithCuda.override (prevAttrs: {
|
||||
cudaPackages = if useTorchDefaultCuda then prevAttrs.cudaPackages else cudaPackages;
|
||||
});
|
||||
in
|
||||
if openCVFirst then
|
||||
[
|
||||
effectiveOpenCV
|
||||
effectiveTorch
|
||||
]
|
||||
else
|
||||
[
|
||||
effectiveTorch
|
||||
effectiveOpenCV
|
||||
];
|
||||
} content
|
@ -97,6 +97,12 @@
|
||||
}@inputs:
|
||||
|
||||
let
|
||||
inherit (lib.attrsets) mapAttrsToList optionalAttrs;
|
||||
inherit (lib.lists) last optionals;
|
||||
inherit (lib.meta) getExe;
|
||||
inherit (lib.strings) cmakeBool cmakeFeature cmakeOptionType concatStrings concatStringsSep optionalString;
|
||||
inherit (lib.trivial) flip;
|
||||
|
||||
version = "4.9.0";
|
||||
|
||||
# It's necessary to consistently use backendStdenv when building with CUDA
|
||||
@ -228,26 +234,23 @@ let
|
||||
};
|
||||
|
||||
# See opencv/cmake/OpenCVDownload.cmake
|
||||
installExtraFiles = extra: ''
|
||||
mkdir -p "${extra.dst}"
|
||||
'' + lib.concatStrings (lib.flip lib.mapAttrsToList extra.files (name: md5: ''
|
||||
ln -s "${extra.src}/${name}" "${extra.dst}/${md5}-${name}"
|
||||
installExtraFiles = {dst, files, src, ...}: ''
|
||||
mkdir -p "${dst}"
|
||||
'' + concatStrings (flip mapAttrsToList files (name: md5: ''
|
||||
ln -s "${src}/${name}" "${dst}/${md5}-${name}"
|
||||
''));
|
||||
installExtraFile = extra: ''
|
||||
mkdir -p "${extra.dst}"
|
||||
ln -s "${extra.src}" "${extra.dst}/${extra.md5}-${extra.name}"
|
||||
installExtraFile = {dst, md5, name, src, ...}: ''
|
||||
mkdir -p "${dst}"
|
||||
ln -s "${src}" "${dst}/${md5}-${name}"
|
||||
'';
|
||||
|
||||
opencvFlag = name: enabled: "-DWITH_${name}=${printEnabled enabled}";
|
||||
|
||||
printEnabled = enabled: if enabled then "ON" else "OFF";
|
||||
withOpenblas = (enableBlas && blas.provider.pname == "openblas");
|
||||
#multithreaded openblas conflicts with opencv multithreading, which manifest itself in hung tests
|
||||
#https://github.com/OpenMathLib/OpenBLAS/wiki/Faq/4bded95e8dc8aadc70ce65267d1093ca7bdefc4c#multi-threaded
|
||||
openblas_ = blas.provider.override { singleThreaded = true; };
|
||||
|
||||
inherit (cudaPackages) cudaFlags cudaVersion;
|
||||
inherit (cudaFlags) cudaCapabilities;
|
||||
inherit (cudaPackages) cudaFlags;
|
||||
inherit (cudaFlags) cmakeCudaArchitecturesString cudaCapabilities;
|
||||
|
||||
in
|
||||
|
||||
@ -258,20 +261,21 @@ effectiveStdenv.mkDerivation {
|
||||
outputs = [
|
||||
"out"
|
||||
"cxxdev"
|
||||
] ++ lib.optionals (runAccuracyTests || runPerformanceTests) [
|
||||
] ++ optionals (runAccuracyTests || runPerformanceTests) [
|
||||
"package_tests"
|
||||
];
|
||||
cudaPropagateToOutput = "cxxdev";
|
||||
|
||||
postUnpack = lib.optionalString buildContrib ''
|
||||
postUnpack = optionalString buildContrib ''
|
||||
cp --no-preserve=mode -r "${contribSrc}/modules" "$NIX_BUILD_TOP/source/opencv_contrib"
|
||||
'';
|
||||
|
||||
# Ensures that we use the system OpenEXR rather than the vendored copy of the source included with OpenCV.
|
||||
patches = [
|
||||
./cmake-don-t-use-OpenCVFindOpenEXR.patch
|
||||
] ++ lib.optionals enableContrib [
|
||||
] ++ lib.optional enableCuda ./cuda_opt_flow.patch;
|
||||
] ++ optionals enableCuda [
|
||||
./cuda_opt_flow.patch
|
||||
];
|
||||
|
||||
# This prevents cmake from using libraries in impure paths (which
|
||||
# causes build failure on non NixOS)
|
||||
@ -281,8 +285,8 @@ effectiveStdenv.mkDerivation {
|
||||
|
||||
preConfigure =
|
||||
installExtraFile ade +
|
||||
lib.optionalString enableIpp (installExtraFiles ippicv) + (
|
||||
lib.optionalString buildContrib ''
|
||||
optionalString enableIpp (installExtraFiles ippicv) + (
|
||||
optionalString buildContrib ''
|
||||
cmakeFlagsArray+=("-DOPENCV_EXTRA_MODULES_PATH=$NIX_BUILD_TOP/source/opencv_contrib")
|
||||
|
||||
${installExtraFiles vgg}
|
||||
@ -304,35 +308,35 @@ effectiveStdenv.mkDerivation {
|
||||
pcre2
|
||||
protobuf_21
|
||||
zlib
|
||||
] ++ lib.optionals enablePython [
|
||||
] ++ optionals enablePython [
|
||||
pythonPackages.python
|
||||
] ++ lib.optionals (effectiveStdenv.buildPlatform == effectiveStdenv.hostPlatform) [
|
||||
] ++ optionals (effectiveStdenv.buildPlatform == effectiveStdenv.hostPlatform) [
|
||||
hdf5
|
||||
] ++ lib.optionals enableGtk2 [
|
||||
] ++ optionals enableGtk2 [
|
||||
gtk2
|
||||
] ++ lib.optionals enableGtk3 [
|
||||
] ++ optionals enableGtk3 [
|
||||
gtk3
|
||||
] ++ lib.optionals enableVtk [
|
||||
] ++ optionals enableVtk [
|
||||
vtk
|
||||
] ++ lib.optionals enableJPEG [
|
||||
] ++ optionals enableJPEG [
|
||||
libjpeg
|
||||
] ++ lib.optionals enablePNG [
|
||||
] ++ optionals enablePNG [
|
||||
libpng
|
||||
] ++ lib.optionals enableTIFF [
|
||||
] ++ optionals enableTIFF [
|
||||
libtiff
|
||||
] ++ lib.optionals enableWebP [
|
||||
] ++ optionals enableWebP [
|
||||
libwebp
|
||||
] ++ lib.optionals enableEXR [
|
||||
] ++ optionals enableEXR [
|
||||
openexr
|
||||
ilmbase
|
||||
] ++ lib.optionals enableJPEG2000 [
|
||||
] ++ optionals enableJPEG2000 [
|
||||
openjpeg
|
||||
] ++ lib.optionals enableFfmpeg [
|
||||
] ++ optionals enableFfmpeg [
|
||||
ffmpeg
|
||||
] ++ lib.optionals (enableFfmpeg && effectiveStdenv.hostPlatform.isDarwin) [
|
||||
] ++ optionals (enableFfmpeg && effectiveStdenv.hostPlatform.isDarwin) [
|
||||
bzip2
|
||||
VideoDecodeAcceleration
|
||||
] ++ lib.optionals (enableGStreamer && effectiveStdenv.hostPlatform.isLinux) [
|
||||
] ++ optionals (enableGStreamer && effectiveStdenv.hostPlatform.isLinux) [
|
||||
elfutils
|
||||
gst_all_1.gst-plugins-base
|
||||
gst_all_1.gst-plugins-good
|
||||
@ -340,27 +344,27 @@ effectiveStdenv.mkDerivation {
|
||||
libunwind
|
||||
orc
|
||||
zstd
|
||||
] ++ lib.optionals enableOvis [
|
||||
] ++ optionals enableOvis [
|
||||
ogre
|
||||
] ++ lib.optionals enableGPhoto2 [
|
||||
] ++ optionals enableGPhoto2 [
|
||||
libgphoto2
|
||||
] ++ lib.optionals enableDC1394 [
|
||||
] ++ optionals enableDC1394 [
|
||||
libdc1394
|
||||
] ++ lib.optionals enableEigen [
|
||||
] ++ optionals enableEigen [
|
||||
eigen
|
||||
] ++ lib.optionals enableVA [
|
||||
] ++ optionals enableVA [
|
||||
libva
|
||||
] ++ lib.optionals enableBlas [
|
||||
] ++ optionals enableBlas [
|
||||
blas.provider
|
||||
] ++ lib.optionals enableTesseract [
|
||||
] ++ optionals enableTesseract [
|
||||
# There is seemingly no compile-time flag for Tesseract. It's
|
||||
# simply enabled automatically if contrib is built, and it detects
|
||||
# tesseract & leptonica.
|
||||
tesseract
|
||||
leptonica
|
||||
] ++ lib.optionals enableTbb [
|
||||
] ++ optionals enableTbb [
|
||||
tbb
|
||||
] ++ lib.optionals effectiveStdenv.hostPlatform.isDarwin [
|
||||
] ++ optionals effectiveStdenv.hostPlatform.isDarwin [
|
||||
bzip2
|
||||
AVFoundation
|
||||
Cocoa
|
||||
@ -368,76 +372,78 @@ effectiveStdenv.mkDerivation {
|
||||
CoreMedia
|
||||
MediaToolbox
|
||||
Accelerate
|
||||
] ++ lib.optionals enableDocs [
|
||||
] ++ optionals enableDocs [
|
||||
doxygen
|
||||
graphviz-nox
|
||||
] ++ lib.optionals enableCuda [
|
||||
] ++ optionals enableCuda [
|
||||
cudaPackages.cuda_cudart
|
||||
cudaPackages.cuda_cccl # <thrust/*>
|
||||
cudaPackages.libnpp # npp.h
|
||||
nvidia-optical-flow-sdk
|
||||
] ++ lib.optionals enableCublas [
|
||||
] ++ optionals enableCublas [
|
||||
# May start using the default $out instead once
|
||||
# https://github.com/NixOS/nixpkgs/issues/271792
|
||||
# has been addressed
|
||||
cudaPackages.libcublas # cublas_v2.h
|
||||
] ++ lib.optionals enableCudnn [
|
||||
] ++ optionals enableCudnn [
|
||||
cudaPackages.cudnn # cudnn.h
|
||||
] ++ lib.optionals enableCufft [
|
||||
] ++ optionals enableCufft [
|
||||
cudaPackages.libcufft # cufft.h
|
||||
];
|
||||
|
||||
propagatedBuildInputs = lib.optionals enablePython [ pythonPackages.numpy ];
|
||||
propagatedBuildInputs = optionals enablePython [ pythonPackages.numpy ];
|
||||
|
||||
nativeBuildInputs = [ cmake pkg-config unzip ]
|
||||
++ lib.optionals enablePython [
|
||||
nativeBuildInputs = [
|
||||
cmake
|
||||
pkg-config
|
||||
unzip
|
||||
] ++ optionals enablePython [
|
||||
pythonPackages.pip
|
||||
pythonPackages.wheel
|
||||
pythonPackages.setuptools
|
||||
] ++ lib.optionals enableCuda [
|
||||
] ++ optionals enableCuda [
|
||||
cudaPackages.cuda_nvcc
|
||||
];
|
||||
|
||||
env.NIX_CFLAGS_COMPILE = lib.optionalString enableEXR "-I${ilmbase.dev}/include/OpenEXR";
|
||||
env.NIX_CFLAGS_COMPILE = optionalString enableEXR "-I${ilmbase.dev}/include/OpenEXR";
|
||||
|
||||
# Configure can't find the library without this.
|
||||
OpenBLAS_HOME = lib.optionalString withOpenblas openblas_.dev;
|
||||
OpenBLAS = lib.optionalString withOpenblas openblas_;
|
||||
OpenBLAS_HOME = optionalString withOpenblas openblas_.dev;
|
||||
OpenBLAS = optionalString withOpenblas openblas_;
|
||||
|
||||
cmakeFlags = [
|
||||
"-DOPENCV_GENERATE_PKGCONFIG=ON"
|
||||
"-DWITH_OPENMP=ON"
|
||||
"-DBUILD_PROTOBUF=OFF"
|
||||
"-DProtobuf_PROTOC_EXECUTABLE=${lib.getExe buildPackages.protobuf_21}"
|
||||
"-DPROTOBUF_UPDATE_FILES=ON"
|
||||
"-DOPENCV_ENABLE_NONFREE=${printEnabled enableUnfree}"
|
||||
"-DBUILD_TESTS=${printEnabled runAccuracyTests}"
|
||||
"-DBUILD_PERF_TESTS=${printEnabled runPerformanceTests}"
|
||||
"-DCMAKE_SKIP_BUILD_RPATH=ON"
|
||||
"-DBUILD_DOCS=${printEnabled enableDocs}"
|
||||
(cmakeBool "OPENCV_GENERATE_PKGCONFIG" true)
|
||||
(cmakeBool "WITH_OPENMP" true)
|
||||
(cmakeBool "BUILD_PROTOBUF" false)
|
||||
(cmakeOptionType "path" "Protobuf_PROTOC_EXECUTABLE" (getExe buildPackages.protobuf_21))
|
||||
(cmakeBool "PROTOBUF_UPDATE_FILES" true)
|
||||
(cmakeBool "OPENCV_ENABLE_NONFREE" enableUnfree)
|
||||
(cmakeBool "BUILD_TESTS" runAccuracyTests)
|
||||
(cmakeBool "BUILD_PERF_TESTS" runPerformanceTests)
|
||||
(cmakeBool "CMAKE_SKIP_BUILD_RPATH" true)
|
||||
(cmakeBool "BUILD_DOCS" enableDocs)
|
||||
# "OpenCV disables pkg-config to avoid using of host libraries. Consider using PKG_CONFIG_LIBDIR to specify target SYSROOT"
|
||||
# but we have proper separation of build and host libs :), fixes cross
|
||||
"-DOPENCV_ENABLE_PKG_CONFIG=ON"
|
||||
(opencvFlag "IPP" enableIpp)
|
||||
(opencvFlag "TIFF" enableTIFF)
|
||||
(opencvFlag "WEBP" enableWebP)
|
||||
(opencvFlag "JPEG" enableJPEG)
|
||||
(opencvFlag "PNG" enablePNG)
|
||||
(opencvFlag "OPENEXR" enableEXR)
|
||||
(opencvFlag "OPENJPEG" enableJPEG2000)
|
||||
"-DWITH_JASPER=OFF" # OpenCV falls back to a vendored copy of Jasper when OpenJPEG is disabled
|
||||
(opencvFlag "TBB" enableTbb)
|
||||
(cmakeBool "OPENCV_ENABLE_PKG_CONFIG" true)
|
||||
(cmakeBool "WITH_IPP" enableIpp)
|
||||
(cmakeBool "WITH_TIFF" enableTIFF)
|
||||
(cmakeBool "WITH_WEBP" enableWebP)
|
||||
(cmakeBool "WITH_JPEG" enableJPEG)
|
||||
(cmakeBool "WITH_PNG" enablePNG)
|
||||
(cmakeBool "WITH_OPENEXR" enableEXR)
|
||||
(cmakeBool "WITH_OPENJPEG" enableJPEG2000)
|
||||
(cmakeBool "WITH_JASPER" false) # OpenCV falls back to a vendored copy of Jasper when OpenJPEG is disabled
|
||||
(cmakeBool "WITH_TBB" enableTbb)
|
||||
|
||||
# CUDA options
|
||||
(opencvFlag "CUDA" enableCuda)
|
||||
(opencvFlag "CUDA_FAST_MATH" enableCuda)
|
||||
(opencvFlag "CUBLAS" enableCublas)
|
||||
(opencvFlag "CUDNN" enableCudnn)
|
||||
(opencvFlag "CUFFT" enableCufft)
|
||||
(cmakeBool "WITH_CUDA" enableCuda)
|
||||
(cmakeBool "WITH_CUBLAS" enableCublas)
|
||||
(cmakeBool "WITH_CUDNN" enableCudnn)
|
||||
(cmakeBool "WITH_CUFFT" enableCufft)
|
||||
|
||||
# LTO options
|
||||
(opencvFlag "ENABLE_LTO" enableLto)
|
||||
(opencvFlag "ENABLE_THIN_LTO" (
|
||||
(cmakeBool "ENABLE_LTO" enableLto)
|
||||
(cmakeBool "ENABLE_THIN_LTO" (
|
||||
enableLto && (
|
||||
# Only clang supports thin LTO, so we must either be using clang through the effectiveStdenv,
|
||||
effectiveStdenv.cc.isClang ||
|
||||
@ -445,51 +451,53 @@ effectiveStdenv.mkDerivation {
|
||||
(enableCuda && effectiveStdenv.cc.isClang)
|
||||
)
|
||||
))
|
||||
] ++ lib.optionals enableCuda [
|
||||
"-DCUDA_FAST_MATH=ON"
|
||||
"-DCUDA_NVCC_FLAGS=--expt-relaxed-constexpr"
|
||||
] ++ optionals enableCuda [
|
||||
(cmakeBool "CUDA_FAST_MATH" true)
|
||||
(cmakeFeature "CUDA_NVCC_FLAGS" "--expt-relaxed-constexpr")
|
||||
|
||||
# OpenCV respects at least three variables:
|
||||
# -DCUDA_GENERATION takes a single arch name, e.g. Volta
|
||||
# -DCUDA_ARCH_BIN takes a semi-colon separated list of real arches, e.g. "8.0;8.6"
|
||||
# -DCUDA_ARCH_PTX takes the virtual arch, e.g. "8.6"
|
||||
"-DCUDA_ARCH_BIN=${lib.concatStringsSep ";" cudaCapabilities}"
|
||||
"-DCUDA_ARCH_PTX=${lib.last cudaCapabilities}"
|
||||
(cmakeFeature "CUDA_ARCH_BIN" cmakeCudaArchitecturesString)
|
||||
(cmakeFeature "CUDA_ARCH_PTX" (last cudaCapabilities))
|
||||
|
||||
"-DNVIDIA_OPTICAL_FLOW_2_0_HEADERS_PATH=${nvidia-optical-flow-sdk}"
|
||||
] ++ lib.optionals effectiveStdenv.hostPlatform.isDarwin [
|
||||
"-DWITH_OPENCL=OFF"
|
||||
"-DWITH_LAPACK=OFF"
|
||||
(cmakeOptionType "path" "NVIDIA_OPTICAL_FLOW_2_0_HEADERS_PATH" nvidia-optical-flow-sdk.outPath)
|
||||
] ++ optionals effectiveStdenv.hostPlatform.isDarwin [
|
||||
(cmakeBool "WITH_OPENCL" false)
|
||||
(cmakeBool "WITH_LAPACK" false)
|
||||
|
||||
# Disable unnecessary vendoring that's enabled by default only for Darwin.
|
||||
# Note that the opencvFlag feature flags listed above still take
|
||||
# precedence, so we can safely list everything here.
|
||||
"-DBUILD_ZLIB=OFF"
|
||||
"-DBUILD_TIFF=OFF"
|
||||
"-DBUILD_OPENJPEG=OFF"
|
||||
"-DBUILD_JASPER=OFF"
|
||||
"-DBUILD_JPEG=OFF"
|
||||
"-DBUILD_PNG=OFF"
|
||||
"-DBUILD_WEBP=OFF"
|
||||
] ++ lib.optionals (!effectiveStdenv.hostPlatform.isDarwin) [
|
||||
"-DOPENCL_LIBRARY=${ocl-icd}/lib/libOpenCL.so"
|
||||
] ++ lib.optionals enablePython [
|
||||
"-DOPENCV_SKIP_PYTHON_LOADER=ON"
|
||||
] ++ lib.optionals (enabledModules != [ ]) [
|
||||
"-DBUILD_LIST=${lib.concatStringsSep "," enabledModules}"
|
||||
(cmakeBool "BUILD_ZLIB" false)
|
||||
(cmakeBool "BUILD_TIFF" false)
|
||||
(cmakeBool "BUILD_OPENJPEG" false)
|
||||
(cmakeBool "BUILD_JASPER" false)
|
||||
(cmakeBool "BUILD_JPEG" false)
|
||||
(cmakeBool "BUILD_PNG" false)
|
||||
(cmakeBool "BUILD_WEBP" false)
|
||||
] ++ optionals (!effectiveStdenv.hostPlatform.isDarwin) [
|
||||
(cmakeOptionType "path" "OPENCL_LIBRARY" "${ocl-icd}/lib/libOpenCL.so")
|
||||
] ++ optionals enablePython [
|
||||
(cmakeBool "OPENCV_SKIP_PYTHON_LOADER" true)
|
||||
] ++ optionals (enabledModules != [ ]) [
|
||||
(cmakeFeature "BUILD_LIST" (concatStringsSep "," enabledModules))
|
||||
];
|
||||
|
||||
postBuild = lib.optionalString enableDocs ''
|
||||
postBuild = optionalString enableDocs ''
|
||||
make doxygen
|
||||
'';
|
||||
|
||||
preInstall =
|
||||
lib.optionalString (runAccuracyTests || runPerformanceTests) ''
|
||||
mkdir $package_tests
|
||||
cp -R $src/samples $package_tests/
|
||||
''
|
||||
+ lib.optionalString runAccuracyTests "mv ./bin/*test* $package_tests/ \n"
|
||||
+ lib.optionalString runPerformanceTests "mv ./bin/*perf* $package_tests/";
|
||||
optionalString (runAccuracyTests || runPerformanceTests) ''
|
||||
mkdir $package_tests
|
||||
cp -R $src/samples $package_tests/
|
||||
'' + optionalString runAccuracyTests ''
|
||||
mv ./bin/*test* $package_tests/
|
||||
'' + optionalString runPerformanceTests ''
|
||||
mv ./bin/*perf* $package_tests/
|
||||
'';
|
||||
|
||||
# By default $out/lib/pkgconfig/opencv4.pc looks something like this:
|
||||
#
|
||||
@ -510,12 +518,23 @@ effectiveStdenv.mkDerivation {
|
||||
''
|
||||
# fix deps not progagating from opencv4.cxxdev if cuda is disabled
|
||||
# see https://github.com/NixOS/nixpkgs/issues/276691
|
||||
+ lib.optionalString (!enableCuda) ''
|
||||
+ optionalString (!enableCuda) ''
|
||||
mkdir -p "$cxxdev/nix-support"
|
||||
echo "''${!outputDev}" >> "$cxxdev/nix-support/propagated-build-inputs"
|
||||
''
|
||||
# remove the requirement that the exact same version of CUDA is used in packages
|
||||
# consuming OpenCV's CMakes files
|
||||
+ optionalString enableCuda ''
|
||||
substituteInPlace "$out/lib/cmake/opencv4/OpenCVConfig.cmake" \
|
||||
--replace-fail \
|
||||
'find_host_package(CUDA ''${OpenCV_CUDA_VERSION} EXACT REQUIRED)' \
|
||||
'find_host_package(CUDA REQUIRED)' \
|
||||
--replace-fail \
|
||||
'message(FATAL_ERROR "OpenCV static library was compiled with CUDA' \
|
||||
'message("OpenCV static library was compiled with CUDA'
|
||||
''
|
||||
# install python distribution information, so other packages can `import opencv`
|
||||
+ lib.optionalString enablePython ''
|
||||
+ optionalString enablePython ''
|
||||
pushd $NIX_BUILD_TOP/$sourceRoot/modules/python/package
|
||||
python -m pip wheel --verbose --no-index --no-deps --no-clean --no-build-isolation --wheel-dir dist .
|
||||
|
||||
@ -536,18 +555,18 @@ effectiveStdenv.mkDerivation {
|
||||
tests = {
|
||||
inherit (gst_all_1) gst-plugins-bad;
|
||||
}
|
||||
// lib.optionalAttrs (!effectiveStdenv.hostPlatform.isDarwin) { inherit qimgv; }
|
||||
// lib.optionalAttrs (!enablePython) { pythonEnabled = pythonPackages.opencv4; }
|
||||
// lib.optionalAttrs (effectiveStdenv.buildPlatform != "x86_64-darwin") {
|
||||
// optionalAttrs (!effectiveStdenv.hostPlatform.isDarwin) { inherit qimgv; }
|
||||
// optionalAttrs (!enablePython) { pythonEnabled = pythonPackages.opencv4; }
|
||||
// optionalAttrs (effectiveStdenv.buildPlatform != "x86_64-darwin") {
|
||||
opencv4-tests = callPackage ./tests.nix {
|
||||
inherit enableGStreamer enableGtk2 enableGtk3 runAccuracyTests runPerformanceTests testDataSrc;
|
||||
inherit opencv4;
|
||||
};
|
||||
}
|
||||
// lib.optionalAttrs (enableCuda) {
|
||||
// optionalAttrs (enableCuda) {
|
||||
no-libstdcxx-errors = callPackage ./libstdcxx-test.nix { attrName = "opencv4"; };
|
||||
};
|
||||
} // lib.optionalAttrs enablePython { pythonPath = [ ]; };
|
||||
} // optionalAttrs enablePython { pythonPath = [ ]; };
|
||||
|
||||
meta = {
|
||||
description = "Open Computer Vision Library with more than 500 algorithms";
|
||||
|
@ -437,16 +437,16 @@ buildLuarocksPackage {
|
||||
fennel = callPackage({ buildLuarocksPackage, fetchFromGitHub, fetchurl, luaOlder }:
|
||||
buildLuarocksPackage {
|
||||
pname = "fennel";
|
||||
version = "1.5.0-1";
|
||||
version = "1.5.1-1";
|
||||
knownRockspec = (fetchurl {
|
||||
url = "mirror://luarocks/fennel-1.5.0-1.rockspec";
|
||||
sha256 = "0h3a8pinazcp3r3pwkm5inh0aynq9iizljhpk6sj8zhhp0s0bi4g";
|
||||
url = "mirror://luarocks/fennel-1.5.1-1.rockspec";
|
||||
sha256 = "02wq1rlgv2zl1x30vqpdf5nmblxv7kkwx9lwplj4rj1fp9s3m8mh";
|
||||
}).outPath;
|
||||
src = fetchFromGitHub {
|
||||
owner = "bakpakin";
|
||||
repo = "Fennel";
|
||||
rev = "1.5.0";
|
||||
hash = "sha256-4jF22lpfapxQvwH/vQh/ePiEfOc8pP2b7roOzPXZRTQ=";
|
||||
rev = "1.5.1";
|
||||
hash = "sha256-ciXElwX/F8YCFA6C0F3+8lnUPQlKYpcdpagAjoXZpyY=";
|
||||
};
|
||||
|
||||
disabled = luaOlder "5.1";
|
||||
@ -555,14 +555,14 @@ buildLuarocksPackage {
|
||||
fzf-lua = callPackage({ buildLuarocksPackage, fetchurl, fetchzip, luaOlder }:
|
||||
buildLuarocksPackage {
|
||||
pname = "fzf-lua";
|
||||
version = "0.0.1457-1";
|
||||
version = "0.0.1460-1";
|
||||
knownRockspec = (fetchurl {
|
||||
url = "mirror://luarocks/fzf-lua-0.0.1457-1.rockspec";
|
||||
sha256 = "1b1bad930cyicv9g0rd9k5hzk93kgxqk9gqw7adr7a9srb5gm431";
|
||||
url = "mirror://luarocks/fzf-lua-0.0.1460-1.rockspec";
|
||||
sha256 = "16bb285h191lx2cf2sjcljh9nlrzy45j0l8zhyy9c4jxd65jp3vp";
|
||||
}).outPath;
|
||||
src = fetchzip {
|
||||
url = "https://github.com/ibhagwan/fzf-lua/archive/f513524561060f2b9e3bd6d36ff046bfa03ca114.zip";
|
||||
sha256 = "0rqh2bvh1bp5i4y1xrvggi0d27a6qbpkvcinrq0c6s9k8g84d7wy";
|
||||
url = "https://github.com/ibhagwan/fzf-lua/archive/cf4f7e095f679856fa8fe74e1539fb60fa552bdd.zip";
|
||||
sha256 = "04vsj928wm4q73v9jmp3ari5g2hl8m1bk03hm9bxlb879w95vjhb";
|
||||
};
|
||||
|
||||
disabled = luaOlder "5.1";
|
||||
@ -622,14 +622,14 @@ buildLuarocksPackage {
|
||||
haskell-tools-nvim = callPackage({ buildLuarocksPackage, fetchurl, fetchzip, luaOlder }:
|
||||
buildLuarocksPackage {
|
||||
pname = "haskell-tools.nvim";
|
||||
version = "4.0.1-1";
|
||||
version = "4.1.0-1";
|
||||
knownRockspec = (fetchurl {
|
||||
url = "mirror://luarocks/haskell-tools.nvim-4.0.1-1.rockspec";
|
||||
sha256 = "1kz93jm9fx5qga4nszb0g3rgravzrz4qb8fbns87hl5qidrh20rq";
|
||||
url = "mirror://luarocks/haskell-tools.nvim-4.1.0-1.rockspec";
|
||||
sha256 = "12p38gnld2j7x8n4hzi8js104pnlz3plk6s0aziy93z6lspm1i94";
|
||||
}).outPath;
|
||||
src = fetchzip {
|
||||
url = "https://github.com/mrcjkb/haskell-tools.nvim/archive/4.0.1.zip";
|
||||
sha256 = "160mnzjf6f5aw2k9fb2g416wxj3fqhpig1myppglp1586hm7b3fl";
|
||||
url = "https://github.com/mrcjkb/haskell-tools.nvim/archive/v4.1.0.zip";
|
||||
sha256 = "13aj1sxjkjsdmifjq0jgqaiv5rhglb3kv4r3ja1hrpv434889glr";
|
||||
};
|
||||
|
||||
disabled = luaOlder "5.1";
|
||||
@ -2492,14 +2492,14 @@ buildLuarocksPackage {
|
||||
lz-n = callPackage({ buildLuarocksPackage, fetchurl, fetchzip, luaOlder }:
|
||||
buildLuarocksPackage {
|
||||
pname = "lz.n";
|
||||
version = "2.6.1-1";
|
||||
version = "2.8.0-1";
|
||||
knownRockspec = (fetchurl {
|
||||
url = "mirror://luarocks/lz.n-2.6.1-1.rockspec";
|
||||
sha256 = "01zg2hhwy8fd60h8akh7rc3b4wmdjrn0hxm11gqrnla80dvww91c";
|
||||
url = "mirror://luarocks/lz.n-2.8.0-1.rockspec";
|
||||
sha256 = "0mkplfgsnlsc1xjcxxx349bi0h28rgri46hb514xicaqi48jvd8q";
|
||||
}).outPath;
|
||||
src = fetchzip {
|
||||
url = "https://github.com/nvim-neorocks/lz.n/archive/v2.6.1.zip";
|
||||
sha256 = "0j4pbaibf6zry4m15rb5xkx6ivycdfkfq0x2hdiwi82abir3ycaz";
|
||||
url = "https://github.com/nvim-neorocks/lz.n/archive/v2.8.0.zip";
|
||||
sha256 = "18p7zwns44b29pkm3iwh0wsdx1227ja1vww6g13m7gcsvn0h2pgw";
|
||||
};
|
||||
|
||||
disabled = luaOlder "5.1";
|
||||
@ -2743,14 +2743,14 @@ buildLuarocksPackage {
|
||||
neotest = callPackage({ buildLuarocksPackage, fetchurl, fetchzip, luaOlder, nvim-nio, plenary-nvim }:
|
||||
buildLuarocksPackage {
|
||||
pname = "neotest";
|
||||
version = "5.4.1-1";
|
||||
version = "5.6.0-1";
|
||||
knownRockspec = (fetchurl {
|
||||
url = "mirror://luarocks/neotest-5.4.1-1.rockspec";
|
||||
sha256 = "0js7f2z6bsww9wlzzc1xrimrzz35nxhsn01hj3yhn4m0x7da20wi";
|
||||
url = "mirror://luarocks/neotest-5.6.0-1.rockspec";
|
||||
sha256 = "06ggk7swsbwy12rqmzkg173wh7sj6jiy6vp7nbb9f7ikgf9iqs6j";
|
||||
}).outPath;
|
||||
src = fetchzip {
|
||||
url = "https://github.com/nvim-neotest/neotest/archive/808cc4e2290c5e7c2440d32876ca15d580b01d04.zip";
|
||||
sha256 = "1xc9mmpkjcxv64rx0b73mm3wlniyyiyhs73s7n6pl4cxc93f2vpl";
|
||||
url = "https://github.com/nvim-neotest/neotest/archive/48f8b5fce704594eb0ff94338e080defca14f0dc.zip";
|
||||
sha256 = "0cr3qbds7g5ybndaaiafh758v6igzjz65l81mqragk9kcajkwkip";
|
||||
};
|
||||
|
||||
disabled = luaOlder "5.1";
|
||||
@ -2911,8 +2911,8 @@ buildLuarocksPackage {
|
||||
src = fetchFromGitHub {
|
||||
owner = "nvim-lua";
|
||||
repo = "plenary.nvim";
|
||||
rev = "a3e3bc82a3f95c5ed0d7201546d5d2c19b20d683";
|
||||
hash = "sha256-5Jf2mWFVDofXBcXLbMa417mqlEPWLA+cQIZH/vNEV1g=";
|
||||
rev = "2d9b06177a975543726ce5c73fca176cedbffe9d";
|
||||
hash = "sha256-bmmPekAvuBvLQmrnnX0n+FRBqfVxBsObhxIEkDGAla4=";
|
||||
};
|
||||
|
||||
disabled = luaOlder "5.1" || luaAtLeast "5.4";
|
||||
@ -2974,14 +2974,14 @@ buildLuarocksPackage {
|
||||
rest-nvim = callPackage({ buildLuarocksPackage, fetchurl, fetchzip, fidget-nvim, luaOlder, mimetypes, nvim-nio, xml2lua }:
|
||||
buildLuarocksPackage {
|
||||
pname = "rest.nvim";
|
||||
version = "3.7.0-1";
|
||||
version = "3.8.1-1";
|
||||
knownRockspec = (fetchurl {
|
||||
url = "mirror://luarocks/rest.nvim-3.7.0-1.rockspec";
|
||||
sha256 = "192vhinbvnj040xn6zclrf147f6ymiqah5lc8ijmx1yd8p0f730w";
|
||||
url = "mirror://luarocks/rest.nvim-3.8.1-1.rockspec";
|
||||
sha256 = "12xabrgbbma759khdk5g4j11qg6c08xz0yf78rpv70x9v1kfjbzi";
|
||||
}).outPath;
|
||||
src = fetchzip {
|
||||
url = "https://github.com/rest-nvim/rest.nvim/archive/v3.7.0.zip";
|
||||
sha256 = "03sfij7k1myz0nb6hy16wan3s64dk1vhq24akpmgw7xb1dasn3ay";
|
||||
url = "https://github.com/rest-nvim/rest.nvim/archive/v3.8.1.zip";
|
||||
sha256 = "0yg3zmm00m48ahcjvnnkxvz0xqjbwn46jf01rwqzhwrwb9v3323z";
|
||||
};
|
||||
|
||||
disabled = luaOlder "5.1";
|
||||
@ -2998,14 +2998,14 @@ buildLuarocksPackage {
|
||||
rocks-config-nvim = callPackage({ buildLuarocksPackage, fetchurl, fetchzip, luaOlder, rocks-nvim }:
|
||||
buildLuarocksPackage {
|
||||
pname = "rocks-config.nvim";
|
||||
version = "2.3.1-1";
|
||||
version = "3.0.0-1";
|
||||
knownRockspec = (fetchurl {
|
||||
url = "mirror://luarocks/rocks-config.nvim-2.3.1-1.rockspec";
|
||||
sha256 = "01pk8k2a81rxg5raysw3wbs0azk10ghh1f2nk2k4khnzw0b6xzpp";
|
||||
url = "mirror://luarocks/rocks-config.nvim-3.0.0-1.rockspec";
|
||||
sha256 = "08jg5v1jnmg0ig395d6lmsdpa2vw8m9w3barvar0s77a7lkxgywg";
|
||||
}).outPath;
|
||||
src = fetchzip {
|
||||
url = "https://github.com/nvim-neorocks/rocks-config.nvim/archive/v2.3.1.zip";
|
||||
sha256 = "0arvwb7c55mhcmngh3x2j56qbxfx9vp87nsxyzrsvd31ldgbsqdn";
|
||||
url = "https://github.com/nvim-neorocks/rocks-config.nvim/archive/v3.0.0.zip";
|
||||
sha256 = "16836pxg0bq6f8qj6kn73v75kbwlr533pmv9dal4h53qldqjn9hh";
|
||||
};
|
||||
|
||||
disabled = luaOlder "5.1";
|
||||
@ -3046,14 +3046,14 @@ buildLuarocksPackage {
|
||||
rocks-git-nvim = callPackage({ buildLuarocksPackage, fetchurl, fetchzip, luaOlder, nvim-nio, rocks-nvim }:
|
||||
buildLuarocksPackage {
|
||||
pname = "rocks-git.nvim";
|
||||
version = "2.2.0-1";
|
||||
version = "2.3.1-1";
|
||||
knownRockspec = (fetchurl {
|
||||
url = "mirror://luarocks/rocks-git.nvim-2.2.0-1.rockspec";
|
||||
sha256 = "07pfqirhyphz283b5hs6ggwb2xlnigj3vj17hwhmb2fcv9ib3f61";
|
||||
url = "mirror://luarocks/rocks-git.nvim-2.3.1-1.rockspec";
|
||||
sha256 = "06psladknqjqqg7gb17550iy40bfk6m5pcwr2156xk136dil4bpz";
|
||||
}).outPath;
|
||||
src = fetchzip {
|
||||
url = "https://github.com/nvim-neorocks/rocks-git.nvim/archive/v2.2.0.zip";
|
||||
sha256 = "10cp3bdy04m4x0yrcivkgnqbs65rcrkgf14awc87wn727drs68sz";
|
||||
url = "https://github.com/nvim-neorocks/rocks-git.nvim/archive/v2.3.1.zip";
|
||||
sha256 = "1y8zs4dcr8npqjicbi8xjgnfb5fhqv0j6mwzpfl2bzm979s6hz4b";
|
||||
};
|
||||
|
||||
disabled = luaOlder "5.1";
|
||||
@ -3070,14 +3070,14 @@ buildLuarocksPackage {
|
||||
rocks-nvim = callPackage({ buildLuarocksPackage, fetchurl, fetchzip, fidget-nvim, fzy, luaOlder, luarocks, nvim-nio, rtp-nvim, toml-edit }:
|
||||
buildLuarocksPackage {
|
||||
pname = "rocks.nvim";
|
||||
version = "2.40.0-1";
|
||||
version = "2.40.2-1";
|
||||
knownRockspec = (fetchurl {
|
||||
url = "mirror://luarocks/rocks.nvim-2.40.0-1.rockspec";
|
||||
sha256 = "11cjx1cm4nynrs099r556a5yhkah9hxpylx5r6sqy0vwccvwplxp";
|
||||
url = "mirror://luarocks/rocks.nvim-2.40.2-1.rockspec";
|
||||
sha256 = "1vblf19kqddn0fs94ra6a58h19qid6591svh7n5kjvk8l3lnk4kv";
|
||||
}).outPath;
|
||||
src = fetchzip {
|
||||
url = "https://github.com/nvim-neorocks/rocks.nvim/archive/v2.40.0.zip";
|
||||
sha256 = "00x5mn83w19ssahwg1bsmn3m5j4pmlg1caqlfpgx3b2hczas1v7l";
|
||||
url = "https://github.com/nvim-neorocks/rocks.nvim/archive/v2.40.2.zip";
|
||||
sha256 = "12b6gfbnv0aw10rk36c8hqf3mjbm9izjf1dpf3r9i4fwimvbp4dd";
|
||||
};
|
||||
|
||||
disabled = luaOlder "5.1";
|
||||
@ -3117,14 +3117,14 @@ buildLuarocksPackage {
|
||||
rustaceanvim = callPackage({ buildLuarocksPackage, fetchurl, fetchzip, luaOlder }:
|
||||
buildLuarocksPackage {
|
||||
pname = "rustaceanvim";
|
||||
version = "5.4.2-1";
|
||||
version = "5.9.0-1";
|
||||
knownRockspec = (fetchurl {
|
||||
url = "mirror://luarocks/rustaceanvim-5.4.2-1.rockspec";
|
||||
sha256 = "114ydzvchla7vam2ijihr66x88p5ww3r58zdb3fgc6dbbpcxjnrb";
|
||||
url = "mirror://luarocks/rustaceanvim-5.9.0-1.rockspec";
|
||||
sha256 = "1azrsay1608lx921mlgkxk46xqlf5hbgbnl2n7c71f21xr5q2wq6";
|
||||
}).outPath;
|
||||
src = fetchzip {
|
||||
url = "https://github.com/mrcjkb/rustaceanvim/archive/5.4.2.zip";
|
||||
sha256 = "1nq9s0fnqjgbj1vcwf15512lp6i3w0axmca2hskmalyj65k157y1";
|
||||
url = "https://github.com/mrcjkb/rustaceanvim/archive/v5.9.0.zip";
|
||||
sha256 = "03szlh93579v5gqdiqqi2nqs90g1cm75cahijkwylqq0gj04xyz3";
|
||||
};
|
||||
|
||||
disabled = luaOlder "5.1";
|
||||
@ -3336,8 +3336,8 @@ buildLuarocksPackage {
|
||||
src = fetchFromGitHub {
|
||||
owner = "nvim-telescope";
|
||||
repo = "telescope.nvim";
|
||||
rev = "927c10f748e49c543b2d544c321a1245302ff324";
|
||||
hash = "sha256-dF6O5elMbm5JOeMI7UAyrwhq8Ng52/yBwpNJRWNAizQ=";
|
||||
rev = "b324469959908c1c7434eb65d80e87895e6828f7";
|
||||
hash = "sha256-j+BAufOZKUhPC0xSXOAaALJBdLNw2fgB1rGDskz4AIE=";
|
||||
};
|
||||
|
||||
disabled = lua.luaversion != "5.1";
|
||||
|
@ -555,7 +555,7 @@ in
|
||||
});
|
||||
|
||||
neotest = prev.neotest.overrideAttrs(oa: {
|
||||
doCheck = true;
|
||||
doCheck = stdenv.isLinux;
|
||||
nativeCheckInputs = oa.nativeCheckInputs ++ [
|
||||
final.nlua final.busted neovim-unwrapped
|
||||
];
|
||||
|
@ -16,13 +16,13 @@
|
||||
|
||||
buildPecl rec {
|
||||
pname = "mongodb";
|
||||
version = "1.19.4";
|
||||
version = "1.20.0";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "mongodb";
|
||||
repo = "mongo-php-driver";
|
||||
rev = version;
|
||||
hash = "sha256-71CS9boQzW2NMmkQeOQjGaTx2CN3bkcfgO5NwV9J9JI=";
|
||||
hash = "sha256-+Q/z5xrhiKTh2hVT6sdpI6sY6E7MTtTJQZBGASy5tAU=";
|
||||
fetchSubmodules = true;
|
||||
};
|
||||
|
||||
|
@ -11,14 +11,14 @@
|
||||
|
||||
buildPythonPackage rec {
|
||||
pname = "snakemake-storage-plugin-xrootd";
|
||||
version = "0.1.3";
|
||||
version = "0.1.4";
|
||||
pyproject = true;
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "snakemake";
|
||||
repo = pname;
|
||||
rev = "refs/tags/v${version}";
|
||||
hash = "sha256-Wo6eF8XlHh9OiD2rTMCchyq1sQ8gjkKnoD4JsKDmJ2A=";
|
||||
hash = "sha256-1plBss9jRzIIGQE7rXDEnAomFxNzSUKsw0VyhYA2mIc=";
|
||||
};
|
||||
|
||||
# xrootd<6.0.0,>=5.6.4 not satisfied by version 5.7rc20240303
|
||||
|
@ -9,14 +9,14 @@
|
||||
|
||||
buildPythonPackage rec {
|
||||
pname = "stookwijzer";
|
||||
version = "1.4.9";
|
||||
version = "1.4.10";
|
||||
pyproject = true;
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "fwestenberg";
|
||||
repo = "stookwijzer";
|
||||
rev = "refs/tags/v${version}";
|
||||
hash = "sha256-QXCusmbt40Tg73ozl9nIDgMtQJ152uNhOuFyHn+OEA8=";
|
||||
hash = "sha256-uvmv35rdmqfr+psGQdnb3g2q72qCx4ew3gJdGeun6W8=";
|
||||
};
|
||||
|
||||
build-system = [ setuptools ];
|
||||
|
@ -31,7 +31,6 @@
|
||||
nbformat,
|
||||
pandas,
|
||||
parameterized,
|
||||
pathtools,
|
||||
protobuf,
|
||||
psutil,
|
||||
pydantic,
|
||||
@ -85,7 +84,6 @@ buildPythonPackage rec {
|
||||
click
|
||||
docker-pycreds
|
||||
gitpython
|
||||
pathtools
|
||||
protobuf
|
||||
psutil
|
||||
pyyaml
|
||||
|
@ -12,6 +12,7 @@
|
||||
, unzip
|
||||
, wrapGAppsHook3
|
||||
, xorg
|
||||
, darwin
|
||||
}:
|
||||
|
||||
let
|
||||
@ -24,6 +25,10 @@ let
|
||||
platform = "linux-arm64";
|
||||
checksum = "sha256-rB0ak6jYnJMb0aHDLAyhaGoOFK4FXDLEOeofNdW/Wk8=";
|
||||
};
|
||||
aarch64-darwin = {
|
||||
platform = "darwin-arm64";
|
||||
checksum = "sha256-L2rhtB/DIK7Qum2YNoWVBn4mf+DA3rbcBUfZEEa/C8c=";
|
||||
};
|
||||
};
|
||||
inherit (stdenv.hostPlatform) system;
|
||||
binary = availableBinaries.${system} or (throw "cypress: No binaries available for system ${system}");
|
||||
@ -35,27 +40,37 @@ in stdenv.mkDerivation rec {
|
||||
src = fetchzip {
|
||||
url = "https://cdn.cypress.io/desktop/${version}/${platform}/cypress.zip";
|
||||
sha256 = checksum;
|
||||
stripRoot = !stdenv.isDarwin;
|
||||
};
|
||||
|
||||
# don't remove runtime deps
|
||||
dontPatchELF = true;
|
||||
|
||||
nativeBuildInputs = [ autoPatchelfHook (wrapGAppsHook3.override { makeWrapper = makeShellWrapper; }) unzip makeShellWrapper];
|
||||
nativeBuildInputs = [ unzip makeShellWrapper ]
|
||||
++ lib.optionals stdenv.isLinux [ autoPatchelfHook (wrapGAppsHook3.override { makeWrapper = makeShellWrapper; }) ];
|
||||
|
||||
buildInputs = with xorg; [
|
||||
buildInputs = lib.optionals stdenv.isLinux (with xorg; [
|
||||
libXScrnSaver
|
||||
libXdamage
|
||||
libXtst
|
||||
libxshmfence
|
||||
] ++ [
|
||||
nss
|
||||
gtk2
|
||||
alsa-lib
|
||||
gtk3
|
||||
mesa # for libgbm
|
||||
];
|
||||
]) ++ lib.optionals stdenv.isDarwin (with darwin.apple_sdk.frameworks; [
|
||||
Cocoa
|
||||
CoreServices
|
||||
CoreMedia
|
||||
CoreAudio
|
||||
AudioToolbox
|
||||
AVFoundation
|
||||
Foundation
|
||||
ApplicationServices
|
||||
]);
|
||||
|
||||
runtimeDependencies = [ (lib.getLib udev) ];
|
||||
runtimeDependencies = lib.optional stdenv.isLinux (lib.getLib udev);
|
||||
|
||||
installPhase = ''
|
||||
runHook preInstall
|
||||
@ -68,11 +83,15 @@ in stdenv.mkDerivation rec {
|
||||
printf '{"version":"%b"}' $version > $out/bin/resources/app/package.json
|
||||
# Cypress now looks for binary_state.json in bin
|
||||
echo '{"verified": true}' > $out/binary_state.json
|
||||
ln -s $out/opt/cypress/Cypress $out/bin/cypress
|
||||
${if stdenv.isDarwin then ''
|
||||
ln -s $out/opt/cypress/Cypress.app/Contents/MacOS/Cypress $out/bin/cypress
|
||||
'' else ''
|
||||
ln -s $out/opt/cypress/Cypress $out/bin/cypress
|
||||
''}
|
||||
runHook postInstall
|
||||
'';
|
||||
|
||||
postFixup = ''
|
||||
postFixup = lib.optionalString (!stdenv.isDarwin) ''
|
||||
# exit with 1 after 25.05
|
||||
makeWrapper $out/opt/cypress/Cypress $out/bin/Cypress \
|
||||
--run 'echo "Warning: Use the lowercase cypress executable instead of the capitalized one."'
|
||||
|
@ -57,13 +57,13 @@ let
|
||||
|
||||
in stdenv.mkDerivation rec {
|
||||
pname = "zoneminder";
|
||||
version = "1.36.33";
|
||||
version = "1.36.34";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "ZoneMinder";
|
||||
repo = "zoneminder";
|
||||
rev = version;
|
||||
hash = "sha256-KUhFZrF7BuLB2Z3LnTcHEEZVA6iosam6YsOd8KWvx7E=";
|
||||
hash = "sha256-ClO1f0Aspz04C8wgQurtHWmwzu2f4RZ/1oGjPN8HQrw=";
|
||||
fetchSubmodules = true;
|
||||
};
|
||||
|
||||
|
@ -227,6 +227,7 @@ mapAliases {
|
||||
cawbird = throw "cawbird has been abandoned upstream and is broken anyways due to Twitter closing its API";
|
||||
ccloud-cli = throw "ccloud-cli has been removed, please use confluent-cli instead"; # Added 2023-06-09
|
||||
certmgr-selfsigned = certmgr; # Added 2023-11-30
|
||||
challenger = taler-challenger; # Added 2024-09-04
|
||||
chefdk = throw "chefdk has been removed due to being deprecated upstream by Chef Workstation"; # Added 2023-03-22
|
||||
chia = throw "chia has been removed. see https://github.com/NixOS/nixpkgs/pull/270254"; # Added 2023-11-30
|
||||
chia-dev-tools = throw "chia-dev-tools has been removed. see https://github.com/NixOS/nixpkgs/pull/270254"; # Added 2023-11-30
|
||||
@ -1516,6 +1517,7 @@ mapAliases {
|
||||
swtpm-tpm2 = swtpm; # Added 2021-02-26
|
||||
Sylk = sylk; # Added 2024-06-12
|
||||
symbiyosys = sby; # Added 2024-08-18
|
||||
sync = taler-sync; # Added 2024-09-04
|
||||
syncthing-cli = syncthing; # Added 2021-04-06
|
||||
syncthingtray-qt6 = syncthingtray; # Added 2024-03-06
|
||||
|
||||
|
@ -6894,8 +6894,6 @@ with pkgs;
|
||||
|
||||
deer = callPackage ../shells/zsh/zsh-deer { };
|
||||
|
||||
deno = callPackage ../development/web/deno { };
|
||||
|
||||
deqp-runner = callPackage ../tools/graphics/deqp-runner { };
|
||||
|
||||
detox = callPackage ../tools/misc/detox { };
|
||||
@ -22555,6 +22553,11 @@ with pkgs;
|
||||
inherit (darwin.apple_sdk.frameworks)
|
||||
AVFoundation Cocoa VideoDecodeAcceleration CoreMedia MediaToolbox Accelerate;
|
||||
pythonPackages = python3Packages;
|
||||
# TODO(@connorbaker): OpenCV 4.9 only supports up to CUDA 12.3.
|
||||
cudaPackages = cudaPackages_12_3;
|
||||
# TODO: LTO does not work.
|
||||
# https://github.com/NixOS/nixpkgs/issues/343123
|
||||
enableLto = false;
|
||||
};
|
||||
|
||||
opencv4WithoutCuda = opencv4.override {
|
||||
|
@ -33,7 +33,9 @@ let
|
||||
attrsets
|
||||
customisation
|
||||
fixedPoints
|
||||
lists
|
||||
strings
|
||||
trivial
|
||||
versions
|
||||
;
|
||||
# Backbone
|
||||
@ -81,6 +83,45 @@ let
|
||||
nccl = final.callPackage ../development/cuda-modules/nccl { };
|
||||
nccl-tests = final.callPackage ../development/cuda-modules/nccl-tests { };
|
||||
|
||||
tests =
|
||||
let
|
||||
bools = [
|
||||
true
|
||||
false
|
||||
];
|
||||
configs = {
|
||||
openCVFirst = bools;
|
||||
useOpenCVDefaultCuda = bools;
|
||||
useTorchDefaultCuda = bools;
|
||||
};
|
||||
builder =
|
||||
{
|
||||
openCVFirst,
|
||||
useOpenCVDefaultCuda,
|
||||
useTorchDefaultCuda,
|
||||
}@config:
|
||||
{
|
||||
name = strings.concatStringsSep "-" (
|
||||
[
|
||||
"test"
|
||||
(if openCVFirst then "opencv" else "torch")
|
||||
]
|
||||
++ lists.optionals (if openCVFirst then useOpenCVDefaultCuda else useTorchDefaultCuda) [
|
||||
"with-default-cuda"
|
||||
]
|
||||
++ [
|
||||
"then"
|
||||
(if openCVFirst then "torch" else "opencv")
|
||||
]
|
||||
++ lists.optionals (if openCVFirst then useTorchDefaultCuda else useOpenCVDefaultCuda) [
|
||||
"with-default-cuda"
|
||||
]
|
||||
);
|
||||
value = final.callPackage ../development/cuda-modules/tests/opencv-and-torch config;
|
||||
};
|
||||
in
|
||||
attrsets.listToAttrs (attrsets.mapCartesianProduct builder configs);
|
||||
|
||||
writeGpuTestPython = final.callPackage ../development/cuda-modules/write-gpu-test-python.nix { };
|
||||
});
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user