commit
6be56bfc2e
@ -0,0 +1,13 @@ |
||||
diff --git a/src/utils/file.cpp b/src/utils/file.cpp
|
||||
index 9511ad61..d3d82b99 100644
|
||||
--- a/src/utils/file.cpp
|
||||
+++ b/src/utils/file.cpp
|
||||
@@ -322,7 +322,7 @@ namespace file_util {
|
||||
possible_paths.push_back(xdg_config_dir + suffix + ".ini");
|
||||
}
|
||||
|
||||
- possible_paths.push_back("/etc" + suffix + ".ini");
|
||||
+ possible_paths.push_back("@out@" + suffix + ".ini");
|
||||
|
||||
for (const string& p : possible_paths) {
|
||||
if (exists(p)) {
|
@ -1,183 +0,0 @@ |
||||
{ lib, stdenv, requireFile, perl, unzip, glibc, zlib, bzip2, gdk-pixbuf, xorg, glib, fontconfig, freetype, cairo, pango, gtk3, gtk2, ffmpeg, libGL, atk, alsa-lib, setJavaClassPath }: |
||||
|
||||
let |
||||
common = javaVersion: |
||||
let |
||||
graalvmXXX-ee = stdenv.mkDerivation rec { |
||||
pname = "graalvm${javaVersion}-ee"; |
||||
version = "20.2.1"; |
||||
srcs = [ |
||||
(requireFile { |
||||
name = "graalvm-ee-java${javaVersion}-linux-amd64-${version}.tar.gz"; |
||||
sha256 = { "8" = "e0bb182146283a43824dd2c2ceeb89b6ff7a93f9a85da889f8663ce1c2bd3002"; |
||||
"11" = "e5d92d361e7859fe5f88c92d7bb466e285e07f1e4e2d9944948f85fa0e3aee2b"; |
||||
}.${javaVersion}; |
||||
url = "https://www.oracle.com/technetwork/graalvm/downloads/index.html"; |
||||
}) |
||||
(requireFile { |
||||
name = "native-image-installable-svm-svmee-java${javaVersion}-linux-amd64-${version}.jar"; |
||||
sha256 = { "8" = "37ac6a62f68adad513057a60513ba75749adf98cc73999b3918afe159900428d"; |
||||
"11" = "f62df715ad529f8b84854644ac99e0a9a349232c7f03985d20a2a8be20edaa44"; |
||||
}.${javaVersion}; |
||||
url = "https://www.oracle.com/technetwork/graalvm/downloads/index.html"; |
||||
}) |
||||
(requireFile { |
||||
name = "llvm-toolchain-installable-java${javaVersion}-linux-amd64-${version}.jar"; |
||||
sha256 = { "8" = "da98a8c17b0c724b41d1596b57e282a1ecfcbf9140404dfb04b0d4d9fb159d8a"; |
||||
"11" = "fc442c396e92f59d034a69175104cb3565c3d128426bd939cc94c6ceccbb720f"; |
||||
}.${javaVersion}; |
||||
url = "https://www.oracle.com/technetwork/graalvm/downloads/index.html"; |
||||
}) |
||||
(requireFile { |
||||
name = "ruby-installable-svm-svmee-java${javaVersion}-linux-amd64-${version}.jar"; |
||||
sha256 = { "8" = "44f6887249f2eb54cba98dd4d9de019da5463d92982e03bf655fffe4bb520daf"; |
||||
"11" = "941f3752ccb097958f49250586f04c305092ded3ea4c1b7d9a0f7632e47fa335"; |
||||
}.${javaVersion}; |
||||
url = "https://www.oracle.com/technetwork/graalvm/downloads/index.html"; |
||||
}) |
||||
(requireFile { |
||||
name = "python-installable-svm-svmee-java${javaVersion}-linux-amd64-${version}.jar"; |
||||
sha256 = { "8" = "5c3993c701bd09c6064dcf4a6d9c7489620d0654b03c74682398c788c0211c09"; |
||||
"11" = "de3ebf35ce47dc399d7976cbd09fde0e85f2c10f85bc3fe8f32bb9e2b500ab70"; |
||||
}.${javaVersion}; |
||||
url = "https://www.oracle.com/technetwork/graalvm/downloads/index.html"; |
||||
}) |
||||
(requireFile { |
||||
name = "wasm-installable-svm-svmee-java${javaVersion}-linux-amd64-${version}.jar"; |
||||
sha256 = { "8" = "c0a334b271fd32c098bb3c42eada7eafb9f536becaa756097eebe4682915b067"; |
||||
"11" = "9e801071992a0ff976bc40b640a8b9368fd8ea890ba986543658fcbaa3a7fd68"; |
||||
}.${javaVersion}; |
||||
url = "https://www.oracle.com/technetwork/graalvm/downloads/index.html"; |
||||
}) |
||||
]; |
||||
nativeBuildInputs = [ unzip perl ]; |
||||
unpackPhase = '' |
||||
unpack_jar() { |
||||
jar=$1 |
||||
unzip -o $jar -d $out |
||||
perl -ne 'use File::Path qw(make_path); |
||||
use File::Basename qw(dirname); |
||||
if (/^(.+) = (.+)$/) { |
||||
make_path dirname("$ENV{out}/$1"); |
||||
system "ln -s $2 $ENV{out}/$1"; |
||||
}' $out/META-INF/symlinks |
||||
perl -ne 'if (/^(.+) = ([r-])([w-])([x-])([r-])([w-])([x-])([r-])([w-])([x-])$/) { |
||||
my $mode = ($2 eq 'r' ? 0400 : 0) + ($3 eq 'w' ? 0200 : 0) + ($4 eq 'x' ? 0100 : 0) + |
||||
($5 eq 'r' ? 0040 : 0) + ($6 eq 'w' ? 0020 : 0) + ($7 eq 'x' ? 0010 : 0) + |
||||
($8 eq 'r' ? 0004 : 0) + ($9 eq 'w' ? 0002 : 0) + ($10 eq 'x' ? 0001 : 0); |
||||
chmod $mode, "$ENV{out}/$1"; |
||||
}' $out/META-INF/permissions |
||||
rm -rf $out/META-INF |
||||
} |
||||
|
||||
mkdir -p $out |
||||
arr=($srcs) |
||||
tar xf ''${arr[0]} -C $out --strip-components=1 |
||||
unpack_jar ''${arr[1]} |
||||
unpack_jar ''${arr[2]} |
||||
unpack_jar ''${arr[3]} |
||||
unpack_jar ''${arr[4]} |
||||
unpack_jar ''${arr[5]} |
||||
''; |
||||
|
||||
installPhase = { |
||||
"8" = '' |
||||
# BUG workaround http://mail.openjdk.java.net/pipermail/graal-dev/2017-December/005141.html |
||||
substituteInPlace $out/jre/lib/security/java.security \ |
||||
--replace file:/dev/random file:/dev/./urandom \ |
||||
--replace NativePRNGBlocking SHA1PRNG |
||||
|
||||
# provide libraries needed for static compilation |
||||
for f in ${glibc}/lib/* ${glibc.static}/lib/* ${zlib.static}/lib/*; do |
||||
ln -s $f $out/jre/lib/svm/clibraries/linux-amd64/$(basename $f) |
||||
done |
||||
|
||||
# allow using external truffle-api.jar and languages not included in the distrubution |
||||
rm $out/jre/lib/jvmci/parentClassLoader.classpath |
||||
''; |
||||
"11" = '' |
||||
# BUG workaround http://mail.openjdk.java.net/pipermail/graal-dev/2017-December/005141.html |
||||
substituteInPlace $out/conf/security/java.security \ |
||||
--replace file:/dev/random file:/dev/./urandom \ |
||||
--replace NativePRNGBlocking SHA1PRNG |
||||
|
||||
# provide libraries needed for static compilation |
||||
for f in ${glibc}/lib/* ${glibc.static}/lib/* ${zlib.static}/lib/*; do |
||||
ln -s $f $out/lib/svm/clibraries/linux-amd64/$(basename $f) |
||||
done |
||||
''; |
||||
}.${javaVersion}; |
||||
|
||||
dontStrip = true; |
||||
|
||||
# copy-paste openjdk's preFixup |
||||
preFixup = '' |
||||
# Set JAVA_HOME automatically. |
||||
mkdir -p $out/nix-support |
||||
cat <<EOF > $out/nix-support/setup-hook |
||||
if [ -z "\''${JAVA_HOME-}" ]; then export JAVA_HOME=$out; fi |
||||
EOF |
||||
''; |
||||
|
||||
postFixup = '' |
||||
rpath="${ { "8" = "$out/jre/lib/amd64/jli:$out/jre/lib/amd64/server:$out/jre/lib/amd64"; |
||||
"11" = "$out/lib/jli:$out/lib/server:$out/lib"; |
||||
}.${javaVersion} |
||||
}:${ |
||||
lib.strings.makeLibraryPath [ glibc xorg.libXxf86vm xorg.libX11 xorg.libXext xorg.libXtst xorg.libXi xorg.libXrender |
||||
glib zlib bzip2 alsa-lib fontconfig freetype pango gtk3 gtk2 cairo gdk-pixbuf atk ffmpeg libGL ]}" |
||||
|
||||
for f in $(find $out -type f -perm -0100); do |
||||
patchelf --interpreter "$(cat $NIX_CC/nix-support/dynamic-linker)" "$f" || true |
||||
patchelf --set-rpath "$rpath" "$f" || true |
||||
done |
||||
|
||||
for f in $(find $out -type f -perm -0100); do |
||||
if ldd "$f" | fgrep 'not found'; then echo "in file $f"; fi |
||||
done |
||||
''; |
||||
|
||||
propagatedBuildInputs = [ setJavaClassPath zlib ]; # $out/bin/native-image needs zlib to build native executables |
||||
|
||||
doInstallCheck = true; |
||||
installCheckPhase = '' |
||||
echo ${lib.escapeShellArg '' |
||||
public class HelloWorld { |
||||
public static void main(String[] args) { |
||||
System.out.println("Hello World"); |
||||
} |
||||
} |
||||
''} > HelloWorld.java |
||||
$out/bin/javac HelloWorld.java |
||||
|
||||
# run on JVM with Graal Compiler |
||||
$out/bin/java -XX:+UnlockExperimentalVMOptions -XX:+EnableJVMCI -XX:+UseJVMCICompiler HelloWorld |
||||
$out/bin/java -XX:+UnlockExperimentalVMOptions -XX:+EnableJVMCI -XX:+UseJVMCICompiler HelloWorld | fgrep 'Hello World' |
||||
|
||||
# Ahead-Of-Time compilation |
||||
$out/bin/native-image --no-server HelloWorld |
||||
./helloworld |
||||
./helloworld | fgrep 'Hello World' |
||||
|
||||
# Ahead-Of-Time compilation with --static |
||||
$out/bin/native-image --no-server --static HelloWorld |
||||
./helloworld |
||||
./helloworld | fgrep 'Hello World' |
||||
''; |
||||
|
||||
passthru.home = graalvmXXX-ee; |
||||
|
||||
meta = with lib; { |
||||
homepage = "https://www.graalvm.org/"; |
||||
description = "High-Performance Polyglot VM"; |
||||
license = licenses.unfree; |
||||
maintainers = with maintainers; [ volth hlolli ]; |
||||
platforms = [ "x86_64-linux" ]; |
||||
}; |
||||
}; |
||||
in |
||||
graalvmXXX-ee; |
||||
in { |
||||
graalvm8-ee = common "8"; |
||||
graalvm11-ee = common "11"; |
||||
} |
@ -0,0 +1,39 @@ |
||||
{ lib |
||||
, buildPythonPackage |
||||
, fetchFromGitHub |
||||
, rns |
||||
, pythonOlder |
||||
}: |
||||
|
||||
buildPythonPackage rec { |
||||
pname = "lxmf"; |
||||
version = "0.1.4"; |
||||
format = "setuptools"; |
||||
|
||||
disabled = pythonOlder "3.7"; |
||||
|
||||
src = fetchFromGitHub { |
||||
owner = "markqvist"; |
||||
repo = "lxmf"; |
||||
rev = version; |
||||
hash = "sha256-kWawKlEAnn/uNjM2TT2aVW2V4M0+S/1Ysrw/muJhC0s="; |
||||
}; |
||||
|
||||
propagatedBuildInputs = [ |
||||
rns |
||||
]; |
||||
|
||||
# Module has no tests |
||||
doCheck = false; |
||||
|
||||
pythonImportsCheck = [ |
||||
"LXMF" |
||||
]; |
||||
|
||||
meta = with lib; { |
||||
description = "Lightweight Extensible Message Format for Reticulum"; |
||||
homepage = "https://github.com/markqvist/lxmf"; |
||||
license = licenses.mit; |
||||
maintainers = with maintainers; [ fab ]; |
||||
}; |
||||
} |
@ -0,0 +1,43 @@ |
||||
{ lib |
||||
, buildPythonPackage |
||||
, rns |
||||
, fetchFromGitHub |
||||
, lxmf |
||||
, urwid |
||||
, pythonOlder |
||||
}: |
||||
|
||||
buildPythonPackage rec { |
||||
pname = "nomadnet"; |
||||
version = "0.1.7"; |
||||
format = "setuptools"; |
||||
|
||||
disabled = pythonOlder "3.7"; |
||||
|
||||
src = fetchFromGitHub { |
||||
owner = "markqvist"; |
||||
repo = "NomadNet"; |
||||
rev = version; |
||||
hash = "sha256-WJpcV6+cnK1525lbYvkWqrGasioph72nuoNV4oWxVK0="; |
||||
}; |
||||
|
||||
propagatedBuildInputs = [ |
||||
rns |
||||
lxmf |
||||
urwid |
||||
]; |
||||
|
||||
# Module has no tests |
||||
doCheck = false; |
||||
|
||||
pythonImportsCheck = [ |
||||
"nomadnet" |
||||
]; |
||||
|
||||
meta = with lib; { |
||||
description = "Off-grid, resilient mesh communication"; |
||||
homepage = "https://github.com/markqvist/NomadNet"; |
||||
license = licenses.gpl3Only; |
||||
maintainers = with maintainers; [ fab ]; |
||||
}; |
||||
} |
@ -0,0 +1,43 @@ |
||||
{ lib |
||||
, buildPythonPackage |
||||
, cryptography |
||||
, fetchFromGitHub |
||||
, netifaces |
||||
, pyserial |
||||
, pythonOlder |
||||
}: |
||||
|
||||
buildPythonPackage rec { |
||||
pname = "rns"; |
||||
version = "0.3.4"; |
||||
format = "setuptools"; |
||||
|
||||
disabled = pythonOlder "3.7"; |
||||
|
||||
src = fetchFromGitHub { |
||||
owner = "markqvist"; |
||||
repo = "Reticulum"; |
||||
rev = version; |
||||
hash = "sha256-fpXbp0Tj22flco9Rg4JTWZes6oxY7FhvYD76jA3yVuE="; |
||||
}; |
||||
|
||||
propagatedBuildInputs = [ |
||||
cryptography |
||||
netifaces |
||||
pyserial |
||||
]; |
||||
|
||||
# Module has no tests |
||||
doCheck = false; |
||||
|
||||
pythonImportsCheck = [ |
||||
"RNS" |
||||
]; |
||||
|
||||
meta = with lib; { |
||||
description = "Cryptography-based networking stack for wide-area networks"; |
||||
homepage = "https://github.com/markqvist/Reticulum"; |
||||
license = licenses.mit; |
||||
maintainers = with maintainers; [ fab ]; |
||||
}; |
||||
} |
@ -0,0 +1,39 @@ |
||||
diff -u -r a/src/wl/sys/wl_linux.c b/src/wl/sys/wl_linux.c
|
||||
--- a/src/wl/sys/wl_linux.c 2022-03-23 00:35:42.930416350 +0000
|
||||
+++ b/src/wl/sys/wl_linux.c 2022-03-23 00:40:12.903771013 +0000
|
||||
@@ -2980,7 +2980,11 @@
|
||||
else
|
||||
dev->type = ARPHRD_IEEE80211_RADIOTAP;
|
||||
|
||||
+#if LINUX_VERSION_CODE < KERNEL_VERSION(5, 17, 0)
|
||||
bcopy(wl->dev->dev_addr, dev->dev_addr, ETHER_ADDR_LEN);
|
||||
+#else
|
||||
+ eth_hw_addr_set(wl->dev, dev->dev_addr);
|
||||
+#endif
|
||||
|
||||
#if defined(WL_USE_NETDEV_OPS)
|
||||
dev->netdev_ops = &wl_netdev_monitor_ops;
|
||||
@@ -3261,7 +3265,11 @@
|
||||
static ssize_t
|
||||
wl_proc_read(struct file *filp, char __user *buffer, size_t length, loff_t *offp)
|
||||
{
|
||||
+#if LINUX_VERSION_CODE < KERNEL_VERSION(5, 17, 0)
|
||||
wl_info_t * wl = PDE_DATA(file_inode(filp));
|
||||
+#else
|
||||
+ wl_info_t * wl = pde_data(file_inode(filp));
|
||||
+#endif
|
||||
#endif
|
||||
int bcmerror, len;
|
||||
int to_user = 0;
|
||||
@@ -3318,7 +3326,11 @@
|
||||
static ssize_t
|
||||
wl_proc_write(struct file *filp, const char __user *buff, size_t length, loff_t *offp)
|
||||
{
|
||||
+#if LINUX_VERSION_CODE < KERNEL_VERSION(5, 17, 0)
|
||||
wl_info_t * wl = PDE_DATA(file_inode(filp));
|
||||
+#else
|
||||
+ wl_info_t * wl = pde_data(file_inode(filp));
|
||||
+#endif
|
||||
#endif
|
||||
int from_user = 0;
|
||||
int bcmerror;
|
@ -0,0 +1,24 @@ |
||||
{ lib, rustPlatform, fetchFromGitea }: |
||||
|
||||
rustPlatform.buildRustPackage rec { |
||||
pname = "dabet"; |
||||
version = "3.0.0"; |
||||
|
||||
src = fetchFromGitea { |
||||
domain = "codeberg.org"; |
||||
owner = "papojari"; |
||||
repo = pname; |
||||
rev = "v${version}"; |
||||
sha256 = "sha256-B5z2RUkvztnGCKeVsjp/yzrI8m/6mjBB0DS1yhFZhM4="; |
||||
}; |
||||
|
||||
cargoSha256 = "sha256-v1lc2quqxuNUbBQHaTtIDUPPTMyz8nj+TNCdSjrfrOA="; |
||||
|
||||
meta = with lib; { |
||||
description = "Print the duration between two times"; |
||||
homepage = "https://codeberg.org/papojari/dabet"; |
||||
license = licenses.lgpl3Only; |
||||
maintainers = with maintainers; [ papojari ]; |
||||
}; |
||||
} |
||||
|
@ -1,31 +0,0 @@ |
||||
# This file was generated by go2nix, then modified by hand for Darwin support. |
||||
{ lib, buildGoPackage, fetchFromGitHub, darwin }: |
||||
|
||||
buildGoPackage rec { |
||||
pname = "sudolikeaboss-unstable"; |
||||
version = "20161127-${lib.strings.substring 0 7 rev}"; |
||||
rev = "2d9afe19f872c9f433d476e57ee86169781b164c"; |
||||
|
||||
goPackagePath = "github.com/ravenac95/sudolikeaboss"; |
||||
|
||||
src = fetchFromGitHub { |
||||
owner = "ravenac95"; |
||||
repo = "sudolikeaboss"; |
||||
inherit rev; |
||||
sha256 = "0ni3v4kanxfzxzjd48f5dgv62jbfrw7kdmq0snj09hw7ciw55yg6"; |
||||
}; |
||||
|
||||
goDeps = ./deps.nix; |
||||
|
||||
buildInputs = with darwin.apple_sdk.frameworks; [ |
||||
Cocoa |
||||
]; |
||||
|
||||
meta = with lib; { |
||||
inherit (src.meta) homepage; |
||||
description = "Get 1password access from iterm2"; |
||||
license = licenses.mit; |
||||
maintainers = [ maintainers.grahamc ]; |
||||
platforms = platforms.darwin; |
||||
}; |
||||
} |
@ -1,39 +0,0 @@ |
||||
# This file was generated by go2nix. |
||||
[ |
||||
{ |
||||
goPackagePath = "github.com/Sirupsen/logrus"; |
||||
fetch = { |
||||
type = "git"; |
||||
url = "https://github.com/Sirupsen/logrus"; |
||||
rev = "881bee4e20a5d11a6a88a5667c6f292072ac1963"; |
||||
sha256 = "176a09lp20f0qfhwwlh2xg0vk7z1g7gq8k2wr3sg1fd8m86wrzzg"; |
||||
}; |
||||
} |
||||
{ |
||||
goPackagePath = "github.com/satori/go.uuid"; |
||||
fetch = { |
||||
type = "git"; |
||||
url = "https://github.com/satori/go.uuid"; |
||||
rev = "b061729afc07e77a8aa4fad0a2fd840958f1942a"; |
||||
sha256 = "0q87n5an7ha2d8kl6gn9wi41rq0whsxq68w5x3nxz7w9vgkfnq1k"; |
||||
}; |
||||
} |
||||
{ |
||||
goPackagePath = "github.com/urfave/cli"; |
||||
fetch = { |
||||
type = "git"; |
||||
url = "https://github.com/urfave/cli"; |
||||
rev = "0bdeddeeb0f650497d603c4ad7b20cfe685682f6"; |
||||
sha256 = "1ny63c7bfwfrsp7vfkvb4i0xhq4v7yxqnwxa52y4xlfxs4r6v6fg"; |
||||
}; |
||||
} |
||||
{ |
||||
goPackagePath = "golang.org/x/net"; |
||||
fetch = { |
||||
type = "git"; |
||||
url = "https://go.googlesource.com/net"; |
||||
rev = "0c96df335ed3f17f758cba1a2c71b7849dd828e3"; |
||||
sha256 = "02zn1f539y5yc1sx82ym8c3pp3z371d1ldhl20skwjwbdw1ln8hm"; |
||||
}; |
||||
} |
||||
] |
Loading…
Reference in new issue