Merge master into staging-next
This commit is contained in:
commit
97afa6ec9b
|
@ -52,9 +52,9 @@ with lib;
|
||||||
services.getty.helpLine = ''
|
services.getty.helpLine = ''
|
||||||
The "nixos" and "root" accounts have empty passwords.
|
The "nixos" and "root" accounts have empty passwords.
|
||||||
|
|
||||||
An ssh daemon is running. You then must set a password
|
To log in over ssh you must set a password for either "nixos" or "root"
|
||||||
for either "root" or "nixos" with `passwd` or add an ssh key
|
with `passwd` (prefix with `sudo` for "root"), or add your public key to
|
||||||
to /home/nixos/.ssh/authorized_keys be able to login.
|
/home/nixos/.ssh/authorized_keys or /root/.ssh/authorized_keys.
|
||||||
|
|
||||||
If you need a wireless connection, type
|
If you need a wireless connection, type
|
||||||
`sudo systemctl start wpa_supplicant` and configure a
|
`sudo systemctl start wpa_supplicant` and configure a
|
||||||
|
@ -65,8 +65,8 @@ with lib;
|
||||||
start the graphical user interface.
|
start the graphical user interface.
|
||||||
'';
|
'';
|
||||||
|
|
||||||
# We run sshd by default. Login via root is only possible after adding a
|
# We run sshd by default. Login is only possible after adding a
|
||||||
# password via "passwd" or by adding a ssh key to /home/nixos/.ssh/authorized_keys.
|
# password via "passwd" or by adding a ssh key to ~/.ssh/authorized_keys.
|
||||||
# The latter one is particular useful if keys are manually added to
|
# The latter one is particular useful if keys are manually added to
|
||||||
# installation device for head-less systems i.e. arm boards by manually
|
# installation device for head-less systems i.e. arm boards by manually
|
||||||
# mounting the storage in a different system.
|
# mounting the storage in a different system.
|
||||||
|
|
|
@ -16,7 +16,9 @@ in
|
||||||
default = false;
|
default = false;
|
||||||
type = types.bool;
|
type = types.bool;
|
||||||
description = lib.mdDoc ''
|
description = lib.mdDoc ''
|
||||||
Whether to enable the systemd DNS resolver daemon.
|
Whether to enable the systemd DNS resolver daemon, `systemd-resolved`.
|
||||||
|
|
||||||
|
Search for `services.resolved` to see all options.
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -25,13 +25,13 @@
|
||||||
|
|
||||||
stdenv.mkDerivation rec {
|
stdenv.mkDerivation rec {
|
||||||
pname = "tauon";
|
pname = "tauon";
|
||||||
version = "7.6.2";
|
version = "7.6.3";
|
||||||
|
|
||||||
src = fetchFromGitHub {
|
src = fetchFromGitHub {
|
||||||
owner = "Taiko2k";
|
owner = "Taiko2k";
|
||||||
repo = "TauonMusicBox";
|
repo = "TauonMusicBox";
|
||||||
rev = "v${version}";
|
rev = "v${version}";
|
||||||
hash = "sha256-x/tHCDplC45XEaBaf0aQ0w8AS1SorXtYilJoiOcBDtM=";
|
hash = "sha256-cNR4Ffn9HvgL5KV4FUSnbzEh6VfoKaIbfpb18/qKEns=";
|
||||||
};
|
};
|
||||||
|
|
||||||
postUnpack = ''
|
postUnpack = ''
|
||||||
|
|
|
@ -706,7 +706,7 @@ self: super: {
|
||||||
});
|
});
|
||||||
|
|
||||||
noice-nvim = super.noice-nvim.overrideAttrs(old: {
|
noice-nvim = super.noice-nvim.overrideAttrs(old: {
|
||||||
dependencies = with self; [ nui-nvim nvim-notify ];
|
dependencies = with self; [ nui-nvim ];
|
||||||
});
|
});
|
||||||
|
|
||||||
null-ls-nvim = super.null-ls-nvim.overrideAttrs (old: {
|
null-ls-nvim = super.null-ls-nvim.overrideAttrs (old: {
|
||||||
|
|
|
@ -16,16 +16,16 @@
|
||||||
|
|
||||||
rustPlatform.buildRustPackage rec {
|
rustPlatform.buildRustPackage rec {
|
||||||
pname = "binocle";
|
pname = "binocle";
|
||||||
version = "0.3.0";
|
version = "0.3.1";
|
||||||
|
|
||||||
src = fetchFromGitHub {
|
src = fetchFromGitHub {
|
||||||
owner = "sharkdp";
|
owner = "sharkdp";
|
||||||
repo = pname;
|
repo = pname;
|
||||||
rev = "v${version}";
|
rev = "v${version}";
|
||||||
sha256 = "0b0hf2aq34kxxj0la0yar5sp44k6mqcbyailp6j6q0mksf1l74bc";
|
sha256 = "sha256-L4l8Gl7Ok/TWqHjNujPx8Qk3UWebs0SgOQNyBNtpnZo=";
|
||||||
};
|
};
|
||||||
|
|
||||||
cargoSha256 = "sha256-CZWAHWZYaL54Rl6Jrp8B6w6HK+2fIKQle2x4mGHv2/o=";
|
cargoHash = "sha256-9d0MNQ7jEJKpGbjVtl1XBoOBEVNKDgFouSMrcZ7tXNU=";
|
||||||
|
|
||||||
nativeBuildInputs = [
|
nativeBuildInputs = [
|
||||||
makeWrapper
|
makeWrapper
|
||||||
|
|
|
@ -18,9 +18,9 @@ mkDerivation rec {
|
||||||
'';
|
'';
|
||||||
|
|
||||||
# LaTeX is used from $PATH, as people often want to have it with extra pkgs
|
# LaTeX is used from $PATH, as people often want to have it with extra pkgs
|
||||||
nativeBuildInputs = [ pkg-config makeWrapper ];
|
nativeBuildInputs = [ pkg-config makeWrapper python3 ];
|
||||||
buildInputs = [
|
buildInputs = [
|
||||||
qtbase qtsvg python3 file/*for libmagic*/ bc
|
qtbase qtsvg file/*for libmagic*/ bc
|
||||||
hunspell # enchant
|
hunspell # enchant
|
||||||
];
|
];
|
||||||
|
|
||||||
|
|
|
@ -19,22 +19,22 @@
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"beta": {
|
"beta": {
|
||||||
"version": "112.0.5615.49",
|
"version": "113.0.5672.24",
|
||||||
"sha256": "0hgzbbmz40235binfn3vkkxzvwxilaxg04dclqrz980z7hvkgzfx",
|
"sha256": "1z7yv5lqi1n4ycymkf0kz1v8ig06n430a37ik8hri3a6db8r9lv8",
|
||||||
"sha256bin64": "146gd9csj08d1ygwwh6gyqqbi7d34mhv3vv7wv4a8z9hn7jhdifg",
|
"sha256bin64": "1y9jaw47dgphqr2l8yc36s7k9lf4qrbmfll1d2d1zdjd5ma3slab",
|
||||||
"deps": {
|
"deps": {
|
||||||
"gn": {
|
"gn": {
|
||||||
"version": "2023-02-17",
|
"version": "2023-03-18",
|
||||||
"url": "https://gn.googlesource.com/gn",
|
"url": "https://gn.googlesource.com/gn",
|
||||||
"rev": "b25a2f8c2d33f02082f0f258350f5e22c0973108",
|
"rev": "41fef642de70ecdcaaa26be96d56a0398f95abd4",
|
||||||
"sha256": "075p4jwk1apvwmqmvhwfw5f669ci7nxwjq9mz5aa2g5lz4fkdm4c"
|
"sha256": "12w4g2dl58283allclpi1c4i6ih9v2xvdb9hpbmfda12v8lizmlq"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"dev": {
|
"dev": {
|
||||||
"version": "113.0.5672.24",
|
"version": "114.0.5696.0",
|
||||||
"sha256": "1z7yv5lqi1n4ycymkf0kz1v8ig06n430a37ik8hri3a6db8r9lv8",
|
"sha256": "0hcf971azy3jjsl211qk53b6nk0f4pzf2dwfv3rjh4f6fa3nbwai",
|
||||||
"sha256bin64": "0byksvk781gmh5fmjmc77jh19gvkzadf78yr9b4c42las44g4pn4",
|
"sha256bin64": "1ssj633vdg3ghd87az28q262ly1fk7rc3k70l1531xvj2030ijrl",
|
||||||
"deps": {
|
"deps": {
|
||||||
"gn": {
|
"gn": {
|
||||||
"version": "2023-03-18",
|
"version": "2023-03-18",
|
||||||
|
|
5193
pkgs/applications/networking/remote/rustdesk/Cargo.lock
generated
Normal file
5193
pkgs/applications/networking/remote/rustdesk/Cargo.lock
generated
Normal file
File diff suppressed because it is too large
Load diff
|
@ -1,38 +1,3 @@
|
||||||
diff --git a/Cargo.lock b/Cargo.lock
|
|
||||||
index fb17c7e..ef157e5 100644
|
|
||||||
--- a/Cargo.lock
|
|
||||||
+++ b/Cargo.lock
|
|
||||||
@@ -2332,10 +2332,10 @@ dependencies = [
|
|
||||||
[[package]]
|
|
||||||
name = "magnum-opus"
|
|
||||||
version = "0.4.0"
|
|
||||||
-source = "git+https://github.com/open-trade/magnum-opus#3c3d0b86ae95c84930bebffe4bcb03b3bd83342b"
|
|
||||||
+source = "git+https://github.com/TheRadioGuy/magnum-opus#171e1d021004626f7444d1e39b98f50bc3cb2604"
|
|
||||||
dependencies = [
|
|
||||||
- "bindgen",
|
|
||||||
- "target_build_utils",
|
|
||||||
+ "libc",
|
|
||||||
+ "opusic-sys",
|
|
||||||
]
|
|
||||||
|
|
||||||
[[package]]
|
|
||||||
@@ -2796,6 +2796,16 @@ version = "0.1.5"
|
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
||||||
checksum = "ff011a302c396a5197692431fc1948019154afc178baf7d8e37367442a4601cf"
|
|
||||||
|
|
||||||
+[[package]]
|
|
||||||
+name = "opusic-sys"
|
|
||||||
+version = "0.3.6"
|
|
||||||
+source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
||||||
+checksum = "5eace752ce07a037241dba8f02c654799f051e431b27028056bcb480e83b54f5"
|
|
||||||
+dependencies = [
|
|
||||||
+ "cmake",
|
|
||||||
+ "libc",
|
|
||||||
+]
|
|
||||||
+
|
|
||||||
[[package]]
|
|
||||||
name = "os_str_bytes"
|
|
||||||
version = "6.0.0"
|
|
||||||
diff --git a/Cargo.toml b/Cargo.toml
|
diff --git a/Cargo.toml b/Cargo.toml
|
||||||
index 1b715bd..960e8da 100644
|
index 1b715bd..960e8da 100644
|
||||||
--- a/Cargo.toml
|
--- a/Cargo.toml
|
||||||
|
|
|
@ -1,5 +1,4 @@
|
||||||
{ lib
|
{ lib
|
||||||
, stdenv
|
|
||||||
, fetchFromGitHub
|
, fetchFromGitHub
|
||||||
, makeDesktopItem
|
, makeDesktopItem
|
||||||
, copyDesktopItems
|
, copyDesktopItems
|
||||||
|
@ -8,7 +7,6 @@
|
||||||
, cmake
|
, cmake
|
||||||
, yasm
|
, yasm
|
||||||
, nasm
|
, nasm
|
||||||
, zip
|
|
||||||
, pkg-config
|
, pkg-config
|
||||||
, clang
|
, clang
|
||||||
, gtk3
|
, gtk3
|
||||||
|
@ -43,9 +41,22 @@ rustPlatform.buildRustPackage rec {
|
||||||
./fix-for-rust-1.65.diff
|
./fix-for-rust-1.65.diff
|
||||||
];
|
];
|
||||||
|
|
||||||
cargoSha256 = "sha256-1OMWEk+DerltF7kwdo4d04rbgIFLHBRq3vZaL7jtrdE=";
|
LIBCLANG_PATH = "${llvmPackages.libclang.lib}/lib";
|
||||||
|
|
||||||
LIBCLANG_PATH="${llvmPackages.libclang.lib}/lib";
|
cargoLock = {
|
||||||
|
lockFile = ./Cargo.lock;
|
||||||
|
outputHashes = {
|
||||||
|
"confy-0.4.0" = "sha256-e91cvEixhpPzIthAxzTa3fDY6eCsHUy/eZQAqs7QTDo=";
|
||||||
|
"parity-tokio-ipc-0.7.3-1" = "sha256-eULJePtBu0iBI3It/bPH0h82Obsb1PJALgwYwrnCFYI=";
|
||||||
|
"rdev-0.5.0-2" = "sha256-7CEZ2wIM4QAPfY1tGKqXfHplTaxHnccVqFRPjY21Svo=";
|
||||||
|
"tokio-socks-0.5.1-1" = "sha256-45QQ6FrhGU9uEhbKXTKd/mY6MDumO6p46NmlakdyDQk=";
|
||||||
|
"libappindicator-0.6.1" = "sha256-JGnnZrcwbh8WJ6+/4bYhfD3HvgF2C7XaaGb6TaMRWdw=";
|
||||||
|
"magnum-opus-0.4.0" = "sha256-U5uuN4YolOYDnFNbtPpwYefcBDTUUyioui0UCcW8dyo=";
|
||||||
|
"rust-pulsectl-0.2.12" = "sha256-8jXTspWvjONFcvw9/Z8C43g4BuGZ3rsG32tvLMQbtbM=";
|
||||||
|
"sciter-rs-0.5.57" = "sha256-ZZnZDhMjK0LjgmK0da1yvB0uoKueLhhhQtzmjoN+1R0=";
|
||||||
|
"systray-0.4.1" = "sha256-p1PMr/8oS6zHx4+Ng4zCqt0xZ57cq3wAu6/agyWq5Jw=";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
# Change magnus-opus version to upstream so that it does not use
|
# Change magnus-opus version to upstream so that it does not use
|
||||||
# vcpkg for libopus since it does not work.
|
# vcpkg for libopus since it does not work.
|
||||||
|
@ -55,35 +66,37 @@ rustPlatform.buildRustPackage rec {
|
||||||
|
|
||||||
# Manually simulate a vcpkg installation so that it can link the libaries
|
# Manually simulate a vcpkg installation so that it can link the libaries
|
||||||
# properly.
|
# properly.
|
||||||
postUnpack = let
|
postUnpack =
|
||||||
vcpkg_target = "x64-linux";
|
let
|
||||||
|
vcpkg_target = "x64-linux";
|
||||||
|
|
||||||
updates_vcpkg_file = writeText "update_vcpkg_rustdesk"
|
updates_vcpkg_file = writeText "update_vcpkg_rustdesk"
|
||||||
|
''
|
||||||
|
Package : libyuv
|
||||||
|
Architecture : ${vcpkg_target}
|
||||||
|
Version : 1.0
|
||||||
|
Status : is installed
|
||||||
|
|
||||||
|
Package : libvpx
|
||||||
|
Architecture : ${vcpkg_target}
|
||||||
|
Version : 1.0
|
||||||
|
Status : is installed
|
||||||
|
'';
|
||||||
|
in
|
||||||
''
|
''
|
||||||
Package : libyuv
|
export VCPKG_ROOT="$TMP/vcpkg";
|
||||||
Architecture : ${vcpkg_target}
|
|
||||||
Version : 1.0
|
|
||||||
Status : is installed
|
|
||||||
|
|
||||||
Package : libvpx
|
mkdir -p $VCPKG_ROOT/.vcpkg-root
|
||||||
Architecture : ${vcpkg_target}
|
mkdir -p $VCPKG_ROOT/installed/${vcpkg_target}/lib
|
||||||
Version : 1.0
|
mkdir -p $VCPKG_ROOT/installed/vcpkg/updates
|
||||||
Status : is installed
|
ln -s ${updates_vcpkg_file} $VCPKG_ROOT/installed/vcpkg/status
|
||||||
|
mkdir -p $VCPKG_ROOT/installed/vcpkg/info
|
||||||
|
touch $VCPKG_ROOT/installed/vcpkg/info/libyuv_1.0_${vcpkg_target}.list
|
||||||
|
touch $VCPKG_ROOT/installed/vcpkg/info/libvpx_1.0_${vcpkg_target}.list
|
||||||
|
|
||||||
|
ln -s ${libvpx.out}/lib/* $VCPKG_ROOT/installed/${vcpkg_target}/lib/
|
||||||
|
ln -s ${libyuv.out}/lib/* $VCPKG_ROOT/installed/${vcpkg_target}/lib/
|
||||||
'';
|
'';
|
||||||
in ''
|
|
||||||
export VCPKG_ROOT="$TMP/vcpkg";
|
|
||||||
|
|
||||||
mkdir -p $VCPKG_ROOT/.vcpkg-root
|
|
||||||
mkdir -p $VCPKG_ROOT/installed/${vcpkg_target}/lib
|
|
||||||
mkdir -p $VCPKG_ROOT/installed/vcpkg/updates
|
|
||||||
ln -s ${updates_vcpkg_file} $VCPKG_ROOT/installed/vcpkg/status
|
|
||||||
mkdir -p $VCPKG_ROOT/installed/vcpkg/info
|
|
||||||
touch $VCPKG_ROOT/installed/vcpkg/info/libyuv_1.0_${vcpkg_target}.list
|
|
||||||
touch $VCPKG_ROOT/installed/vcpkg/info/libvpx_1.0_${vcpkg_target}.list
|
|
||||||
|
|
||||||
ln -s ${libvpx.out}/lib/* $VCPKG_ROOT/installed/${vcpkg_target}/lib/
|
|
||||||
ln -s ${libyuv.out}/lib/* $VCPKG_ROOT/installed/${vcpkg_target}/lib/
|
|
||||||
'';
|
|
||||||
|
|
||||||
nativeBuildInputs = [ pkg-config cmake makeWrapper copyDesktopItems yasm nasm clang wrapGAppsHook ];
|
nativeBuildInputs = [ pkg-config cmake makeWrapper copyDesktopItems yasm nasm clang wrapGAppsHook ];
|
||||||
buildInputs = [ alsa-lib pulseaudio libXfixes libxcb xdotool gtk3 libvpx libopus libXtst libyuv ];
|
buildInputs = [ alsa-lib pulseaudio libXfixes libxcb xdotool gtk3 libvpx libopus libXtst libyuv ];
|
||||||
|
@ -91,15 +104,22 @@ rustPlatform.buildRustPackage rec {
|
||||||
# Checks require an active X display.
|
# Checks require an active X display.
|
||||||
doCheck = false;
|
doCheck = false;
|
||||||
|
|
||||||
desktopItems = [ (makeDesktopItem {
|
desktopItems = [
|
||||||
name = "rustdesk";
|
(makeDesktopItem {
|
||||||
exec = meta.mainProgram;
|
name = "rustdesk";
|
||||||
icon = "rustdesk";
|
exec = meta.mainProgram;
|
||||||
desktopName = "RustDesk";
|
icon = "rustdesk";
|
||||||
comment = meta.description;
|
desktopName = "RustDesk";
|
||||||
genericName = "Remote Desktop";
|
comment = meta.description;
|
||||||
categories = ["Network"];
|
genericName = "Remote Desktop";
|
||||||
}) ];
|
categories = [ "Network" ];
|
||||||
|
})
|
||||||
|
];
|
||||||
|
|
||||||
|
postPatch = ''
|
||||||
|
rm Cargo.lock
|
||||||
|
ln -s ${./Cargo.lock} Cargo.lock
|
||||||
|
'';
|
||||||
|
|
||||||
# Add static ui resources and libsciter to same folder as binary so that it
|
# Add static ui resources and libsciter to same folder as binary so that it
|
||||||
# can find them.
|
# can find them.
|
||||||
|
@ -122,7 +142,7 @@ rustPlatform.buildRustPackage rec {
|
||||||
description = "Yet another remote desktop software";
|
description = "Yet another remote desktop software";
|
||||||
homepage = "https://rustdesk.com";
|
homepage = "https://rustdesk.com";
|
||||||
license = licenses.gpl3Only;
|
license = licenses.gpl3Only;
|
||||||
maintainers = with maintainers; [ leixb ];
|
maintainers = with maintainers; [ ocfox leixb ];
|
||||||
platforms = [ "x86_64-linux" ];
|
platforms = [ "x86_64-linux" ];
|
||||||
mainProgram = "rustdesk";
|
mainProgram = "rustdesk";
|
||||||
};
|
};
|
||||||
|
|
|
@ -254,6 +254,11 @@ rec {
|
||||||
meta = with lib; {
|
meta = with lib; {
|
||||||
homepage = "https://www.docker.com/";
|
homepage = "https://www.docker.com/";
|
||||||
description = "An open source project to pack, ship and run any application as a lightweight container";
|
description = "An open source project to pack, ship and run any application as a lightweight container";
|
||||||
|
longDescription = ''
|
||||||
|
Docker is a platform designed to help developers build, share, and run modern applications.
|
||||||
|
|
||||||
|
To enable the docker daemon on NixOS, set the `virtualisation.docker.enable` option to `true`.
|
||||||
|
'';
|
||||||
license = licenses.asl20;
|
license = licenses.asl20;
|
||||||
maintainers = with maintainers; [ offline tailhook vdemeester periklis mikroskeem maxeaubrey ];
|
maintainers = with maintainers; [ offline tailhook vdemeester periklis mikroskeem maxeaubrey ];
|
||||||
};
|
};
|
||||||
|
|
|
@ -37,13 +37,8 @@ assert (url == "") || (urls == []);
|
||||||
assert (repos != []) || (url != "") || (urls != []);
|
assert (repos != []) || (url != "") || (urls != []);
|
||||||
|
|
||||||
let
|
let
|
||||||
name_ =
|
pname = (lib.replaceStrings [ "." ] [ "_" ] groupId) + "_" + (lib.replaceStrings [ "." ] [ "_" ] artifactId);
|
||||||
lib.concatStrings [
|
suffix = lib.optionalString (classifier != null) "-${classifier}";
|
||||||
(lib.replaceStrings ["."] ["_"] groupId) "_"
|
|
||||||
(lib.replaceStrings ["."] ["_"] artifactId) "-"
|
|
||||||
version
|
|
||||||
];
|
|
||||||
suffix = if isNull classifier then "" else "-${classifier}";
|
|
||||||
filename = "${artifactId}-${version}${suffix}.jar";
|
filename = "${artifactId}-${version}${suffix}.jar";
|
||||||
mkJarUrl = repoUrl:
|
mkJarUrl = repoUrl:
|
||||||
lib.concatStringsSep "/" [
|
lib.concatStringsSep "/" [
|
||||||
|
@ -59,13 +54,13 @@ let
|
||||||
else map mkJarUrl repos;
|
else map mkJarUrl repos;
|
||||||
jar =
|
jar =
|
||||||
fetchurl (
|
fetchurl (
|
||||||
builtins.removeAttrs args ["groupId" "artifactId" "version" "classifier" "repos" "url" ]
|
builtins.removeAttrs args [ "groupId" "artifactId" "version" "classifier" "repos" "url" ]
|
||||||
// { urls = urls_; name = "${name_}.jar"; }
|
// { urls = urls_; name = "${pname}-${version}.jar"; }
|
||||||
);
|
);
|
||||||
in
|
in
|
||||||
stdenv.mkDerivation {
|
stdenv.mkDerivation {
|
||||||
name = name_;
|
inherit pname version;
|
||||||
phases = "installPhase fixupPhase";
|
dontUnpack = true;
|
||||||
# By moving the jar to $out/share/java we make it discoverable by java
|
# By moving the jar to $out/share/java we make it discoverable by java
|
||||||
# packages packages that mention this derivation in their buildInputs.
|
# packages packages that mention this derivation in their buildInputs.
|
||||||
installPhase = ''
|
installPhase = ''
|
||||||
|
|
|
@ -24,6 +24,8 @@
|
||||||
, targetDir ? "llvm"
|
, targetDir ? "llvm"
|
||||||
, targetProjects ? [ ]
|
, targetProjects ? [ ]
|
||||||
, targetRuntimes ? [ ]
|
, targetRuntimes ? [ ]
|
||||||
|
# "NATIVE" resolves into x86 or aarch64 depending on stdenv
|
||||||
|
, llvmTargetsToBuild ? [ "NATIVE" ]
|
||||||
, extraPatches ? [ ]
|
, extraPatches ? [ ]
|
||||||
, extraNativeBuildInputs ? [ ]
|
, extraNativeBuildInputs ? [ ]
|
||||||
, extraBuildInputs ? [ ]
|
, extraBuildInputs ? [ ]
|
||||||
|
@ -46,6 +48,8 @@ let
|
||||||
if stdenv.isx86_64 then "X86"
|
if stdenv.isx86_64 then "X86"
|
||||||
else if stdenv.isAarch64 then "AArch64"
|
else if stdenv.isAarch64 then "AArch64"
|
||||||
else throw "Unsupported ROCm LLVM platform";
|
else throw "Unsupported ROCm LLVM platform";
|
||||||
|
inferNativeTarget = t: if t == "NATIVE" then llvmNativeTarget else t;
|
||||||
|
llvmTargetsToBuild' = [ "AMDGPU" ] ++ builtins.map inferNativeTarget llvmTargetsToBuild;
|
||||||
in stdenv.mkDerivation (finalAttrs: {
|
in stdenv.mkDerivation (finalAttrs: {
|
||||||
pname = "rocm-llvm-${targetName}";
|
pname = "rocm-llvm-${targetName}";
|
||||||
version = "5.4.4";
|
version = "5.4.4";
|
||||||
|
@ -98,7 +102,7 @@ in stdenv.mkDerivation (finalAttrs: {
|
||||||
sourceRoot = "${finalAttrs.src.name}/${targetDir}";
|
sourceRoot = "${finalAttrs.src.name}/${targetDir}";
|
||||||
|
|
||||||
cmakeFlags = [
|
cmakeFlags = [
|
||||||
"-DLLVM_TARGETS_TO_BUILD=AMDGPU;${llvmNativeTarget}"
|
"-DLLVM_TARGETS_TO_BUILD=${builtins.concatStringsSep ";" llvmTargetsToBuild'}"
|
||||||
] ++ lib.optionals (finalAttrs.passthru.isLLVM && targetProjects != [ ]) [
|
] ++ lib.optionals (finalAttrs.passthru.isLLVM && targetProjects != [ ]) [
|
||||||
"-DLLVM_ENABLE_PROJECTS=${lib.concatStringsSep ";" targetProjects}"
|
"-DLLVM_ENABLE_PROJECTS=${lib.concatStringsSep ";" targetProjects}"
|
||||||
] ++ lib.optionals ((finalAttrs.passthru.isLLVM || targetDir == "runtimes") && targetRuntimes != [ ]) [
|
] ++ lib.optionals ((finalAttrs.passthru.isLLVM || targetDir == "runtimes") && targetRuntimes != [ ]) [
|
||||||
|
|
|
@ -37,19 +37,19 @@ stdenv.mkDerivation rec {
|
||||||
flex
|
flex
|
||||||
bison
|
bison
|
||||||
pkg-config
|
pkg-config
|
||||||
];
|
python
|
||||||
|
] ++ lib.optional python.isPy3k python.pkgs.setuptools;
|
||||||
|
|
||||||
buildInputs = [
|
buildInputs = [
|
||||||
python
|
|
||||||
libxml2
|
libxml2
|
||||||
libusb1
|
libusb1
|
||||||
] ++ lib.optional python.isPy3k python.pkgs.setuptools
|
] ++ lib.optional avahiSupport avahi
|
||||||
++ lib.optional avahiSupport avahi
|
|
||||||
++ lib.optional stdenv.isLinux libaio
|
++ lib.optional stdenv.isLinux libaio
|
||||||
++ lib.optionals stdenv.isDarwin [ CFNetwork CoreServices ];
|
++ lib.optionals stdenv.isDarwin [ CFNetwork CoreServices ];
|
||||||
|
|
||||||
cmakeFlags = [
|
cmakeFlags = [
|
||||||
"-DUDEV_RULES_INSTALL_DIR=${placeholder "out"}/lib/udev/rules.d"
|
"-DUDEV_RULES_INSTALL_DIR=${placeholder "out"}/lib/udev/rules.d"
|
||||||
|
"-DPython_EXECUTABLE=${python.pythonForBuild.interpreter}"
|
||||||
"-DPYTHON_BINDINGS=on"
|
"-DPYTHON_BINDINGS=on"
|
||||||
# osx framework is disabled,
|
# osx framework is disabled,
|
||||||
# the linux-like directory structure is used for proper output splitting
|
# the linux-like directory structure is used for proper output splitting
|
||||||
|
|
|
@ -1,31 +1,39 @@
|
||||||
{ lib
|
{ lib
|
||||||
, stdenv
|
, stdenv
|
||||||
, fetchFromGitHub
|
|
||||||
, which
|
|
||||||
, autoconf
|
, autoconf
|
||||||
, automake
|
, automake
|
||||||
, libtool
|
, fetchFromGitHub
|
||||||
, libpcap
|
|
||||||
, json_c
|
, json_c
|
||||||
, pkg-config }:
|
, libpcap
|
||||||
|
, libtool
|
||||||
|
, pkg-config
|
||||||
|
, which
|
||||||
|
}:
|
||||||
|
|
||||||
stdenv.mkDerivation rec {
|
stdenv.mkDerivation rec {
|
||||||
pname = "ndpi";
|
pname = "ndpi";
|
||||||
version = "4.2";
|
version = "4.6";
|
||||||
|
|
||||||
src = fetchFromGitHub {
|
src = fetchFromGitHub {
|
||||||
owner = "ntop";
|
owner = "ntop";
|
||||||
repo = "nDPI";
|
repo = "nDPI";
|
||||||
rev = version;
|
rev = "refs/tags/${version}";
|
||||||
sha256 = "sha256-ZWWuyPGl+hbrfXdtPvCBqMReuJ4FiGx+qiI7qCz6wtQ=";
|
hash = "sha256-S0lVh5FZewPbYG/1ikI2RroCSC7OI8Xmfeq73hYCHnY=";
|
||||||
};
|
};
|
||||||
|
|
||||||
configureScript = "./autogen.sh";
|
configureScript = "./autogen.sh";
|
||||||
|
|
||||||
nativeBuildInputs = [ which autoconf automake libtool pkg-config ];
|
nativeBuildInputs = [
|
||||||
|
autoconf
|
||||||
|
automake
|
||||||
|
libtool
|
||||||
|
pkg-config
|
||||||
|
which
|
||||||
|
];
|
||||||
|
|
||||||
buildInputs = [
|
buildInputs = [
|
||||||
libpcap
|
|
||||||
json_c
|
json_c
|
||||||
|
libpcap
|
||||||
];
|
];
|
||||||
|
|
||||||
meta = with lib; {
|
meta = with lib; {
|
||||||
|
@ -34,6 +42,7 @@ stdenv.mkDerivation rec {
|
||||||
nDPI is a library for deep-packet inspection based on OpenDPI.
|
nDPI is a library for deep-packet inspection based on OpenDPI.
|
||||||
'';
|
'';
|
||||||
homepage = "https://www.ntop.org/products/deep-packet-inspection/ndpi/";
|
homepage = "https://www.ntop.org/products/deep-packet-inspection/ndpi/";
|
||||||
|
changelog = "https://github.com/ntop/nDPI/blob/${version}/CHANGELOG.md";
|
||||||
license = with licenses; [ lgpl3Plus bsd3 ];
|
license = with licenses; [ lgpl3Plus bsd3 ];
|
||||||
maintainers = with maintainers; [ takikawa ];
|
maintainers = with maintainers; [ takikawa ];
|
||||||
mainProgram = "ndpiReader";
|
mainProgram = "ndpiReader";
|
||||||
|
|
|
@ -5,14 +5,14 @@
|
||||||
, catch2_3
|
, catch2_3
|
||||||
}:
|
}:
|
||||||
|
|
||||||
stdenv.mkDerivation rec {
|
stdenv.mkDerivation (finalAttrs: {
|
||||||
pname = "rapidfuzz-cpp";
|
pname = "rapidfuzz-cpp";
|
||||||
version = "1.10.4";
|
version = "1.10.4";
|
||||||
|
|
||||||
src = fetchFromGitHub {
|
src = fetchFromGitHub {
|
||||||
owner = "maxbachmann";
|
owner = "maxbachmann";
|
||||||
repo = "rapidfuzz-cpp";
|
repo = "rapidfuzz-cpp";
|
||||||
rev = "v${version}";
|
rev = "v${finalAttrs.version}";
|
||||||
hash = "sha256-I7MdeLs+J5a57ypgUJIW0/pSFPzK4nZA4ZrVRdKX7J4=";
|
hash = "sha256-I7MdeLs+J5a57ypgUJIW0/pSFPzK4nZA4ZrVRdKX7J4=";
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -20,7 +20,7 @@ stdenv.mkDerivation rec {
|
||||||
cmake
|
cmake
|
||||||
];
|
];
|
||||||
|
|
||||||
cmakeFlags = lib.optionals doCheck [
|
cmakeFlags = lib.optionals finalAttrs.finalPackage.doCheck [
|
||||||
"-DRAPIDFUZZ_BUILD_TESTING=ON"
|
"-DRAPIDFUZZ_BUILD_TESTING=ON"
|
||||||
];
|
];
|
||||||
|
|
||||||
|
@ -33,14 +33,12 @@ stdenv.mkDerivation rec {
|
||||||
catch2_3
|
catch2_3
|
||||||
];
|
];
|
||||||
|
|
||||||
doCheck = stdenv.buildPlatform.canExecute stdenv.hostPlatform;
|
|
||||||
|
|
||||||
meta = {
|
meta = {
|
||||||
description = "Rapid fuzzy string matching in C++ using the Levenshtein Distance";
|
description = "Rapid fuzzy string matching in C++ using the Levenshtein Distance";
|
||||||
homepage = "https://github.com/maxbachmann/rapidfuzz-cpp";
|
homepage = "https://github.com/maxbachmann/rapidfuzz-cpp";
|
||||||
changelog = "https://github.com/maxbachmann/rapidfuzz-cpp/blob/${src.rev}/CHANGELOG.md";
|
changelog = "https://github.com/maxbachmann/rapidfuzz-cpp/blob/${finalAttrs.src.rev}/CHANGELOG.md";
|
||||||
license = lib.licenses.mit;
|
license = lib.licenses.mit;
|
||||||
maintainers = with lib.maintainers; [ dotlambda ];
|
maintainers = with lib.maintainers; [ dotlambda ];
|
||||||
platforms = lib.platforms.unix;
|
platforms = lib.platforms.unix;
|
||||||
};
|
};
|
||||||
}
|
})
|
||||||
|
|
|
@ -27,7 +27,9 @@ final: prev: let
|
||||||
defaultBuild = { "tensorrt" = if allBuilds ? ${computeName tensorRTDefaultVersion}
|
defaultBuild = { "tensorrt" = if allBuilds ? ${computeName tensorRTDefaultVersion}
|
||||||
then allBuilds.${computeName tensorRTDefaultVersion}
|
then allBuilds.${computeName tensorRTDefaultVersion}
|
||||||
else throw "tensorrt-${tensorRTDefaultVersion} does not support your cuda version ${cudaVersion}"; };
|
else throw "tensorrt-${tensorRTDefaultVersion} does not support your cuda version ${cudaVersion}"; };
|
||||||
in allBuilds // defaultBuild;
|
in {
|
||||||
|
inherit buildTensorRTPackage;
|
||||||
|
} // allBuilds // defaultBuild;
|
||||||
|
|
||||||
tensorRTVersions = {
|
tensorRTVersions = {
|
||||||
"8.4.0" = [
|
"8.4.0" = [
|
||||||
|
|
|
@ -2,6 +2,7 @@
|
||||||
, stdenv
|
, stdenv
|
||||||
, buildDunePackage
|
, buildDunePackage
|
||||||
, fetchFromGitHub
|
, fetchFromGitHub
|
||||||
|
, fetchpatch
|
||||||
, cmdliner
|
, cmdliner
|
||||||
, ctypes
|
, ctypes
|
||||||
, dune-configurator
|
, dune-configurator
|
||||||
|
@ -24,11 +25,19 @@ buildDunePackage rec {
|
||||||
|
|
||||||
src = fetchFromGitHub {
|
src = fetchFromGitHub {
|
||||||
owner = "LaurentMazare";
|
owner = "LaurentMazare";
|
||||||
repo = "ocaml-${pname}";
|
repo = "ocaml-${pname}";
|
||||||
rev = version;
|
rev = version;
|
||||||
hash = "sha256-z/9NUBjeFWE63Z/e8OyzDiy8hrn6qzjaiBH8G9MPeos=";
|
hash = "sha256-z/9NUBjeFWE63Z/e8OyzDiy8hrn6qzjaiBH8G9MPeos=";
|
||||||
};
|
};
|
||||||
|
|
||||||
|
patches = [
|
||||||
|
# Pytorch 2.0 support. Drop when it reaches a release
|
||||||
|
(fetchpatch {
|
||||||
|
url = "https://github.com/LaurentMazare/ocaml-torch/commit/ef7ef30cafecb09e45ec1ed8ce4bedae5947cfa5.patch";
|
||||||
|
hash = "sha256-smdwKy40iIISp/25L2J4az6KmqFS1soeChBElUyhl5A=";
|
||||||
|
})
|
||||||
|
];
|
||||||
|
|
||||||
buildInputs = [ dune-configurator ];
|
buildInputs = [ dune-configurator ];
|
||||||
|
|
||||||
propagatedBuildInputs = [
|
propagatedBuildInputs = [
|
||||||
|
|
|
@ -27,6 +27,8 @@ buildPythonPackage rec {
|
||||||
"test_delete_cookie"
|
"test_delete_cookie"
|
||||||
"test_error"
|
"test_error"
|
||||||
"test_error_in_generator_callback"
|
"test_error_in_generator_callback"
|
||||||
|
# timing sensitive
|
||||||
|
"test_ims"
|
||||||
];
|
];
|
||||||
|
|
||||||
__darwinAllowLocalNetworking = true;
|
__darwinAllowLocalNetworking = true;
|
||||||
|
|
253
pkgs/development/python-modules/openai-triton/default.nix
Normal file
253
pkgs/development/python-modules/openai-triton/default.nix
Normal file
|
@ -0,0 +1,253 @@
|
||||||
|
{ lib
|
||||||
|
, buildPythonPackage
|
||||||
|
, python
|
||||||
|
, fetchpatch
|
||||||
|
, fetchFromGitHub
|
||||||
|
, addOpenGLRunpath
|
||||||
|
, cmake
|
||||||
|
, cudaPackages
|
||||||
|
, llvmPackages
|
||||||
|
, pybind11
|
||||||
|
, gtest
|
||||||
|
, zlib
|
||||||
|
, ncurses
|
||||||
|
, libxml2
|
||||||
|
, lit
|
||||||
|
, filelock
|
||||||
|
, torchWithRocm
|
||||||
|
, pytest
|
||||||
|
, pytestCheckHook
|
||||||
|
, pythonRelaxDepsHook
|
||||||
|
, pkgsTargetTarget
|
||||||
|
}:
|
||||||
|
|
||||||
|
let
|
||||||
|
pname = "triton";
|
||||||
|
version = "2.0.0";
|
||||||
|
|
||||||
|
inherit (cudaPackages) cuda_cudart backendStdenv;
|
||||||
|
|
||||||
|
# A time may come we'll want to be cross-friendly
|
||||||
|
#
|
||||||
|
# Short explanation: we need pkgsTargetTarget, because we use string
|
||||||
|
# interpolation instead of buildInputs.
|
||||||
|
#
|
||||||
|
# Long explanation: OpenAI/triton downloads and vendors a copy of NVidia's
|
||||||
|
# ptxas compiler. We're not running this ptxas on the build machine, but on
|
||||||
|
# the user's machine, i.e. our Target platform. The second "Target" in
|
||||||
|
# pkgsTargetTarget maybe doesn't matter, because ptxas compiles programs to
|
||||||
|
# be executed on the GPU.
|
||||||
|
# Cf. https://nixos.org/manual/nixpkgs/unstable/#sec-cross-infra
|
||||||
|
ptxas = "${pkgsTargetTarget.cudaPackages.cuda_nvcc}/bin/ptxas";
|
||||||
|
|
||||||
|
llvm = (llvmPackages.llvm.override {
|
||||||
|
llvmTargetsToBuild = [ "NATIVE" "NVPTX" ];
|
||||||
|
# Upstream CI sets these too:
|
||||||
|
# targetProjects = [ "mlir" ];
|
||||||
|
extraCMakeFlags = [
|
||||||
|
"-DLLVM_INSTALL_UTILS=ON"
|
||||||
|
];
|
||||||
|
});
|
||||||
|
in
|
||||||
|
buildPythonPackage {
|
||||||
|
inherit pname version;
|
||||||
|
|
||||||
|
format = "setuptools";
|
||||||
|
|
||||||
|
src = fetchFromGitHub {
|
||||||
|
owner = "openai";
|
||||||
|
repo = pname;
|
||||||
|
rev = "v${version}";
|
||||||
|
hash = "sha256-9GZzugab+Pdt74Dj6zjlEzjj4BcJ69rzMJmqcVMxsKU=";
|
||||||
|
};
|
||||||
|
|
||||||
|
patches = [
|
||||||
|
# Prerequisite for llvm15 patch
|
||||||
|
(fetchpatch {
|
||||||
|
url = "https://github.com/openai/triton/commit/2aba985daaa70234823ea8f1161da938477d3e02.patch";
|
||||||
|
hash = "sha256-LGv0+Ut2WYPC4Ksi4803Hwmhi3FyQOF9zElJc/JCobk=";
|
||||||
|
})
|
||||||
|
(fetchpatch {
|
||||||
|
url = "https://github.com/openai/triton/commit/e3941f9d09cdd31529ba4a41018cfc0096aafea6.patch";
|
||||||
|
hash = "sha256-A+Gor6qzFlGQhVVhiaaYOzqqx8yO2MdssnQS6TIfUWg=";
|
||||||
|
})
|
||||||
|
|
||||||
|
# Source: https://github.com/openai/triton/commit/fc7a8e35819bda632bdcf1cf75fd9abe4d4e077a.patch
|
||||||
|
# The original patch adds ptxas binary, so we include our own clean copy
|
||||||
|
# Drop with the next update
|
||||||
|
./llvm15.patch
|
||||||
|
|
||||||
|
# TODO: there have been commits upstream aimed at removing the "torch"
|
||||||
|
# circular dependency, but the patches fail to apply on the release
|
||||||
|
# revision. Keeping the link for future reference
|
||||||
|
# Also cf. https://github.com/openai/triton/issues/1374
|
||||||
|
|
||||||
|
# (fetchpatch {
|
||||||
|
# url = "https://github.com/openai/triton/commit/fc7c0b0e437a191e421faa61494b2ff4870850f1.patch";
|
||||||
|
# hash = "sha256-f0shIqHJkVvuil2Yku7vuqWFn7VCRKFSFjYRlwx25ig=";
|
||||||
|
# })
|
||||||
|
];
|
||||||
|
|
||||||
|
postPatch = ''
|
||||||
|
substituteInPlace python/setup.py \
|
||||||
|
--replace \
|
||||||
|
'= get_thirdparty_packages(triton_cache_path)' \
|
||||||
|
'= os.environ["cmakeFlags"].split()'
|
||||||
|
''
|
||||||
|
# Wiring triton=2.0.0 with llcmPackages_rocm.llvm=5.4.3
|
||||||
|
# Revisit when updating either triton or llvm
|
||||||
|
+ ''
|
||||||
|
substituteInPlace CMakeLists.txt \
|
||||||
|
--replace "nvptx" "NVPTX" \
|
||||||
|
--replace "LLVM 11" "LLVM"
|
||||||
|
sed -i '/AddMLIR/a set(MLIR_TABLEGEN_EXE "${llvmPackages.mlir}/bin/mlir-tblgen")' CMakeLists.txt
|
||||||
|
sed -i '/AddMLIR/a set(MLIR_INCLUDE_DIR ''${MLIR_INCLUDE_DIRS})' CMakeLists.txt
|
||||||
|
find -iname '*.td' -exec \
|
||||||
|
sed -i \
|
||||||
|
-e '\|include "mlir/IR/OpBase.td"|a include "mlir/IR/AttrTypeBase.td"' \
|
||||||
|
-e 's|include "mlir/Dialect/StandardOps/IR/Ops.td"|include "mlir/Dialect/Func/IR/FuncOps.td"|' \
|
||||||
|
'{}' ';'
|
||||||
|
substituteInPlace unittest/CMakeLists.txt --replace "include(GoogleTest)" "find_package(GTest REQUIRED)"
|
||||||
|
sed -i 's/^include.*$//' unittest/CMakeLists.txt
|
||||||
|
sed -i '/LINK_LIBS/i NVPTXInfo' lib/Target/PTX/CMakeLists.txt
|
||||||
|
sed -i '/LINK_LIBS/i NVPTXCodeGen' lib/Target/PTX/CMakeLists.txt
|
||||||
|
''
|
||||||
|
# TritonMLIRIR already links MLIRIR. Not transitive?
|
||||||
|
# + ''
|
||||||
|
# echo "target_link_libraries(TritonPTX PUBLIC MLIRIR)" >> lib/Target/PTX/CMakeLists.txt
|
||||||
|
# ''
|
||||||
|
# Already defined in llvm, when built with -DLLVM_INSTALL_UTILS
|
||||||
|
+ ''
|
||||||
|
substituteInPlace bin/CMakeLists.txt \
|
||||||
|
--replace "add_subdirectory(FileCheck)" ""
|
||||||
|
|
||||||
|
rm cmake/FindLLVM.cmake
|
||||||
|
''
|
||||||
|
+
|
||||||
|
(
|
||||||
|
let
|
||||||
|
# Bash was getting weird without linting,
|
||||||
|
# but basically upstream contains [cc, ..., "-lcuda", ...]
|
||||||
|
# and we replace it with [..., "-lcuda", "-L/run/opengl-driver/lib", "-L$stubs", ...]
|
||||||
|
old = [ "-lcuda" ];
|
||||||
|
new = [ "-lcuda" "-L${addOpenGLRunpath.driverLink}" "-L${cuda_cudart}/lib/stubs/" ];
|
||||||
|
|
||||||
|
quote = x: ''"${x}"'';
|
||||||
|
oldStr = lib.concatMapStringsSep ", " quote old;
|
||||||
|
newStr = lib.concatMapStringsSep ", " quote new;
|
||||||
|
in
|
||||||
|
''
|
||||||
|
substituteInPlace python/triton/compiler.py \
|
||||||
|
--replace '${oldStr}' '${newStr}'
|
||||||
|
''
|
||||||
|
)
|
||||||
|
# Triton seems to be looking up cuda.h
|
||||||
|
+ ''
|
||||||
|
sed -i 's|cu_include_dir = os.path.join.*$|cu_include_dir = "${cuda_cudart}/include"|' python/triton/compiler.py
|
||||||
|
'';
|
||||||
|
|
||||||
|
nativeBuildInputs = [
|
||||||
|
cmake
|
||||||
|
pythonRelaxDepsHook
|
||||||
|
|
||||||
|
# Requires torch (circular dependency) and probably needs GPUs:
|
||||||
|
# pytestCheckHook
|
||||||
|
|
||||||
|
# Note for future:
|
||||||
|
# These *probably* should go in depsTargetTarget
|
||||||
|
# ...but we cannot test cross right now anyway
|
||||||
|
# because we only support cudaPackages on x86_64-linux atm
|
||||||
|
lit
|
||||||
|
llvm
|
||||||
|
llvmPackages.mlir
|
||||||
|
];
|
||||||
|
|
||||||
|
buildInputs = [
|
||||||
|
gtest
|
||||||
|
libxml2.dev
|
||||||
|
ncurses
|
||||||
|
pybind11
|
||||||
|
zlib
|
||||||
|
];
|
||||||
|
|
||||||
|
propagatedBuildInputs = [
|
||||||
|
filelock
|
||||||
|
];
|
||||||
|
|
||||||
|
# Avoid GLIBCXX mismatch with other cuda-enabled python packages
|
||||||
|
preConfigure = ''
|
||||||
|
export CC="${backendStdenv.cc}/bin/cc";
|
||||||
|
export CXX="${backendStdenv.cc}/bin/c++";
|
||||||
|
|
||||||
|
# Upstream's setup.py tries to write cache somewhere in ~/
|
||||||
|
export HOME=$TMPDIR
|
||||||
|
|
||||||
|
# Upstream's github actions patch setup.cfg to write base-dir. May be redundant
|
||||||
|
echo "
|
||||||
|
[build_ext]
|
||||||
|
base-dir=$PWD" >> python/setup.cfg
|
||||||
|
|
||||||
|
# The rest (including buildPhase) is relative to ./python/
|
||||||
|
cd python/
|
||||||
|
|
||||||
|
# Work around download_and_copy_ptxas()
|
||||||
|
dst_cuda="$PWD/triton/third_party/cuda/bin"
|
||||||
|
mkdir -p "$dst_cuda"
|
||||||
|
ln -s "${ptxas}" "$dst_cuda/"
|
||||||
|
'';
|
||||||
|
|
||||||
|
# CMake is run by setup.py instead
|
||||||
|
dontUseCmakeConfigure = true;
|
||||||
|
cmakeFlags = [
|
||||||
|
"-DMLIR_DIR=${llvmPackages.mlir}/lib/cmake/mlir"
|
||||||
|
];
|
||||||
|
|
||||||
|
postFixup =
|
||||||
|
let
|
||||||
|
ptxasDestination = "$out/${python.sitePackages}/triton/third_party/cuda/bin/ptxas";
|
||||||
|
in
|
||||||
|
# Setuptools (?) strips runpath and +x flags. Let's just restore the symlink
|
||||||
|
''
|
||||||
|
rm -f ${ptxasDestination}
|
||||||
|
ln -s ${ptxas} ${ptxasDestination}
|
||||||
|
'';
|
||||||
|
|
||||||
|
checkInputs = [
|
||||||
|
cmake # ctest
|
||||||
|
];
|
||||||
|
dontUseSetuptoolsCheck = true;
|
||||||
|
preCheck =
|
||||||
|
# build/temp* refers to build_ext.build_temp (looked up in the build logs)
|
||||||
|
''
|
||||||
|
(cd /build/source/python/build/temp* ; ctest)
|
||||||
|
'' # For pytestCheckHook
|
||||||
|
+ ''
|
||||||
|
cd test/unit
|
||||||
|
'';
|
||||||
|
pythonImportsCheck = [
|
||||||
|
# Circular dependency on torch
|
||||||
|
# "triton"
|
||||||
|
# "triton.language"
|
||||||
|
];
|
||||||
|
|
||||||
|
# Ultimately, torch is our test suite:
|
||||||
|
passthru.tests = {
|
||||||
|
inherit torchWithRocm;
|
||||||
|
};
|
||||||
|
|
||||||
|
pythonRemoveDeps = [
|
||||||
|
# Circular dependency, cf. https://github.com/openai/triton/issues/1374
|
||||||
|
"torch"
|
||||||
|
|
||||||
|
# CLI tools without dist-info
|
||||||
|
"cmake"
|
||||||
|
"lit"
|
||||||
|
];
|
||||||
|
meta = with lib; {
|
||||||
|
description = "Development repository for the Triton language and compiler";
|
||||||
|
homepage = "https://github.com/openai/triton/";
|
||||||
|
platforms = lib.platforms.unix;
|
||||||
|
license = licenses.mit;
|
||||||
|
maintainers = with maintainers; [ SomeoneSerge ];
|
||||||
|
};
|
||||||
|
}
|
4617
pkgs/development/python-modules/openai-triton/llvm15.patch
Normal file
4617
pkgs/development/python-modules/openai-triton/llvm15.patch
Normal file
File diff suppressed because it is too large
Load diff
|
@ -6,12 +6,18 @@
|
||||||
|
|
||||||
# Native build inputs
|
# Native build inputs
|
||||||
cmake, util-linux, linkFarm, symlinkJoin, which, pybind11, removeReferencesTo,
|
cmake, util-linux, linkFarm, symlinkJoin, which, pybind11, removeReferencesTo,
|
||||||
|
pythonRelaxDepsHook,
|
||||||
|
|
||||||
# Build inputs
|
# Build inputs
|
||||||
numactl,
|
numactl,
|
||||||
Accelerate, CoreServices, libobjc,
|
Accelerate, CoreServices, libobjc,
|
||||||
|
|
||||||
# Propagated build inputs
|
# Propagated build inputs
|
||||||
|
filelock,
|
||||||
|
jinja2,
|
||||||
|
networkx,
|
||||||
|
openai-triton,
|
||||||
|
sympy,
|
||||||
numpy, pyyaml, cffi, click, typing-extensions,
|
numpy, pyyaml, cffi, click, typing-extensions,
|
||||||
|
|
||||||
# Unit tests
|
# Unit tests
|
||||||
|
@ -49,9 +55,7 @@ let
|
||||||
inherit (cudaPackages) cudatoolkit cudaFlags cudnn nccl;
|
inherit (cudaPackages) cudatoolkit cudaFlags cudnn nccl;
|
||||||
in
|
in
|
||||||
|
|
||||||
# assert that everything needed for cuda is present and that the correct cuda versions are used
|
assert cudaSupport -> (cudaPackages.cudaMajorVersion == "11");
|
||||||
assert !cudaSupport || (let majorIs = lib.versions.major cudatoolkit.version;
|
|
||||||
in majorIs == "9" || majorIs == "10" || majorIs == "11");
|
|
||||||
|
|
||||||
# confirm that cudatoolkits are sync'd across dependencies
|
# confirm that cudatoolkits are sync'd across dependencies
|
||||||
assert !(MPISupport && cudaSupport) || mpi.cudatoolkit == cudatoolkit;
|
assert !(MPISupport && cudaSupport) || mpi.cudatoolkit == cudatoolkit;
|
||||||
|
@ -129,10 +133,10 @@ let
|
||||||
in buildPythonPackage rec {
|
in buildPythonPackage rec {
|
||||||
pname = "torch";
|
pname = "torch";
|
||||||
# Don't forget to update torch-bin to the same version.
|
# Don't forget to update torch-bin to the same version.
|
||||||
version = "1.13.1";
|
version = "2.0.0";
|
||||||
format = "setuptools";
|
format = "setuptools";
|
||||||
|
|
||||||
disabled = pythonOlder "3.7.0";
|
disabled = pythonOlder "3.8.0";
|
||||||
|
|
||||||
outputs = [
|
outputs = [
|
||||||
"out" # output standard python package
|
"out" # output standard python package
|
||||||
|
@ -145,7 +149,7 @@ in buildPythonPackage rec {
|
||||||
repo = "pytorch";
|
repo = "pytorch";
|
||||||
rev = "refs/tags/v${version}";
|
rev = "refs/tags/v${version}";
|
||||||
fetchSubmodules = true;
|
fetchSubmodules = true;
|
||||||
hash = "sha256-yQz+xHPw9ODRBkV9hv1th38ZmUr/fXa+K+d+cvmX3Z8=";
|
hash = "sha256-cSw7+AYBUcZLz3UyK/+JWWjQxKwVBXcFvBq0XAcL3tE=";
|
||||||
};
|
};
|
||||||
|
|
||||||
patches = lib.optionals (stdenv.isDarwin && stdenv.isx86_64) [
|
patches = lib.optionals (stdenv.isDarwin && stdenv.isx86_64) [
|
||||||
|
@ -155,15 +159,6 @@ in buildPythonPackage rec {
|
||||||
# base is 10.12. Until we upgrade, we can fall back on the older
|
# base is 10.12. Until we upgrade, we can fall back on the older
|
||||||
# pthread support.
|
# pthread support.
|
||||||
./pthreadpool-disable-gcd.diff
|
./pthreadpool-disable-gcd.diff
|
||||||
] ++ [
|
|
||||||
# PyTorch fails to build on gcc 12 due to gloo
|
|
||||||
# https://github.com/pytorch/pytorch/issues/77614
|
|
||||||
(fetchpatch {
|
|
||||||
url = "https://github.com/facebookincubator/gloo/commit/4a5e339b764261d20fc409071dc7a8b8989aa195.patch";
|
|
||||||
stripLen = 1;
|
|
||||||
extraPrefix = "third_party/gloo/";
|
|
||||||
hash = "sha256-UxR1r7F6g76BWj3GBIrSy5t+YZDCWy6mMddwx+hon5w=";
|
|
||||||
})
|
|
||||||
];
|
];
|
||||||
|
|
||||||
postPatch = lib.optionalString rocmSupport ''
|
postPatch = lib.optionalString rocmSupport ''
|
||||||
|
@ -261,7 +256,16 @@ in buildPythonPackage rec {
|
||||||
# Suppress gcc regression: avx512 math function raises uninitialized variable warning
|
# Suppress gcc regression: avx512 math function raises uninitialized variable warning
|
||||||
# https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105593
|
# https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105593
|
||||||
# See also: Fails to compile with GCC 12.1.0 https://github.com/pytorch/pytorch/issues/77939
|
# See also: Fails to compile with GCC 12.1.0 https://github.com/pytorch/pytorch/issues/77939
|
||||||
++ lib.optionals stdenv.cc.isGNU [ "-Wno-error=maybe-uninitialized" "-Wno-error=uninitialized" ]));
|
++ lib.optionals (stdenv.cc.isGNU && lib.versionAtLeast stdenv.cc.version "12.0.0") [
|
||||||
|
"-Wno-error=maybe-uninitialized"
|
||||||
|
"-Wno-error=uninitialized"
|
||||||
|
]
|
||||||
|
# Since pytorch 2.0:
|
||||||
|
# gcc-12.2.0/include/c++/12.2.0/bits/new_allocator.h:158:33: error: ‘void operator delete(void*, std::size_t)’
|
||||||
|
# ... called on pointer ‘<unknown>’ with nonzero offset [1, 9223372036854775800] [-Werror=free-nonheap-object]
|
||||||
|
++ lib.optionals (stdenv.cc.isGNU && lib.versions.major stdenv.cc.version == "12" ) [
|
||||||
|
"-Wno-error=free-nonheap-object"
|
||||||
|
]));
|
||||||
|
|
||||||
nativeBuildInputs = [
|
nativeBuildInputs = [
|
||||||
cmake
|
cmake
|
||||||
|
@ -269,6 +273,7 @@ in buildPythonPackage rec {
|
||||||
which
|
which
|
||||||
ninja
|
ninja
|
||||||
pybind11
|
pybind11
|
||||||
|
pythonRelaxDepsHook
|
||||||
removeReferencesTo
|
removeReferencesTo
|
||||||
] ++ lib.optionals cudaSupport [ cudatoolkit_joined ]
|
] ++ lib.optionals cudaSupport [ cudatoolkit_joined ]
|
||||||
++ lib.optionals rocmSupport [ rocmtoolkit_joined ];
|
++ lib.optionals rocmSupport [ rocmtoolkit_joined ];
|
||||||
|
@ -286,11 +291,27 @@ in buildPythonPackage rec {
|
||||||
click
|
click
|
||||||
numpy
|
numpy
|
||||||
pyyaml
|
pyyaml
|
||||||
|
|
||||||
|
# From install_requires:
|
||||||
|
filelock
|
||||||
typing-extensions
|
typing-extensions
|
||||||
|
sympy
|
||||||
|
networkx
|
||||||
|
jinja2
|
||||||
|
|
||||||
# the following are required for tensorboard support
|
# the following are required for tensorboard support
|
||||||
pillow six future tensorboard protobuf
|
pillow six future tensorboard protobuf
|
||||||
] ++ lib.optionals MPISupport [ mpi ]
|
]
|
||||||
++ lib.optionals rocmSupport [ rocmtoolkit_joined ];
|
++ lib.optionals MPISupport [ mpi ]
|
||||||
|
++ lib.optionals rocmSupport [ rocmtoolkit_joined ]
|
||||||
|
# rocm build requires openai-triton;
|
||||||
|
# openai-triton currently requires cuda_nvcc,
|
||||||
|
# so not including it in the cpu-only build;
|
||||||
|
# torch.compile relies on openai-triton,
|
||||||
|
# so we include it for the cuda build as well
|
||||||
|
++ lib.optionals (rocmSupport || cudaSupport) [
|
||||||
|
openai-triton
|
||||||
|
];
|
||||||
|
|
||||||
# Tests take a long time and may be flaky, so just sanity-check imports
|
# Tests take a long time and may be flaky, so just sanity-check imports
|
||||||
doCheck = false;
|
doCheck = false;
|
||||||
|
@ -318,6 +339,11 @@ in buildPythonPackage rec {
|
||||||
"runHook postCheck"
|
"runHook postCheck"
|
||||||
];
|
];
|
||||||
|
|
||||||
|
pythonRemoveDeps = [
|
||||||
|
# In our dist-info the name is just "triton"
|
||||||
|
"pytorch-triton-rocm"
|
||||||
|
];
|
||||||
|
|
||||||
postInstall = ''
|
postInstall = ''
|
||||||
find "$out/${python.sitePackages}/torch/include" "$out/${python.sitePackages}/torch/lib" -type f -exec remove-references-to -t ${stdenv.cc} '{}' +
|
find "$out/${python.sitePackages}/torch/include" "$out/${python.sitePackages}/torch/lib" -type f -exec remove-references-to -t ${stdenv.cc} '{}' +
|
||||||
|
|
||||||
|
|
|
@ -9,7 +9,7 @@
|
||||||
|
|
||||||
buildPythonPackage rec {
|
buildPythonPackage rec {
|
||||||
pname = "torchinfo";
|
pname = "torchinfo";
|
||||||
version = "1.64";
|
version = "1.7.2";
|
||||||
format = "setuptools";
|
format = "setuptools";
|
||||||
|
|
||||||
disabled = pythonOlder "3.7";
|
disabled = pythonOlder "3.7";
|
||||||
|
@ -18,7 +18,7 @@ buildPythonPackage rec {
|
||||||
owner = "TylerYep";
|
owner = "TylerYep";
|
||||||
repo = pname;
|
repo = pname;
|
||||||
rev = "refs/tags/v${version}";
|
rev = "refs/tags/v${version}";
|
||||||
hash = "sha256-gcl8RxCD017FP4LtB60WVtOh7jg2Otv/vNd9hKneEAU=";
|
hash = "sha256-O+I7BNQ5moV/ZcbbuP/IFoi0LO0WsGHBbSfgPmFu1Ec=";
|
||||||
};
|
};
|
||||||
|
|
||||||
propagatedBuildInputs = [
|
propagatedBuildInputs = [
|
||||||
|
@ -37,8 +37,13 @@ buildPythonPackage rec {
|
||||||
"test_google"
|
"test_google"
|
||||||
];
|
];
|
||||||
|
|
||||||
|
disabledTestPaths = [
|
||||||
|
# Wants "compressai", which we don't package (2023-03-23)
|
||||||
|
"tests/torchinfo_xl_test.py"
|
||||||
|
];
|
||||||
|
|
||||||
pythonImportsCheck = [
|
pythonImportsCheck = [
|
||||||
"torchvision"
|
"torchinfo"
|
||||||
];
|
];
|
||||||
|
|
||||||
meta = with lib; {
|
meta = with lib; {
|
||||||
|
|
|
@ -188,6 +188,8 @@ python.pkgs.buildPythonApplication rec {
|
||||||
"tests/vocoder_tests/test_multiband_melgan_train.py"
|
"tests/vocoder_tests/test_multiband_melgan_train.py"
|
||||||
"tests/vocoder_tests/test_melgan_train.py"
|
"tests/vocoder_tests/test_melgan_train.py"
|
||||||
"tests/vocoder_tests/test_wavernn_train.py"
|
"tests/vocoder_tests/test_wavernn_train.py"
|
||||||
|
# only a feed forward test, but still takes too long
|
||||||
|
"tests/tts_tests/test_overflow.py"
|
||||||
];
|
];
|
||||||
|
|
||||||
passthru = {
|
passthru = {
|
||||||
|
|
|
@ -62,6 +62,13 @@ in mkDerivation rec {
|
||||||
|
|
||||||
meta = with lib; {
|
meta = with lib; {
|
||||||
description = "KDE Partition Manager";
|
description = "KDE Partition Manager";
|
||||||
|
longDescription = ''
|
||||||
|
KDE Partition Manager is a utility to help you manage the disks, partitions, and file systems on your computer.
|
||||||
|
It allows you to easily create, copy, move, delete, back up, restore, and resize them without losing data.
|
||||||
|
It supports a large number of file systems, including ext2/3/4, btrfs, reiserfs, NTFS, FAT16/32, JFS, XFS and more.
|
||||||
|
|
||||||
|
To install on NixOS, use the option `programs.partition-manager.enable = true`.
|
||||||
|
'';
|
||||||
license = with licenses; [ cc-by-40 cc0 gpl3Plus lgpl3Plus mit ];
|
license = with licenses; [ cc-by-40 cc0 gpl3Plus lgpl3Plus mit ];
|
||||||
homepage = "https://www.kde.org/applications/system/kdepartitionmanager/";
|
homepage = "https://www.kde.org/applications/system/kdepartitionmanager/";
|
||||||
maintainers = with maintainers; [ peterhoeg oxalica ];
|
maintainers = with maintainers; [ peterhoeg oxalica ];
|
||||||
|
|
|
@ -1,38 +1,77 @@
|
||||||
{ lib, stdenv, fetchFromGitHub, fetchpatch, pkg-config, autoreconfHook
|
{ lib
|
||||||
, zeromq, ndpi, json_c, openssl, libpcap, libcap, curl, libmaxminddb
|
, stdenv
|
||||||
, rrdtool, sqlite, libmysqlclient, expat, net-snmp
|
, autoreconfHook
|
||||||
|
, curl
|
||||||
|
, expat
|
||||||
|
, fetchFromGitHub
|
||||||
|
, git
|
||||||
|
, json_c
|
||||||
|
, libcap
|
||||||
|
, libmaxminddb
|
||||||
|
, libmysqlclient
|
||||||
|
, libpcap
|
||||||
|
, libsodium
|
||||||
|
, ndpi
|
||||||
|
, net-snmp
|
||||||
|
, openssl
|
||||||
|
, pkg-config
|
||||||
|
, rdkafka
|
||||||
|
, gtest
|
||||||
|
, rrdtool
|
||||||
|
, hiredis
|
||||||
|
, sqlite
|
||||||
|
, which
|
||||||
|
, zeromq
|
||||||
}:
|
}:
|
||||||
|
|
||||||
stdenv.mkDerivation rec {
|
stdenv.mkDerivation rec {
|
||||||
pname = "ntopng";
|
pname = "ntopng";
|
||||||
version = "5.2.1";
|
version = "5.6";
|
||||||
|
|
||||||
src = fetchFromGitHub {
|
src = fetchFromGitHub {
|
||||||
owner = "ntop";
|
owner = "ntop";
|
||||||
repo = "ntopng";
|
repo = "ntopng";
|
||||||
rev = version;
|
rev = "refs/tags/${version}";
|
||||||
sha256 = "sha256-FeRERSq8F3HEelUCkA6pgNNcP94xrWy6EbJgk+cEdqc=";
|
hash = "sha256-iGqrS0AneKYwGMEpbKy9if8bnaEu6aEV+QaH+JrF9xs=";
|
||||||
};
|
};
|
||||||
|
|
||||||
patches = [
|
preConfigure = ''
|
||||||
(fetchpatch {
|
substituteInPlace Makefile.in \
|
||||||
url = "https://github.com/ntop/ntopng/commit/0aa580e1a45f248fffe6d11729ce40571f08e187.patch";
|
--replace "/bin/rm" "rm"
|
||||||
sha256 = "sha256-xqEVwfGgkNS+akbJnLZsVvEQdp9GxxUen8VkFomtcPI=";
|
'';
|
||||||
})
|
|
||||||
|
nativeBuildInputs = [
|
||||||
|
autoreconfHook
|
||||||
|
git
|
||||||
|
pkg-config
|
||||||
|
which
|
||||||
];
|
];
|
||||||
|
|
||||||
nativeBuildInputs = [ autoreconfHook pkg-config ];
|
|
||||||
|
|
||||||
buildInputs = [
|
buildInputs = [
|
||||||
zeromq ndpi json_c openssl libpcap curl libmaxminddb rrdtool sqlite
|
curl
|
||||||
libmysqlclient expat net-snmp libcap
|
expat
|
||||||
|
json_c
|
||||||
|
libcap
|
||||||
|
libmaxminddb
|
||||||
|
libmysqlclient
|
||||||
|
libpcap
|
||||||
|
gtest
|
||||||
|
hiredis
|
||||||
|
libsodium
|
||||||
|
net-snmp
|
||||||
|
openssl
|
||||||
|
rdkafka
|
||||||
|
rrdtool
|
||||||
|
sqlite
|
||||||
|
zeromq
|
||||||
];
|
];
|
||||||
|
|
||||||
autoreconfPhase = "bash autogen.sh";
|
autoreconfPhase = "bash autogen.sh";
|
||||||
|
|
||||||
preConfigure = ''
|
configureFlags = [
|
||||||
substituteInPlace Makefile.in --replace "/bin/rm" "rm"
|
"--with-ndpi-includes=${ndpi}/include/ndpi"
|
||||||
'';
|
"--with-ndpi-static-lib=${ndpi}/lib/"
|
||||||
|
];
|
||||||
|
|
||||||
preBuild = ''
|
preBuild = ''
|
||||||
sed -e "s|\(#define CONST_BIN_DIR \).*|\1\"$out/bin\"|g" \
|
sed -e "s|\(#define CONST_BIN_DIR \).*|\1\"$out/bin\"|g" \
|
||||||
|
@ -44,9 +83,10 @@ stdenv.mkDerivation rec {
|
||||||
|
|
||||||
meta = with lib; {
|
meta = with lib; {
|
||||||
description = "High-speed web-based traffic analysis and flow collection tool";
|
description = "High-speed web-based traffic analysis and flow collection tool";
|
||||||
homepage = "http://www.ntop.org/products/ntop/";
|
homepage = "https://www.ntop.org/products/traffic-analysis/ntop/";
|
||||||
|
changelog = "https://github.com/ntop/ntopng/blob/${version}/CHANGELOG.md";
|
||||||
license = licenses.gpl3Plus;
|
license = licenses.gpl3Plus;
|
||||||
platforms = platforms.linux ++ platforms.darwin;
|
platforms = platforms.linux ++ platforms.darwin;
|
||||||
maintainers = [ maintainers.bjornfor ];
|
maintainers = with maintainers; [ bjornfor ];
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
@ -2,13 +2,13 @@
|
||||||
|
|
||||||
buildGoModule rec {
|
buildGoModule rec {
|
||||||
pname = "goawk";
|
pname = "goawk";
|
||||||
version = "1.21.0";
|
version = "1.22.0";
|
||||||
|
|
||||||
src = fetchFromGitHub {
|
src = fetchFromGitHub {
|
||||||
owner = "benhoyt";
|
owner = "benhoyt";
|
||||||
repo = "goawk";
|
repo = "goawk";
|
||||||
rev = "v${version}";
|
rev = "v${version}";
|
||||||
sha256 = "sha256-I6KmNPFD8kkYDyek8lR1ZS7biPA/LYGwJqMoA2fG7Wg=";
|
sha256 = "sha256-8UoYGAmYmC0hcxLfkNac3flKyPBT/xsykuy+TvVosBI=";
|
||||||
};
|
};
|
||||||
|
|
||||||
vendorSha256 = null;
|
vendorSha256 = null;
|
||||||
|
|
|
@ -6809,6 +6809,8 @@ self: super: with self; {
|
||||||
|
|
||||||
open-meteo = callPackage ../development/python-modules/open-meteo { };
|
open-meteo = callPackage ../development/python-modules/open-meteo { };
|
||||||
|
|
||||||
|
openai-triton = callPackage ../development/python-modules/openai-triton { llvmPackages = pkgs.llvmPackages_rocm; };
|
||||||
|
|
||||||
openai-whisper = callPackage ../development/python-modules/openai-whisper { };
|
openai-whisper = callPackage ../development/python-modules/openai-whisper { };
|
||||||
|
|
||||||
openant = callPackage ../development/python-modules/openant { };
|
openant = callPackage ../development/python-modules/openant { };
|
||||||
|
@ -11864,6 +11866,7 @@ self: super: with self; {
|
||||||
torchWithCuda = self.torch.override {
|
torchWithCuda = self.torch.override {
|
||||||
magma = pkgs.magma-cuda;
|
magma = pkgs.magma-cuda;
|
||||||
cudaSupport = true;
|
cudaSupport = true;
|
||||||
|
rocmSupport = false;
|
||||||
};
|
};
|
||||||
|
|
||||||
torchWithoutCuda = self.torch.override {
|
torchWithoutCuda = self.torch.override {
|
||||||
|
@ -11873,6 +11876,7 @@ self: super: with self; {
|
||||||
torchWithRocm = self.torch.override {
|
torchWithRocm = self.torch.override {
|
||||||
magma = pkgs.magma-hip;
|
magma = pkgs.magma-hip;
|
||||||
rocmSupport = true;
|
rocmSupport = true;
|
||||||
|
cudaSupport = false;
|
||||||
};
|
};
|
||||||
|
|
||||||
torchWithoutRocm = self.torch.override {
|
torchWithoutRocm = self.torch.override {
|
||||||
|
|
Loading…
Reference in a new issue