push sheeet
Some checks failed
Periodic Merges (6h) / master → staging-nixos (push) Failing after 12m50s
Periodic Merges (6h) / master → staging-next (push) Failing after 12m54s
Periodic Merges (24h) / merge-base(master,staging) → haskell-updates (push) Failing after 11m54s
Periodic Merges (6h) / staging-next → staging (push) Failing after 12m13s
Periodic Merges (24h) / staging-next-25.05 → staging-25.05 (push) Failing after 13m24s
Periodic Merges (24h) / release-25.05 → staging-next-25.05 (push) Failing after 14m28s

This commit is contained in:
Dark Steveneq
2025-10-09 14:15:47 +02:00
commit 646b892680
49168 changed files with 5897842 additions and 0 deletions

View File

@@ -0,0 +1,56 @@
{
lib,
stdenv,
fetchFromGitHub,
ncurses,
texinfo,
texliveMedium,
perl,
ghostscript,
}:
stdenv.mkDerivation (finalAttrs: {
pname = "ne";
version = "3.3.4";
src = fetchFromGitHub {
owner = "vigna";
repo = "ne";
tag = finalAttrs.version;
hash = "sha256-n8PERQD9G4jmW4avQjbFofrSapyRoSbQ2k1LzVt0i1o=";
};
postPatch = ''
substituteInPlace makefile --replace-fail "./version.pl" "perl version.pl"
substituteInPlace src/makefile --replace-fail "-lcurses" "-lncurses"
'';
strictDeps = true;
nativeBuildInputs = [
texliveMedium
texinfo
perl
ghostscript
];
buildInputs = [ ncurses ];
makeFlags = [ "PREFIX=${placeholder "out"}" ];
meta = {
description = "Nice editor";
homepage = "https://ne.di.unimi.it/";
changelog = "https://github.com/vigna/ne/releases/tag/${finalAttrs.version}";
downloadPage = "https://github.com/vigna/ne";
longDescription = ''
ne is a free (GPL'd) text editor based on the POSIX standard that runs
(we hope) on almost any UN*X machine. ne is easy to use for the beginner,
but powerful and fully configurable for the wizard, and most sparing in its
resource usage. See the manual for some highlights of ne's features.
'';
license = lib.licenses.gpl3Only;
platforms = lib.platforms.unix;
maintainers = with lib.maintainers; [ geri1701 ];
mainProgram = "ne";
};
})

View File

@@ -0,0 +1,83 @@
{
"name": "near-cli",
"version": "3.4.2",
"description": "General purpose command line tools for interacting with NEAR Protocol",
"engines": {
"node": ">= 12"
},
"main": "index.js",
"scripts": {
"pretest": "rm -rf tmp-project",
"test": "npm run test:unit && npm run test:integration",
"test:unit": "jest",
"test:integration": "bash ./test/index.sh",
"lint": "eslint .",
"fix": "eslint . --fix"
},
"repository": {
"type": "git",
"url": "git+https://github.com/near/near-cli.git"
},
"author": "Jane Degtiareva",
"license": "(MIT AND Apache-2.0)",
"bugs": {
"url": "https://github.com/near/near-cli/issues"
},
"homepage": "https://github.com/near/near-cli#readme",
"bin": {
"near": "bin/near"
},
"devDependencies": {
"danger": "^10.6.6",
"lodash": "^4.17.21",
"eslint": "^7.0.0",
"jest": "^26.1.0",
"strip-ansi": "^7.0.0",
"strip-ansi-cli": "^3.0.0",
"ts-node": "^10.4.0",
"typescript": "^4.5.4"
},
"dependencies": {
"analytics-node": "^6.1.0",
"ascii-table": "0.0.9",
"bn.js": "^5.1.1",
"bs58": "^4.0.1",
"chalk": "^4.0.0",
"flagged-respawn": "^1.0.1",
"is-ci": "^2.0.0",
"jest-environment-node": "^27.0.6",
"ncp": "^2.0.0",
"near-api-js": "^0.44.2",
"near-seed-phrase": "^0.2.0",
"open": "^8.0.7",
"rimraf": "^3.0.0",
"stoppable": "^1.1.0",
"tcp-port-used": "^1.0.1",
"update-notifier": "^5.0.0",
"uuid": "^8.0.0",
"v8flags": "^3.1.3",
"yargs": "^16.0.3"
},
"optionalDependencies": {
"@ledgerhq/hw-transport-node-hid": "^6.1.0",
"near-ledger-js": "^0.2.0"
},
"keywords": [
"blockchain",
"crypto",
"dapps",
"distributed",
"applications",
"distributed applications"
],
"files": [
"bin",
"commands",
"middleware",
"utils",
"config.js",
"get-config.js",
"test_environment.js",
"context"
]
}

View File

@@ -0,0 +1,53 @@
{
lib,
mkYarnPackage,
fetchFromGitHub,
fetchYarnDeps,
}:
mkYarnPackage rec {
pname = "near-cli";
version = "3.4.2";
src = fetchFromGitHub {
owner = "near";
repo = "near-cli";
rev = "v${version}";
hash = "sha256-C+viNYk+6BA11cdi5GqARU3QTTONTR2B2VEZf/SeeSQ=";
};
packageJSON = ./package.json;
offlineCache = fetchYarnDeps {
yarnLock = "${src}/yarn.lock";
hash = "sha256-G/Y8xGGOlXH37Bup7mKhEaNh05GTP5CC9e/Xw4TBNMU=";
};
doDist = false;
installPhase = ''
runHook preInstall
mkdir -p "$out/lib/node_modules"
mv deps/near-cli "$out/lib/node_modules"
rm "$out/lib/node_modules/near-cli/node_modules"
mv node_modules "$out/lib/node_modules/near-cli"
mkdir -p "$out/bin"
ln -s "$out/lib/node_modules/near-cli/bin/near" "$out/bin"
runHook postInstall
'';
meta = {
changelog = "https://github.com/near/near-cli/blob/${src.rev}/CHANGELOG.md";
description = "General purpose command line tools for interacting with NEAR Protocol";
homepage = "https://github.com/near/near-cli";
license = with lib.licenses; [
asl20
mit
];
mainProgram = "near";
maintainers = with lib.maintainers; [ ekleog ];
};
}

View File

@@ -0,0 +1,30 @@
{
lib,
rustPlatform,
fetchFromGitHub,
nix-update-script,
}:
rustPlatform.buildRustPackage (finalAttrs: {
pname = "near-facsimile";
version = "1.0.9";
src = fetchFromGitHub {
owner = "msuchane";
repo = "near-facsimile";
tag = "v${finalAttrs.version}";
hash = "sha256-JJoouEIccTEQtS8FliBEQr4zPcIqSt9PtAxAch5mOG0=";
};
cargoHash = "sha256-w6Diqvti8BJFk1OHIVP1cjez3KYFwShMqv1/f4oUnrI=";
passthru.updateScript = nix-update-script { };
meta = {
description = "Find similar or identical text files in a directory";
homepage = "https://github.com/msuchane/near-facsimile";
license = lib.licenses.asl20;
maintainers = with lib.maintainers; [ iamanaws ];
mainProgram = "near-facsimile";
};
})

View File

@@ -0,0 +1,42 @@
From 14635f8a87423f7682e22c4d4bc34551cfe1d10d Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?J=C3=B6rg=20Thalheim?= <joerg@thalheim.io>
Date: Thu, 30 Jun 2022 07:33:44 +0000
Subject: [PATCH] make near-test-contracts optional
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Signed-off-by: Jörg Thalheim <joerg@thalheim.io>
---
Cargo.lock | 1 -
tools/state-viewer/Cargo.toml | 2 +-
2 files changed, 1 insertion(+), 2 deletions(-)
diff --git a/Cargo.lock b/Cargo.lock
index e1d8b2a83..3317587f5 100644
--- a/Cargo.lock
+++ b/Cargo.lock
@@ -5253,7 +5253,6 @@ dependencies = [
"near-primitives",
"near-primitives-core",
"near-store",
- "near-test-contracts",
"nearcore",
"node-runtime",
"once_cell",
diff --git a/tools/state-viewer/Cargo.toml b/tools/state-viewer/Cargo.toml
index 02346bf71..51cfc4cb5 100644
--- a/tools/state-viewer/Cargo.toml
+++ b/tools/state-viewer/Cargo.toml
@@ -30,7 +30,7 @@ near-network = { path = "../../chain/network" }
near-primitives = { path = "../../core/primitives" }
near-primitives-core = { path = "../../core/primitives-core" }
near-store = { path = "../../core/store" }
-near-test-contracts = { path = "../../runtime/near-test-contracts" }
+#near-test-contracts = { path = "../../runtime/near-test-contracts" }
nearcore = { path = "../../nearcore" }
node-runtime = { path = "../../runtime/runtime" }
--
2.36.1

View File

@@ -0,0 +1,65 @@
{
rustPlatform,
lib,
fetchFromGitHub,
zlib,
openssl,
pkg-config,
protobuf,
}:
rustPlatform.buildRustPackage rec {
pname = "nearcore";
version = "1.30.1";
# https://github.com/near/nearcore/tags
src = fetchFromGitHub {
owner = "near";
repo = "nearcore";
# there is also a branch for this version number, so we need to be explicit
tag = version;
sha256 = "sha256-VjvHCiWjsx5Y7xxqck/O9gSNrL8mxCTosLwLqC85ywY=";
};
cargoHash = "sha256-3MvUn6CJ3skVctTIYhib8G+UVOB/VXokwlTnseGJAGU=";
cargoPatches = [ ./0001-make-near-test-contracts-optional.patch ];
postPatch = ''
substituteInPlace neard/build.rs \
--replace 'get_git_version()?' '"nix:${version}"'
'';
CARGO_PROFILE_RELEASE_CODEGEN_UNITS = "1";
CARGO_PROFILE_RELEASE_LTO = "fat";
NEAR_RELEASE_BUILD = "release";
OPENSSL_NO_VENDOR = 1; # we want to link to OpenSSL provided by Nix
# don't build SDK samples that require wasm-enabled rust
buildAndTestSubdir = "neard";
doCheck = false; # needs network
buildInputs = [
zlib
openssl
];
nativeBuildInputs = [
pkg-config
protobuf
rustPlatform.bindgenHook
];
# fat LTO requires ~3.4GB RAM
requiredSystemFeatures = [ "big-parallel" ];
meta = with lib; {
description = "Reference client for NEAR Protocol";
homepage = "https://github.com/near/nearcore";
license = licenses.gpl3;
maintainers = with maintainers; [ mikroskeem ];
# only x86_64 is supported in nearcore because of sse4+ support, macOS might
# be also possible
platforms = [ "x86_64-linux" ];
};
}

View File

@@ -0,0 +1,85 @@
{
stdenv,
lib,
fetchFromGitHub,
autoreconfHook,
autoconf-archive,
gobject-introspection,
pkg-config,
wrapGAppsHook3,
glib,
dbus,
libnl,
python3Packages,
}:
stdenv.mkDerivation {
pname = "neard";
version = "0.19-unstable-2024-07-02";
outputs = [
"out"
"dev"
];
src = fetchFromGitHub {
owner = "linux-nfc";
repo = "neard";
rev = "a0a7d4d677800a39346f0c89d93d0fe43a95efad";
hash = "sha256-6BgX7cJwxX+1RX3wU+HY/PIBgzomzOKemnl0SDLJNro=";
};
postPatch = ''
patchShebangs test/*
'';
nativeBuildInputs = [
autoreconfHook
autoconf-archive
gobject-introspection
pkg-config
python3Packages.wrapPython
wrapGAppsHook3
];
dontWrapGApps = true;
configureFlags = [
"--enable-pie"
"--enable-test"
"--enable-tools"
"--with-sysconfdir=/etc"
"--with-systemdsystemunitdir=${placeholder "out"}/lib/systemd/system"
"--with-systemduserunitdir=${placeholder "out"}/lib/systemd/user"
];
buildInputs = [
dbus
glib
libnl
];
strictDeps = true;
enableParallelBuilding = true;
pythonPath = with python3Packages; [
pygobject3
dbus-python
];
doCheck = true;
preFixup = ''
makeWrapperArgs+=("''${gappsWrapperArgs[@]}")
wrapPythonProgramsIn "$out/lib/neard" "$pythonPath"
'';
meta = with lib; {
description = "Near Field Communication manager";
homepage = "https://01.org/linux-nfc";
license = licenses.gpl2Only;
maintainers = [ ];
platforms = platforms.unix;
};
}

View File

@@ -0,0 +1,40 @@
{
lib,
stdenv,
fetchFromGitHub,
cmake,
pkg-config,
}:
stdenv.mkDerivation (finalAttrs: {
pname = "neargye-semver";
version = "0.3.1";
src = fetchFromGitHub {
owner = "Neargye";
repo = "semver";
tag = "v${finalAttrs.version}";
sha256 = "sha256-0HOp+xzo8xcCUUgtSh87N9DXP5P0odBaYXhcDzOiiXE=";
};
nativeBuildInputs = [
cmake
pkg-config
];
doCheck = true;
# Install headers
postInstall = ''
mkdir -p $out/include
cp -r $src/include/* $out/include/
'';
meta = {
description = "C++17 header-only dependency-free versioning library complying with Semantic Versioning 2.0.0";
homepage = "https://github.com/Neargye/semver";
license = lib.licenses.mit;
platforms = lib.platforms.all;
maintainers = with lib.maintainers; [ phodina ];
};
})

View File

@@ -0,0 +1,67 @@
{
lib,
stdenv,
fetchFromGitHub,
meson,
ninja,
pkg-config,
aml,
ffmpeg,
gnutls,
libjpeg_turbo,
libgbm,
pixman,
zlib,
}:
stdenv.mkDerivation rec {
pname = "neatvnc";
version = "0.9.5";
src = fetchFromGitHub {
owner = "any1";
repo = "neatvnc";
rev = "v${version}";
hash = "sha256-wAIifLw2rlu44jXMu/k31B7qePdJt6pT6TOhNxcyfLw=";
};
strictDeps = true;
nativeBuildInputs = [
meson
ninja
pkg-config
];
buildInputs = [
aml
ffmpeg
gnutls
libjpeg_turbo
libgbm
pixman
zlib
];
mesonFlags = [
(lib.mesonBool "tests" true)
];
doCheck = true;
meta = {
description = "VNC server library";
longDescription = ''
This is a liberally licensed VNC server library that's intended to be
fast and neat. Goals:
- Speed
- Clean interface
- Interoperability with the Freedesktop.org ecosystem
'';
homepage = "https://github.com/any1/neatvnc";
changelog = "https://github.com/any1/neatvnc/releases/tag/v${version}";
license = lib.licenses.isc;
platforms = lib.platforms.linux;
maintainers = with lib.maintainers; [ nickcao ];
};
}

View File

@@ -0,0 +1,33 @@
{
lib,
stdenvNoCC,
fetchzip,
}:
stdenvNoCC.mkDerivation (finalAttrs: {
pname = "nebula-sans";
version = "1.010";
src = fetchzip {
url = "https://nebulasans.com/download/NebulaSans-${finalAttrs.version}.zip";
stripRoot = false;
hash = "sha256-jFoHgxczU7VdZcVj7HI4OOjK28jcptu8sGOrs3O+0S0=";
};
installPhase = ''
runHook preInstall
mkdir -p $out/share/fonts/truetype
mv TTF/*.ttf $out/share/fonts/truetype
runHook postInstall
'';
meta = {
description = "Versatile, modern, humanist sans-serif with a neutral aesthetic, designed for legibility in both digital and print applications";
maintainers = [ lib.maintainers.colemickens ];
platforms = lib.platforms.all;
homepage = "https://nebulasans.com/";
license = lib.licenses.ofl;
};
})

View File

@@ -0,0 +1,57 @@
{
lib,
buildGoModule,
fetchFromGitHub,
nixosTests,
}:
buildGoModule rec {
pname = "nebula";
version = "1.9.6";
src = fetchFromGitHub {
owner = "slackhq";
repo = "nebula";
tag = "v${version}";
hash = "sha256-klVbLseqIaibcXL83BVjRgY1ziZlxf+w4bRkkPlUnlU=";
};
vendorHash = "sha256-oXhq+s5gDKPVClZpOzYi7BaYwcDqbCLBEO5BNGy9LJA=";
subPackages = [
"cmd/nebula"
"cmd/nebula-cert"
];
ldflags = [ "-X main.Build=${version}" ];
passthru.tests = {
inherit (nixosTests) nebula;
};
meta = {
description = "Overlay networking tool with a focus on performance, simplicity and security";
longDescription = ''
Nebula is a scalable overlay networking tool with a focus on performance,
simplicity and security. It lets you seamlessly connect computers
anywhere in the world. Nebula is portable, and runs on Linux, OSX, and
Windows. (Also: keep this quiet, but we have an early prototype running
on iOS). It can be used to connect a small number of computers, but is
also able to connect tens of thousands of computers.
Nebula incorporates a number of existing concepts like encryption,
security groups, certificates, and tunneling, and each of those
individual pieces existed before Nebula in various forms. What makes
Nebula different to existing offerings is that it brings all of these
ideas together, resulting in a sum that is greater than its individual
parts.
'';
homepage = "https://github.com/slackhq/nebula";
changelog = "https://github.com/slackhq/nebula/blob/v${version}/CHANGELOG.md";
license = lib.licenses.mit;
maintainers = with lib.maintainers; [
Br1ght0ne
numinit
];
};
}

View File

@@ -0,0 +1,53 @@
{
fetchzip,
jre,
lib,
stdenvNoCC,
}:
let
version = "0.33.1-19314669";
urlVersion = lib.replaceStrings [ "." ] [ "-" ] version;
in
stdenvNoCC.mkDerivation {
pname = "necesse-server";
inherit version;
src = fetchzip {
url = "https://necessegame.com/content/server/${urlVersion}/necesse-server-linux64-${urlVersion}.zip";
hash = "sha256-K9FA4I8dooq1dC+Wnn24AACx49Jh/32sPp3f+IefYzM=";
};
# removing packaged jre since we use our own
postUnpack = ''
rm -rf "$sourceRoot/jre"
'';
installPhase = ''
runHook preInstall
mkdir -p $out/bin
cp -r . $out
params='-nogui "$@"'
cat >$out/bin/necesse-server <<EOF
#! $SHELL -e
exec ${lib.getExe jre} -jar $out/Server.jar $params
EOF
chmod +x $out/bin/necesse-server
runHook postInstall
'';
passthru.updateScript = ./update.sh;
meta = {
homepage = "https://necessegame.com/server/";
description = "Dedicated server for Necesse";
sourceProvenance = with lib.sourceTypes; [ binaryBytecode ];
platforms = lib.platforms.linux;
license = lib.licenses.unfreeRedistributable;
mainProgram = "necesse-server";
maintainers = with lib.maintainers; [ cr0n ];
};
}

View File

@@ -0,0 +1,15 @@
#!/usr/bin/env nix-shell
#!nix-shell -i bash -p curl pup common-updater-scripts
set -eu -o pipefail
version=$(
curl -s http://www.necessegame.com/server \
| pup 'a[href*="linux64"] text{}' \
| awk -F'[v ]' '/Linux64/ {print $4"-"$6}' \
| sort -Vu \
| tail -n1
)
[[ $version =~ ^[0-9]+\.[0-9]+\.[0-9]+\-[0-9]+$ ]] \
&& update-source-version necesse-server "$version"

View File

@@ -0,0 +1,43 @@
{
lib,
stdenv,
fetchurl,
motif,
libXpm,
libXt,
}:
stdenv.mkDerivation rec {
pname = "nedit";
version = "5.7";
src = fetchurl {
url = "mirror://sourceforge/nedit/nedit-source/${pname}-${version}-src.tar.gz";
sha256 = "0ym1zhjx9976rf2z5nr7dj4mjkxcicimhs686snjhdcpzxwsrndd";
};
hardeningDisable = [ "format" ];
buildInputs = [
motif
libXpm
libXt
];
# the linux config works fine on darwin too!
buildFlags = lib.optional (stdenv.hostPlatform.isLinux || stdenv.hostPlatform.isDarwin) "linux";
env.NIX_CFLAGS_COMPILE = "-DBUILD_UNTESTED_NEDIT -L${motif}/lib";
installPhase = ''
mkdir -p $out/bin
cp -p source/nedit source/nc $out/bin
'';
meta = with lib; {
homepage = "https://sourceforge.net/projects/nedit";
description = "Fast, compact Motif/X11 plain text editor";
platforms = with platforms; linux ++ darwin;
license = licenses.gpl2;
};
}

View File

@@ -0,0 +1,11 @@
# This file was generated by swiftpm2nix.
{
workspaceStateFile = ./workspace-state.json;
hashes = {
"swift-common" = "1zqdiwz934kpdlig22ikvmklhb720hv3i70wnznhhxfg2v4c115j";
"swift-concurrency" = "06x9fc8gwyvg5ymf889rfqs3jp89l1pbpm3m9553nq75vwcia6d3";
"swift-syntax" = "0sc29acwxv6rl3i8nwfazk0p0cm41figxls8n4aks84vww7m2in1";
"swift-system" = "0402hkx2q2dv27gccnn8ma79ngvwiwzkhcv4zlcdldmy6cgi0px7";
"swift-tools-support-core" = "0lbc3naj9hrbaa7ifxsvcs4mjigmiv61npzsphbpb6axx8s065mn";
};
}

View File

@@ -0,0 +1,93 @@
{
"object": {
"artifacts": [],
"dependencies": [
{
"basedOn": null,
"packageRef": {
"identity": "swift-common",
"kind": "remoteSourceControl",
"location": "https://github.com/uber/swift-common.git",
"name": "Swift-Common"
},
"state": {
"checkoutState": {
"revision": "32c4757e0702686df12c32e06b9bbf815ec4e641",
"version": "0.5.0"
},
"name": "sourceControlCheckout"
},
"subpath": "swift-common"
},
{
"basedOn": null,
"packageRef": {
"identity": "swift-concurrency",
"kind": "remoteSourceControl",
"location": "https://github.com/uber/swift-concurrency.git",
"name": "Concurrency"
},
"state": {
"checkoutState": {
"revision": "e29e42c41c47c82ec32d3a2b2695719c32415ca9",
"version": "0.7.1"
},
"name": "sourceControlCheckout"
},
"subpath": "swift-concurrency"
},
{
"basedOn": null,
"packageRef": {
"identity": "swift-syntax",
"kind": "remoteSourceControl",
"location": "https://github.com/apple/swift-syntax.git",
"name": "SwiftSyntax"
},
"state": {
"checkoutState": {
"branch": "0e85cf7",
"revision": "0e85cf739b10103190a2d7e6de0c0532a0514981"
},
"name": "sourceControlCheckout"
},
"subpath": "swift-syntax"
},
{
"basedOn": null,
"packageRef": {
"identity": "swift-system",
"kind": "remoteSourceControl",
"location": "https://github.com/apple/swift-system.git",
"name": "swift-system"
},
"state": {
"checkoutState": {
"revision": "836bc4557b74fe6d2660218d56e3ce96aff76574",
"version": "1.1.1"
},
"name": "sourceControlCheckout"
},
"subpath": "swift-system"
},
{
"basedOn": null,
"packageRef": {
"identity": "swift-tools-support-core",
"kind": "remoteSourceControl",
"location": "https://github.com/apple/swift-tools-support-core",
"name": "swift-tools-support-core"
},
"state": {
"checkoutState": {
"revision": "4f07be3dc201f6e2ee85b6942d0c220a16926811",
"version": "0.2.7"
},
"name": "sourceControlCheckout"
},
"subpath": "swift-tools-support-core"
}
]
},
"version": 6
}

View File

@@ -0,0 +1,49 @@
{
stdenv,
lib,
fetchFromGitHub,
swift,
swiftpm,
swiftpm2nix,
sqlite,
}:
let
generated = swiftpm2nix.helpers ./nix;
in
stdenv.mkDerivation rec {
pname = "needle";
version = "0.24.0";
src = fetchFromGitHub {
owner = "uber";
repo = "needle";
rev = "v${version}";
hash = "sha256-vQlUcfIj+LHZ3R+XwSr9bBIjcZUWkW2k/wI6HF+sDPo=";
};
sourceRoot = "${src.name}/Generator";
nativeBuildInputs = [
swift
swiftpm
];
propagatedBuildInputs = [ sqlite ];
configurePhase = generated.configure;
installPhase = ''
runHook preInstall
install -Dm755 "$(swiftpmBinPath)"/needle $out/bin/needle
runHook postInstall
'';
meta = with lib; {
description = "Compile-time safe Swift dependency injection framework";
homepage = "https://github.com/uber/needle";
license = licenses.asl20;
mainProgram = "needle";
maintainers = with maintainers; [ matteopacini ];
platforms = platforms.darwin;
};
}

View File

@@ -0,0 +1,38 @@
{
lib,
stdenv,
fetchFromGitHub,
makeWrapper,
babashka,
}:
stdenv.mkDerivation rec {
pname = "neil";
version = "0.3.68";
src = fetchFromGitHub {
owner = "babashka";
repo = "neil";
rev = "v${version}";
sha256 = "sha256-ulqVrFsuYvRKxASHI6AqnHkKKdmDVgtivsRIscivcXw=";
};
nativeBuildInputs = [ makeWrapper ];
dontBuild = true;
installPhase = ''
install -D neil $out/bin/neil
wrapProgram $out/bin/neil \
--prefix PATH : "${lib.makeBinPath [ babashka ]}"
'';
meta = with lib; {
homepage = "https://github.com/babashka/neil";
description = "CLI to add common aliases and features to deps.edn-based projects";
mainProgram = "neil";
license = licenses.mit;
platforms = babashka.meta.platforms;
maintainers = with maintainers; [ jlesquembre ];
};
}

View File

@@ -0,0 +1,91 @@
{
lib,
stdenv,
fetchFromGitHub,
boehmgc,
zlib,
sqlite,
pcre2,
cmake,
pkg-config,
git,
apacheHttpd,
apr,
aprutil,
libmysqlclient,
mbedtls,
openssl,
gtk3,
libpthreadstubs,
nix-update-script,
}:
stdenv.mkDerivation rec {
pname = "neko";
version = "2.4.1";
src = fetchFromGitHub {
owner = "HaxeFoundation";
repo = "neko";
rev = "v${lib.replaceStrings [ "." ] [ "-" ] version}";
hash = "sha256-cTu+AlDnpXAow6jM77Ct9DM8p//z6N1utk7Wsd+0g9U=";
};
nativeBuildInputs = [
cmake
pkg-config
git
];
buildInputs = [
boehmgc
zlib
sqlite
pcre2
apacheHttpd
apr
aprutil
libmysqlclient
mbedtls
openssl
libpthreadstubs
]
++ lib.optional stdenv.hostPlatform.isLinux gtk3;
cmakeFlags = [ "-DRUN_LDCONFIG=OFF" ];
env = lib.optionalAttrs stdenv.cc.isClang {
NIX_CFLAGS_COMPILE = "-Wno-error=implicit-function-declaration";
};
installCheckPhase = ''
bin/neko bin/test.n
'';
# Called from tools/test.neko line 2
# Uncaught exception - Segmentation fault
doInstallCheck = !stdenv.hostPlatform.isDarwin;
dontPatchELF = true;
dontStrip = true;
passthru.updateScript = nix-update-script { };
meta = {
description = "High-level dynamically typed programming language";
homepage = "https://nekovm.org";
license = [
# list based on https://github.com/HaxeFoundation/neko/blob/v2-3-0/LICENSE
lib.licenses.gpl2Plus # nekoc, nekoml
lib.licenses.lgpl21Plus # mysql.ndll
lib.licenses.bsd3 # regexp.ndll
lib.licenses.zlib # zlib.ndll
lib.licenses.asl20 # mod_neko, mod_tora, mbedTLS
lib.licenses.mit # overall, other libs
lib.licenses.boehmGC # boehm gc
];
maintainers = with lib.maintainers; [
marcweber
locallycompact
];
platforms = lib.platforms.linux ++ lib.platforms.darwin;
broken = !stdenv.buildPlatform.canExecute stdenv.hostPlatform;
};
}

View File

@@ -0,0 +1,43 @@
diff --git a/server.go b/server.go
index c2a6be0..8aeca1c 100644
--- a/server.go
+++ b/server.go
@@ -11,6 +11,7 @@ import (
E "github.com/sagernet/sing/common/exceptions"
"github.com/sagernet/sing/common/metadata"
"github.com/sagernet/sing/service"
+ "golang.org/x/sys/unix"
"log"
"nekobox_core/gen"
"nekobox_core/internal/boxbox"
@@ -359,13 +360,25 @@ func (s *server) CompileGeoSiteToSrs(ctx context.Context, in *gen.CompileGeoSite
}
func (s *server) IsPrivileged(ctx context.Context, _ *gen.EmptyReq) (*gen.IsPrivilegedResponse, error) {
- if runtime.GOOS == "windows" {
- return &gen.IsPrivilegedResponse{
- HasPrivilege: false,
- }, nil
+ ret := false
+ if runtime.GOOS == "windows" || os.Geteuid() == 0 {
+ ret = true
+ } else if runtime.GOOS == "linux" {
+ caps := unix.CapUserHeader{
+ Version: unix.LINUX_CAPABILITY_VERSION_3,
+ Pid: 0, // current
+ }
+ var data [2]unix.CapUserData
+ err := unix.Capget(&caps, &data[0])
+ if err != nil {
+ ret = false
+ } else {
+ // CAP_NET_ADMIN = 12
+ ret = (data[0].Effective & (1 << unix.CAP_NET_ADMIN)) != 0
+ }
}
- return &gen.IsPrivilegedResponse{HasPrivilege: os.Geteuid() == 0}, nil
+ return &gen.IsPrivilegedResponse{HasPrivilege: ret}, nil
}
func (s *server) SpeedTest(ctx context.Context, in *gen.SpeedTestRequest) (*gen.SpeedTestResponse, error) {

View File

@@ -0,0 +1,47 @@
diff --git a/src/global/NekoGui.cpp b/src/global/NekoGui.cpp
index 7943d7a..5bb20cc 100644
--- a/src/global/NekoGui.cpp
+++ b/src/global/NekoGui.cpp
@@ -355,6 +355,12 @@ namespace NekoGui {
// System Utils
QString FindNekoBoxCoreRealPath() {
+ // find in PATH first
+ QString path = QStandardPaths::findExecutable("nekobox_core");
+ if (!path.isEmpty()) {
+ return path;
+ }
+
auto fn = QApplication::applicationDirPath() + "/nekobox_core";
auto fi = QFileInfo(fn);
if (fi.isSymLink()) return fi.symLinkTarget();
diff --git a/src/ui/mainwindow.cpp b/src/ui/mainwindow.cpp
index 9aa46b2..ba7137a 100644
--- a/src/ui/mainwindow.cpp
+++ b/src/ui/mainwindow.cpp
@@ -125,8 +125,7 @@ MainWindow::MainWindow(QWidget *parent) : QMainWindow(parent), ui(new Ui::MainWi
NekoGui::dataStore->core_port = MkPort();
if (NekoGui::dataStore->core_port <= 0) NekoGui::dataStore->core_port = 19810;
- auto core_path = QApplication::applicationDirPath() + "/";
- core_path += "nekobox_core";
+ auto core_path = NekoGui::FindNekoBoxCoreRealPath();
QStringList args;
args.push_back("nekobox");
@@ -844,6 +843,15 @@ bool MainWindow::get_elevated_permissions(int reason) {
return true;
}
if (NekoGui::IsAdmin()) return true;
+ QMessageBox::critical(
+ GetMessageBoxParent(),
+ tr("Unable to elevate privileges when installed with Nix"),
+ tr("Due to the read-only property of Nix store, we cannot set suid for nekobox_core. If you are using NixOS, please set `programs.nekoray.tunMode.enable` option to elevate privileges."),
+ QMessageBox::Ok
+ );
+ return false;
+ // The following code isn't effective, preserve to avoid merge conflict
+
#ifdef Q_OS_LINUX
if (!Linux_HavePkexec()) {
MessageBoxWarning(software_name, "Please install \"pkexec\" first.");

View File

@@ -0,0 +1,149 @@
{
lib,
stdenv,
buildGoModule,
fetchFromGitHub,
fetchpatch,
makeDesktopItem,
cmake,
copyDesktopItems,
ninja,
protobuf,
qt6Packages,
sing-geoip,
sing-geosite,
}:
stdenv.mkDerivation (finalAttrs: {
pname = "nekoray";
version = "4.3.7";
src = fetchFromGitHub {
owner = "Mahdi-zarei";
repo = "nekoray";
tag = finalAttrs.version;
hash = "sha256-oRoHu9mt4LiGJFe2OEATbPQ8buYT/6o9395BxYg1qKI=";
};
strictDeps = true;
nativeBuildInputs = [
cmake
copyDesktopItems
ninja
qt6Packages.wrapQtAppsHook
];
buildInputs = [
protobuf
qt6Packages.qtbase
qt6Packages.qttools
];
cmakeFlags = [
# makes sure the app uses the user's config directory to store it's non-static content
# it's essentially the same as always setting the -appdata flag when running the program
(lib.cmakeBool "NKR_PACKAGE" true)
];
patches = [
# if compiled with NKR_PACKAGE, nekoray assumes geoip.db and geosite.db will be found in ~/.config/nekoray
# we already package those two files in nixpkgs
# we can't place file at that location using our builder so we must change the search directory to be relative to the built executable
./search-for-geodata-in-install-location.patch
# disable suid request as it cannot be applied to nekobox_core in nix store
# and prompt users to use NixOS module instead. And use nekobox_core from PATH
# to make use of security wrappers
./nixos-disable-setuid-request.patch
];
installPhase = ''
runHook preInstall
install -Dm755 nekoray "$out/share/nekoray/nekoray"
install -Dm644 "$src/res/public/nekobox.png" "$out/share/icons/hicolor/256x256/apps/nekoray.png"
mkdir -p "$out/bin"
ln -s "$out/share/nekoray/nekoray" "$out/bin"
# nekoray looks for other files and cores in the same directory it's located at
ln -s ${finalAttrs.passthru.nekobox-core}/bin/nekobox_core "$out/share/nekoray/nekobox_core"
# our patch also makes nekoray look for geodata files next to the executable
ln -s ${sing-geoip}/share/sing-box/geoip.db "$out/share/nekoray/geoip.db"
ln -s ${sing-geosite}/share/sing-box/geosite.db "$out/share/nekoray/geosite.db"
runHook postInstall
'';
desktopItems = [
(makeDesktopItem {
name = "nekoray";
desktopName = "Nekoray";
exec = "nekoray";
icon = "nekoray";
comment = finalAttrs.meta.description;
terminal = false;
categories = [ "Network" ];
})
];
passthru.nekobox-core = buildGoModule {
pname = "nekobox-core";
inherit (finalAttrs) version src;
sourceRoot = "${finalAttrs.src.name}/core/server";
patches = [
# also check cap_net_admin so we don't have to set suid
./core-also-check-capabilities.patch
# adds missing entries to the lockfile
# can be removed next update
(fetchpatch {
name = "fix-lockfile.patch";
url = "https://github.com/Mahdi-zarei/nekoray/commit/6f9b2c69e21b0b86242fcc5731f21561373d0963.patch";
stripLen = 2;
hash = "sha256-LDLgCQUXOqaV++6Z4/8r2IaBM+Kz/LckjVsvZn/0lLM=";
})
];
vendorHash = "sha256-6Q6Qi3QQOmuLBaV4t/CEER6s1MUvL7ER6Hfm44sQk4M=";
# ldflags and tags are taken from script/build_go.sh
ldflags = [
"-w"
"-s"
"-X github.com/sagernet/sing-box/constant.Version=${finalAttrs.version}"
];
tags = [
"with_clash_api"
"with_gvisor"
"with_quic"
"with_wireguard"
"with_utls"
"with_ech"
"with_dhcp"
];
};
# this tricks nix-update into also updating the vendorHash of nekobox-core
passthru.goModules = finalAttrs.passthru.nekobox-core.goModules;
meta = {
description = "Qt based cross-platform GUI proxy configuration manager";
homepage = "https://github.com/Mahdi-zarei/nekoray";
license = lib.licenses.gpl3Plus;
mainProgram = "nekoray";
maintainers = with lib.maintainers; [
tomasajt
aleksana
];
platforms = lib.platforms.linux;
};
})

View File

@@ -0,0 +1,13 @@
diff --git a/src/global/NekoGui.cpp b/src/global/NekoGui.cpp
index d9be515..15de64b 100644
--- a/src/global/NekoGui.cpp
+++ b/src/global/NekoGui.cpp
@@ -426,8 +426,6 @@ namespace NekoGui {
};
QString GetBasePath() {
- if (dataStore->flag_use_appdata) return QStandardPaths::writableLocation(
- QStandardPaths::AppConfigLocation);
return qApp->applicationDirPath();
}

View File

@@ -0,0 +1,68 @@
{
buildGoModule,
buildPackages,
fetchFromGitHub,
installShellFiles,
lib,
stdenv,
versionCheckHook,
}:
buildGoModule (finalAttrs: {
pname = "nelm";
version = "1.12.2";
src = fetchFromGitHub {
owner = "werf";
repo = "nelm";
tag = "v${finalAttrs.version}";
hash = "sha256-fhHkWkbMGLr/dlHFtbg/tZA0Yr8dKDKGiN//CNSVAOs=";
};
vendorHash = "sha256-53pIUVbGXU1GGFZtUtjSOufCbvHEPUltZd52eZEGSio=";
subPackages = [ "cmd/nelm" ];
ldflags = [
"-s"
"-w"
"-X github.com/werf/nelm/internal/common.Brand=Nelm"
"-X github.com/werf/nelm/internal/common.Version=${finalAttrs.version}"
];
nativeBuildInputs = [ installShellFiles ];
preCheck = ''
# Test all packages.
unset subPackages
'';
postInstall = lib.optionalString (stdenv.hostPlatform.emulatorAvailable buildPackages) (
let
emulator = stdenv.hostPlatform.emulator buildPackages;
in
''
for shell in bash fish zsh; do
installShellCompletion \
--cmd nelm \
--$shell <(${emulator} $out/bin/nelm completion $shell)
done
''
);
nativeInstallCheckInputs = [ versionCheckHook ];
doInstallCheck = true;
versionCheckProgramArg = "version";
meta = {
description = "Kubernetes deployment tool, alternative to Helm 3";
longDescription = ''
Nelm is a Helm 3 alternative. It is a Kubernetes deployment tool that
manages Helm Charts and deploys them to Kubernetes.
'';
homepage = "https://github.com/werf/nelm";
changelog = "https://github.com/werf/nelm/releases/tag/v${finalAttrs.version}";
license = lib.licenses.asl20;
maintainers = [ lib.maintainers.azahi ];
mainProgram = "nelm";
};
})

View File

@@ -0,0 +1,44 @@
{
lib,
stdenv,
fetchFromGitHub,
luaPackages,
unstableGitUpdater,
}:
stdenv.mkDerivation rec {
pname = "nelua";
version = "0-unstable-2025-06-24";
src = fetchFromGitHub {
owner = "edubart";
repo = "nelua-lang";
rev = "a58450563e2d2ec49bff499865c8b5cfdf6ff81a";
hash = "sha256-JBARpQXqQ7bMt+Za28v3c5fFvUdT4JgMq/C33HTnJCk=";
};
postPatch = ''
substituteInPlace lualib/nelua/version.lua \
--replace "NELUA_GIT_HASH = nil" "NELUA_GIT_HASH = '${src.rev}'" \
--replace "NELUA_GIT_DATE = nil" "NELUA_GIT_DATE = '${lib.removePrefix "0-unstable-" version}'"
'';
makeFlags = [ "PREFIX=$(out)" ];
nativeCheckInputs = [ luaPackages.luacheck ];
doCheck = true;
passthru.updateScript = unstableGitUpdater {
# no releases, only stale "latest" tag
hardcodeZeroVersion = true;
};
meta = with lib; {
description = "Minimal, efficient, statically-typed and meta-programmable systems programming language heavily inspired by Lua, which compiles to C and native code";
homepage = "https://nelua.io/";
license = licenses.mit;
platforms = platforms.all;
maintainers = [ ];
};
}

View File

@@ -0,0 +1,91 @@
{
lib,
stdenv,
fetchurl,
fetchpatch,
pkg-config,
gnome,
gtk3,
libxml2,
intltool,
itstool,
gdb,
boost,
sqlite,
libgtop,
glibmm,
gtkmm3,
vte,
gtksourceview,
gsettings-desktop-schemas,
gtksourceviewmm,
wrapGAppsHook3,
}:
stdenv.mkDerivation rec {
pname = "nemiver";
version = "0.9.6";
src = fetchurl {
url = "mirror://gnome/sources/nemiver/${lib.versions.majorMinor version}/${pname}-${version}.tar.xz";
sha256 = "85ab8cf6c4f83262f441cb0952a6147d075c3c53d0687389a3555e946b694ef2";
};
nativeBuildInputs = [
libxml2
intltool
itstool
pkg-config
wrapGAppsHook3
];
buildInputs = [
gtk3
gdb
boost
sqlite
libgtop
glibmm
gtkmm3
vte
gtksourceview
gtksourceviewmm
gsettings-desktop-schemas
];
patches = [
# build fixes
(fetchpatch {
url = "https://gitlab.gnome.org/Archive/nemiver/-/commit/e0e42221ceb77d88be64fac1c09792dc5c9e2f43.patch";
sha256 = "1g0ixll6yqfj6ysf50p0c7nmh3lgmb6ds15703q7ibnw7dyidvj8";
})
(fetchpatch {
url = "https://gitlab.gnome.org/Archive/nemiver/-/commit/7005393a8c4d914eac9705e7f47818d0f4de3578.patch";
sha256 = "1mxb1sdqdj7dm204gja8cdygx8579bjriqqbb7cna9rj0m9c8pjg";
})
(fetchpatch {
url = "https://gitlab.gnome.org/Archive/nemiver/-/commit/262cf9657f9c2727a816972b348692adcc666008.patch";
sha256 = "03jv6z54b8nzvplplapk4aj206zl1gvnv6iz0mad19g6yvfbw7a7";
})
];
configureFlags = [
"--enable-gsettings"
];
passthru = {
updateScript = gnome.updateScript {
packageName = "nemiver";
versionPolicy = "none";
};
};
meta = with lib; {
homepage = "https://gitlab.gnome.org/Archive/nemiver";
description = "Easy to use standalone C/C++ debugger";
mainProgram = "nemiver";
license = licenses.gpl2;
platforms = platforms.linux;
maintainers = [ maintainers.juliendehos ];
};
}

View File

@@ -0,0 +1,44 @@
{
python3,
lib,
fetchFromGitHub,
cinnamon-translations,
}:
python3.pkgs.buildPythonApplication rec {
pname = "nemo-emblems";
version = "6.4.0";
pyproject = true;
# nixpkgs-update: no auto update
src = fetchFromGitHub {
owner = "linuxmint";
repo = "nemo-extensions";
rev = version;
hash = "sha256-39hWA4SNuEeaPA6D5mWMHjJDs4hYK7/ZdPkTyskvm5Y=";
};
sourceRoot = "${src.name}/nemo-emblems";
postPatch = ''
substituteInPlace setup.py \
--replace-fail "/usr/share" "share"
substituteInPlace nemo-extension/nemo-emblems.py \
--replace-fail "/usr/share/locale" "${cinnamon-translations}/share/locale"
'';
build-system = with python3.pkgs; [ setuptools ];
meta = with lib; {
homepage = "https://github.com/linuxmint/nemo-extensions/tree/master/nemo-emblems";
description = "Change a folder or file emblem in Nemo";
longDescription = ''
Nemo extension that allows you to change folder or file emblems.
When adding this to nemo-with-extensions you also need to add nemo-python.
'';
license = licenses.gpl3Only;
platforms = platforms.linux;
teams = [ teams.cinnamon ];
};
}

View File

@@ -0,0 +1,55 @@
{
stdenv,
lib,
fetchFromGitHub,
meson,
pkg-config,
ninja,
glib,
gtk3,
nemo,
file-roller,
cinnamon-translations,
}:
stdenv.mkDerivation rec {
pname = "nemo-fileroller";
version = "6.4.0";
src = fetchFromGitHub {
owner = "linuxmint";
repo = "nemo-extensions";
rev = version;
hash = "sha256-39hWA4SNuEeaPA6D5mWMHjJDs4hYK7/ZdPkTyskvm5Y=";
};
sourceRoot = "${src.name}/nemo-fileroller";
nativeBuildInputs = [
meson
pkg-config
ninja
];
buildInputs = [
glib
gtk3
nemo
];
postPatch = ''
substituteInPlace src/nemo-fileroller.c \
--replace "file-roller" "${lib.getExe file-roller}" \
--replace "GNOMELOCALEDIR" "${cinnamon-translations}/share/locale"
'';
PKG_CONFIG_LIBNEMO_EXTENSION_EXTENSIONDIR = "${placeholder "out"}/${nemo.extensiondir}";
meta = with lib; {
homepage = "https://github.com/linuxmint/nemo-extensions/tree/master/nemo-fileroller";
description = "Nemo file roller extension";
license = licenses.gpl2Plus;
platforms = platforms.linux;
teams = [ teams.cinnamon ];
};
}

View File

@@ -0,0 +1,63 @@
{
stdenv,
lib,
fetchFromGitHub,
meson,
pkg-config,
ninja,
glib,
gtk3,
cjs,
gtksourceview4,
gobject-introspection,
libmusicbrainz,
webkitgtk_4_1,
clutter-gtk,
clutter-gst,
wrapGAppsHook3,
nemo,
xreader,
}:
stdenv.mkDerivation (finalAttrs: {
pname = "nemo-preview";
version = "6.4.0";
src = fetchFromGitHub {
owner = "linuxmint";
repo = "nemo-extensions";
tag = finalAttrs.version;
hash = "sha256-39hWA4SNuEeaPA6D5mWMHjJDs4hYK7/ZdPkTyskvm5Y=";
};
sourceRoot = "${finalAttrs.src.name}/nemo-preview";
nativeBuildInputs = [
wrapGAppsHook3
gobject-introspection
meson
pkg-config
glib
ninja
];
buildInputs = [
gtk3
cjs
gtksourceview4
libmusicbrainz
webkitgtk_4_1
clutter-gtk
clutter-gst
nemo
xreader
];
meta = {
homepage = "https://github.com/linuxmint/nemo-extensions/tree/master/nemo-preview";
description = "Quick previewer for Nemo, the Cinnamon desktop file manager";
license = lib.licenses.gpl2Plus;
platforms = lib.platforms.linux;
teams = [ lib.teams.cinnamon ];
};
})

View File

@@ -0,0 +1,27 @@
diff --git a/src/nemo-python.c b/src/nemo-python.c
index 8d2acdb..900811b 100644
--- a/src/nemo-python.c
+++ b/src/nemo-python.c
@@ -255,6 +255,7 @@ nemo_module_initialize(GTypeModule *module)
{
gchar *user_extensions_dir;
const gchar *env_string;
+ const gchar *python_extensiondir;
env_string = g_getenv("NEMO_PYTHON_DEBUG");
if (env_string != NULL)
@@ -269,8 +270,12 @@ nemo_module_initialize(GTypeModule *module)
all_types = g_array_new(FALSE, FALSE, sizeof(GType));
- // Look in the new global path, $DATADIR/nemo-python/extensions
- nemo_python_load_dir(module, PYTHON_EXTENSION_DIR);
+ // Look in NEMO_PYTHON_EXTENSION_DIR
+ python_extensiondir = g_getenv("NEMO_PYTHON_EXTENSION_DIR");
+ if (python_extensiondir == NULL) {
+ python_extensiondir = PYTHON_EXTENSION_DIR;
+ }
+ nemo_python_load_dir(module, python_extensiondir);
// Look in XDG_DATA_DIR, ~/.local/share/nemo-python/extensions
user_extensions_dir = g_build_filename(g_get_user_data_dir(),

View File

@@ -0,0 +1,67 @@
{
stdenv,
lib,
fetchFromGitHub,
meson,
pkg-config,
ninja,
glib,
gtk3,
nemo,
python3,
}:
stdenv.mkDerivation rec {
pname = "nemo-python";
version = "6.4.0";
src = fetchFromGitHub {
owner = "linuxmint";
repo = "nemo-extensions";
rev = version;
hash = "sha256-39hWA4SNuEeaPA6D5mWMHjJDs4hYK7/ZdPkTyskvm5Y=";
};
sourceRoot = "${src.name}/nemo-python";
patches = [
# Load extensions from NEMO_PYTHON_EXTENSION_DIR environment variable
# https://github.com/NixOS/nixpkgs/issues/78327
./load-extensions-from-env.patch
# Pick up all passthru.nemoPythonExtensionDeps via nemo-with-extensions wrapper
./python-path.patch
];
nativeBuildInputs = [
meson
pkg-config
ninja
];
buildInputs = [
glib
gtk3
nemo
python3
python3.pkgs.pygobject3
];
postPatch = ''
# Tries to load libpython3.so via g_module_open ().
substituteInPlace meson.build \
--replace "get_option('prefix'), get_option('libdir')" "'${python3}/lib'"
'';
PKG_CONFIG_LIBNEMO_EXTENSION_EXTENSIONDIR = "${placeholder "out"}/${nemo.extensiondir}";
passthru.nemoPythonExtensionDeps = [ python3.pkgs.pygobject3 ];
meta = with lib; {
homepage = "https://github.com/linuxmint/nemo-extensions/tree/master/nemo-python";
description = "Python bindings for the Nemo extension library";
license = licenses.gpl2Plus;
platforms = platforms.linux;
teams = [ teams.cinnamon ];
};
}

View File

@@ -0,0 +1,13 @@
diff --git a/src/nemo-python.c b/src/nemo-python.c
index 8d2acdb..ee24143 100644
--- a/src/nemo-python.c
+++ b/src/nemo-python.c
@@ -197,7 +197,7 @@ nemo_python_init_python (void)
}
debug("Sanitize the python search path");
- PyRun_SimpleString("import sys; sys.path = [path for path in sys.path if path]");
+ PyRun_SimpleString("import sys; import os; sys.path = [path for path in sys.path if path]; sys.path += os.getenv(\"NEMO_PYTHON_SEARCH_PATH\").split(os.pathsep)");
if (PyErr_Occurred())
{
PyErr_Print();

View File

@@ -0,0 +1,88 @@
{
stdenv,
lib,
fetchFromGitHub,
meson,
pkg-config,
ninja,
glib,
gtk3,
nemo,
dbus-glib,
libcryptui,
gcr,
libnotify,
gnupg,
gpgme,
}:
stdenv.mkDerivation rec {
pname = "nemo-seahorse";
version = "6.4.0";
src = fetchFromGitHub {
owner = "linuxmint";
repo = "nemo-extensions";
tag = version;
hash = "sha256-39hWA4SNuEeaPA6D5mWMHjJDs4hYK7/ZdPkTyskvm5Y=";
};
sourceRoot = "${src.name}/nemo-seahorse";
nativeBuildInputs = [
glib
meson
pkg-config
ninja
];
buildInputs = [
glib
gtk3
nemo
gpgme
dbus-glib
libcryptui
gcr
libnotify
gnupg
];
postInstall = ''
glib-compile-schemas $out/share/glib-2.0/schemas
'';
env.PKG_CONFIG_LIBNEMO_EXTENSION_EXTENSIONDIR = "${placeholder "out"}/${nemo.extensiondir}";
meta = {
homepage = "https://github.com/linuxmint/nemo-extensions/tree/master/nemo-seahorse";
changelog = "https://github.com/linuxmint/nemo-extensions/blob/master/nemo-seahorse/ChangeLog";
description = "Nemo seahorse extension";
longDescription = ''
You can add the extension to nemo using the following configuration:
```nix
{
environment.systemPackages = with pkgs; [
(nemo-with-extensions.override {
extensions = [ nemo-seahorse ];
})
];
services.dbus.packages = with pkgs; [
libcryptui
];
services.desktopManager.gnome.extraGSettingsOverridePackages = with pkgs; [
nemo
gcr
libcryptui
nemo-seahorse
];
}
```
'';
license = lib.licenses.gpl2Plus;
platforms = lib.platforms.linux;
teams = [ lib.teams.cinnamon ];
};
}

View File

@@ -0,0 +1,62 @@
{
symlinkJoin,
lib,
makeWrapper,
folder-color-switcher,
nemo,
nemo-emblems,
nemo-fileroller,
nemo-python,
python3,
extensions ? [ ],
useDefaultExtensions ? true,
}:
let
selectedExtensions =
extensions
++ lib.optionals useDefaultExtensions [
# We keep this in sync with a default Mint installation
# Right now (only) nemo-share is missing
folder-color-switcher
nemo-emblems
nemo-fileroller
nemo-python
];
nemoPythonExtensionsDeps = lib.concatMap (x: x.nemoPythonExtensionDeps or [ ]) selectedExtensions;
in
symlinkJoin {
name = "nemo-with-extensions-${nemo.version}";
paths = [ nemo ] ++ selectedExtensions;
nativeBuildInputs = [ makeWrapper ];
postBuild = ''
for f in $(find $out/bin/ $out/libexec/ -type l -not -path "*/.*"); do
wrapProgram "$f" \
--set "NEMO_EXTENSION_DIR" "$out/${nemo.extensiondir}" \
--set "NEMO_PYTHON_EXTENSION_DIR" "$out/share/nemo-python/extensions" \
--set "NEMO_PYTHON_SEARCH_PATH" "${python3.pkgs.makePythonPath nemoPythonExtensionsDeps}"
done
# Don't populate the same nemo actions twice when having this globally installed
# https://github.com/NixOS/nixpkgs/issues/190781#issuecomment-1365601853
rm -r $out/share/nemo/actions
# Point to wrapped binary in all service files
for file in "share/dbus-1/services/nemo.FileManager1.service" \
"share/dbus-1/services/nemo.service"
do
rm "$out/$file"
substitute "${nemo}/$file" "$out/$file" \
--replace "${nemo}" "$out"
done
'';
meta = removeAttrs nemo.meta [
"name"
"outputsToInstall"
"position"
];
}

View File

@@ -0,0 +1,40 @@
diff --git a/libnemo-private/nemo-module.c b/libnemo-private/nemo-module.c
index 92bcff5..ecadcd8 100644
--- a/libnemo-private/nemo-module.c
+++ b/libnemo-private/nemo-module.c
@@ -209,11 +209,16 @@ void
nemo_module_setup (void)
{
static gboolean initialized = FALSE;
+ const gchar *extensiondir = NULL;
if (!initialized) {
initialized = TRUE;
- load_module_dir (NEMO_EXTENSIONDIR);
+ extensiondir = g_getenv ("NEMO_EXTENSION_DIR");
+ if (extensiondir == NULL) {
+ extensiondir = NEMO_EXTENSIONDIR;
+ }
+ load_module_dir (extensiondir);
eel_debug_call_at_shutdown (free_module_objects);
}
diff --git a/src/nemo-extensions-list.c b/src/nemo-extensions-list.c
index 944fc5f..983c396 100644
--- a/src/nemo-extensions-list.c
+++ b/src/nemo-extensions-list.c
@@ -129,7 +129,12 @@ module_get_extensions_for_type (GType type)
int
main (int argc, char *argv[])
{
- populate_from_directory (NEMO_EXTENSIONDIR);
+ const gchar *extensiondir = NULL;
+ extensiondir = g_getenv ("NEMO_EXTENSION_DIR");
+ if (extensiondir == NULL) {
+ extensiondir = NEMO_EXTENSIONDIR;
+ }
+ populate_from_directory (extensiondir);
GList *nd_providers;
GList *l;

View File

@@ -0,0 +1,115 @@
{
fetchFromGitHub,
glib,
gobject-introspection,
meson,
ninja,
pkg-config,
lib,
stdenv,
wrapGAppsHook3,
libxmlb,
gtk3,
gvfs,
cinnamon-desktop,
xapp,
libexif,
json-glib,
exempi,
intltool,
shared-mime-info,
cinnamon-translations,
libgsf,
python3,
}:
let
# For action-layout-editor.
pythonEnv = python3.withPackages (
pp: with pp; [
pycairo
pygobject3
python-xapp
]
);
in
stdenv.mkDerivation rec {
pname = "nemo";
version = "6.4.5";
src = fetchFromGitHub {
owner = "linuxmint";
repo = "nemo";
rev = version;
hash = "sha256-9JfCBC5YjfQadF7KzPgZ1yPkiSjmuEO1tfMU2BmJES8=";
};
patches = [
# Load extensions from NEMO_EXTENSION_DIR environment variable
# https://github.com/NixOS/nixpkgs/issues/78327
./load-extensions-from-env.patch
];
outputs = [
"out"
"dev"
];
buildInputs = [
glib
gtk3
cinnamon-desktop
libxmlb # action-layout-editor
pythonEnv
xapp
libexif
exempi
gvfs
libgsf
json-glib
];
nativeBuildInputs = [
meson
pkg-config
ninja
wrapGAppsHook3
intltool
shared-mime-info
gobject-introspection
];
mesonFlags = [
# use locales from cinnamon-translations
"--localedir=${cinnamon-translations}/share/locale"
];
postInstall = ''
# This fixes open as root and handles nemo-with-extensions well.
# https://github.com/NixOS/nixpkgs/issues/297570
substituteInPlace $out/share/polkit-1/actions/org.nemo.root.policy \
--replace-fail "$out/bin/nemo" "/run/current-system/sw/bin/nemo"
'';
preFixup = ''
# Used for some non-fd.o icons (e.g. xapp-text-case-symbolic)
gappsWrapperArgs+=(
--prefix XDG_DATA_DIRS : "${xapp}/share"
)
'';
# Taken from libnemo-extension.pc.
passthru.extensiondir = "lib/nemo/extensions-3.0";
meta = with lib; {
homepage = "https://github.com/linuxmint/nemo";
description = "File browser for Cinnamon";
license = [
licenses.gpl2
licenses.lgpl2
];
platforms = platforms.linux;
teams = [ teams.cinnamon ];
mainProgram = "nemo";
};
}

View File

@@ -0,0 +1,108 @@
{
busybox,
cmake,
coreutils,
dbus,
fetchFromGitHub,
gettext,
graphviz,
json_c,
lib,
libarchive,
libusb1,
libxml2,
makeWrapper,
ncurses,
ninja,
openssl,
picocom,
pkg-config,
qemu,
socat,
sqlite,
stdenv,
systemd,
tigervnc,
}:
stdenv.mkDerivation (finalAttrs: {
pname = "nemu";
version = "3.3.1";
src = fetchFromGitHub {
owner = "nemuTUI";
repo = "nemu";
rev = "v${finalAttrs.version}";
hash = "sha256-6WzqBkspKKs1e8kg1i71ntZHa78s5pJ1u02mXvzpiEc=";
};
cmakeFlags = [
"-DNM_WITH_DBUS=ON"
"-DNM_WITH_NETWORK_MAP=ON"
"-DNM_WITH_REMOTE=ON"
"-DNM_WITH_USB=ON"
];
nativeBuildInputs = [
cmake
ninja
pkg-config
makeWrapper
];
buildInputs = [
coreutils
dbus
gettext
graphviz
json_c
libarchive
libusb1
libxml2
ncurses
openssl
picocom
qemu
socat
sqlite
systemd # for libudev
tigervnc
];
runtimeDependencies = [
busybox
picocom
qemu
socat
tigervnc
];
postPatch = ''
substituteInPlace nemu.cfg.sample \
--replace-fail /usr/bin/vncviewer ${tigervnc}/bin/vncviewer \
--replace-fail "qemu_bin_path = /usr/bin" "qemu_bin_path = ${qemu}/bin"
substituteInPlace sh/ntty \
--replace-fail /usr/bin/socat ${socat}/bin/socat \
--replace-fail /usr/bin/picocom ${picocom}/bin/picocom \
--replace-fail start-stop-daemon ${busybox}/bin/start-stop-daemon
substituteInPlace sh/setup_nemu_nonroot.sh \
--replace-fail /usr/bin/nemu $out/bin/nemu
'';
postInstall = ''
wrapProgram $out/share/nemu/scripts/upgrade_db.sh \
--prefix PATH : "${sqlite}/bin"
'';
meta = {
changelog = "https://github.com/nemuTUI/nemu/releases/tag/v${finalAttrs.version}";
description = "Ncurses UI for QEMU";
homepage = "https://github.com/nemuTUI/nemu";
license = lib.licenses.bsd2;
mainProgram = "nemu";
maintainers = with lib.maintainers; [ msanft ];
platforms = lib.platforms.unix;
};
})

View File

@@ -0,0 +1,31 @@
{
lib,
fetchFromGitHub,
python3Packages,
}:
python3Packages.buildPythonPackage rec {
pname = "nengo-gui";
version = "0.4.9";
format = "setuptools";
src = fetchFromGitHub {
owner = "nengo";
repo = "nengo-gui";
tag = "v${version}";
sha256 = "sha256-aBi4roe9pqPmpbW5zrbDoIvyH5mTKgIzL2O5j1+VBMY=";
};
propagatedBuildInputs = with python3Packages; [ nengo ];
# checks req missing:
# pyimgur
doCheck = false;
meta = with lib; {
description = "Nengo interactive visualizer";
homepage = "https://nengo.ai/";
license = licenses.unfreeRedistributable;
maintainers = [ ];
};
}

View File

@@ -0,0 +1,39 @@
{
lib,
buildGoModule,
fetchFromGitHub,
}:
buildGoModule rec {
pname = "neo-cowsay";
version = "2.0.4";
src = fetchFromGitHub {
owner = "Code-Hex";
repo = "Neo-cowsay";
rev = "v${version}";
hash = "sha256-DmIjqBTIzwkQ8aJ6xCgIwjDtczlTH5AKbPKFUGx3qQ8=";
};
vendorHash = "sha256-gBURmodXkod4fukw6LWEY+MBxPcf4vn/f6K78UR77n0=";
modRoot = "./cmd";
doCheck = false;
subPackages = [
"cowsay"
"cowthink"
];
meta = with lib; {
description = "Cowsay reborn, written in Go";
homepage = "https://github.com/Code-Hex/Neo-cowsay";
license = with licenses; [
artistic1 # or
gpl3
];
maintainers = with maintainers; [ Br1ght0ne ];
mainProgram = "cowsay";
};
}

View File

@@ -0,0 +1,31 @@
{
lib,
stdenv,
fetchurl,
ncurses,
}:
stdenv.mkDerivation rec {
pname = "neo";
version = "0.6.1";
src = fetchurl {
url = "https://github.com/st3w/neo/releases/download/v${version}/neo-${version}.tar.gz";
sha256 = "sha256-pV5O1e/QpK8kjRYBinqq07YX7x06wF0pKiWKOKr0ank=";
};
buildInputs = [ ncurses ];
meta = with lib; {
description = ''Simulates the digital rain from "The Matrix"'';
license = licenses.gpl3Plus;
longDescription = ''
neo recreates the digital rain effect from "The Matrix". Streams of random
characters will endlessly scroll down your terminal screen.
'';
homepage = "https://github.com/st3w/neo";
platforms = ncurses.meta.platforms;
maintainers = [ maintainers.abbe ];
mainProgram = "neo";
};
}

View File

@@ -0,0 +1,37 @@
{
appimageTools,
lib,
fetchurl,
}:
let
pname = "neo4j-desktop";
version = "1.6.0";
src = fetchurl {
url = "https://s3-eu-west-1.amazonaws.com/dist.neo4j.org/${pname}/linux-offline/${pname}-${version}-x86_64.AppImage";
hash = "sha256-/ptMEU4BM5mPK4KWWRdor6N8gw3oaNgyzD0c4jI+3fI=";
};
appimageContents = appimageTools.extract { inherit pname version src; };
in
appimageTools.wrapType2 {
inherit pname version src;
extraPkgs = pkgs: [ pkgs.libsecret ];
extraInstallCommands = ''
install -m 444 -D ${appimageContents}/${pname}.desktop -t $out/share/applications
substituteInPlace $out/share/applications/${pname}.desktop \
--replace 'Exec=AppRun' 'Exec=${pname}'
cp -r ${appimageContents}/usr/share/icons $out/share
'';
meta = with lib; {
description = "GUI front-end for Neo4j";
homepage = "https://neo4j.com/";
license = licenses.unfree;
maintainers = [ maintainers.bobvanderlinden ];
platforms = [ "x86_64-linux" ];
mainProgram = "neo4j-desktop";
};
}

View File

@@ -0,0 +1,62 @@
{
stdenv,
lib,
fetchurl,
nixosTests,
makeWrapper,
openjdk17,
which,
gawk,
bashNonInteractive,
}:
stdenv.mkDerivation rec {
pname = "neo4j";
version = "5.26.1";
src = fetchurl {
url = "https://neo4j.com/artifact.php?name=neo4j-community-${version}-unix.tar.gz";
hash = "sha256-RiCUpsUxUaMSz1a4ptNQ8rp99ffj0r4DPggt8RgSj7U=";
};
nativeBuildInputs = [ makeWrapper ];
buildInputs = [ bashNonInteractive ];
strictDeps = true;
installPhase = ''
mkdir -p "$out/share/neo4j"
cp -R * "$out/share/neo4j"
mkdir -p "$out/bin"
for NEO4J_SCRIPT in neo4j neo4j-admin cypher-shell
do
chmod +x "$out/share/neo4j/bin/$NEO4J_SCRIPT"
makeWrapper "$out/share/neo4j/bin/$NEO4J_SCRIPT" \
"$out/bin/$NEO4J_SCRIPT" \
--prefix PATH : "${
lib.makeBinPath [
openjdk17
which
gawk
]
}" \
--set JAVA_HOME "${openjdk17}"
done
patchShebangs $out/share/neo4j/bin/neo4j-admin
# user will be asked to change password on first login
# password must be at least 8 characters long
$out/bin/neo4j-admin dbms set-initial-password neo4jadmin
'';
passthru.tests.nixos = nixosTests.neo4j;
meta = with lib; {
description = "Highly scalable, robust (fully ACID) native graph database";
homepage = "https://neo4j.com/";
license = licenses.gpl3;
maintainers = with maintainers; [ offline ];
platforms = platforms.unix;
};
}

View File

@@ -0,0 +1,2 @@
source 'https://rubygems.org'
gem 'neocities'

View File

@@ -0,0 +1,48 @@
GEM
remote: https://rubygems.org/
specs:
equatable (0.5.0)
httpclient-fixcerts (2.8.5)
necromancer (0.4.0)
neocities (0.0.18)
httpclient-fixcerts (~> 2.8, >= 2.8.5)
pastel (~> 0.7, = 0.7.2)
rake (~> 12.3, >= 12.3.1)
tty-prompt (~> 0.12, = 0.12.0)
tty-table (~> 0.10, = 0.10.0)
pastel (0.7.2)
equatable (~> 0.5.0)
tty-color (~> 0.4.0)
rake (12.3.3)
strings (0.1.8)
strings-ansi (~> 0.1)
unicode-display_width (~> 1.5)
unicode_utils (~> 1.4)
strings-ansi (0.2.0)
tty-color (0.4.3)
tty-cursor (0.4.0)
tty-prompt (0.12.0)
necromancer (~> 0.4.0)
pastel (~> 0.7.0)
tty-cursor (~> 0.4.0)
wisper (~> 1.6.1)
tty-screen (0.6.5)
tty-table (0.10.0)
equatable (~> 0.5.0)
necromancer (~> 0.4.0)
pastel (~> 0.7.2)
strings (~> 0.1.0)
tty-screen (~> 0.6.4)
unicode-display_width (1.8.0)
unicode_utils (1.4.0)
wisper (1.6.1)
PLATFORMS
ruby
x86_64-linux
DEPENDENCIES
neocities
BUNDLED WITH
2.5.5

View File

@@ -0,0 +1,191 @@
{
equatable = {
groups = [ "default" ];
platforms = [ ];
source = {
remotes = [ "https://rubygems.org" ];
sha256 = "1sjm9zjakyixyvsqziikdrsqfzis6j3fq23crgjkp6fwkfgndj7x";
type = "gem";
};
version = "0.5.0";
};
httpclient-fixcerts = {
groups = [ "default" ];
platforms = [ ];
source = {
remotes = [ "https://rubygems.org" ];
sha256 = "1zfszylh51y8ic8sbff3mwf30jb0gj270r5nxkcm1ydxad19w6sl";
type = "gem";
};
version = "2.8.5";
};
necromancer = {
groups = [ "default" ];
platforms = [ ];
source = {
remotes = [ "https://rubygems.org" ];
sha256 = "0v9nhdkv6zrp7cn48xv7n2vjhsbslpvs0ha36mfkcd56cp27pavz";
type = "gem";
};
version = "0.4.0";
};
neocities = {
dependencies = [
"httpclient-fixcerts"
"pastel"
"rake"
"tty-prompt"
"tty-table"
];
groups = [ "default" ];
platforms = [ ];
source = {
remotes = [ "https://rubygems.org" ];
sha256 = "1hfvy4gc7rzxkgl2dbrjs2fqzi5mphmr22rjfhk6n0i3bd0wazbw";
type = "gem";
};
version = "0.0.18";
};
pastel = {
dependencies = [
"equatable"
"tty-color"
];
groups = [ "default" ];
platforms = [ ];
source = {
remotes = [ "https://rubygems.org" ];
sha256 = "1yf30d9kzpm96gw9kwbv31p0qigwfykn8qdis5950plnzgc1vlp1";
type = "gem";
};
version = "0.7.2";
};
rake = {
groups = [ "default" ];
platforms = [ ];
source = {
remotes = [ "https://rubygems.org" ];
sha256 = "1cvaqarr1m84mhc006g3l1vw7sa5qpkcw0138lsxlf769zdllsgp";
type = "gem";
};
version = "12.3.3";
};
strings = {
dependencies = [
"strings-ansi"
"unicode-display_width"
"unicode_utils"
];
groups = [ "default" ];
platforms = [ ];
source = {
remotes = [ "https://rubygems.org" ];
sha256 = "111876lcqrykh30w7zzkrl06d6rj9lq24y625m28674vgfxkkcz0";
type = "gem";
};
version = "0.1.8";
};
strings-ansi = {
groups = [ "default" ];
platforms = [ ];
source = {
remotes = [ "https://rubygems.org" ];
sha256 = "120wa6yjc63b84lprglc52f40hx3fx920n4dmv14rad41rv2s9lh";
type = "gem";
};
version = "0.2.0";
};
tty-color = {
groups = [ "default" ];
platforms = [ ];
source = {
remotes = [ "https://rubygems.org" ];
sha256 = "0zz5xa6xbrj69h334d8nx7z732fz80s1a0b02b53mim95p80s7bk";
type = "gem";
};
version = "0.4.3";
};
tty-cursor = {
groups = [ "default" ];
platforms = [ ];
source = {
remotes = [ "https://rubygems.org" ];
sha256 = "07whfm8mnp7l49s2cm2qy1snhsqq3a90sqwb71gvym4hm2kx822a";
type = "gem";
};
version = "0.4.0";
};
tty-prompt = {
dependencies = [
"necromancer"
"pastel"
"tty-cursor"
"wisper"
];
groups = [ "default" ];
platforms = [ ];
source = {
remotes = [ "https://rubygems.org" ];
sha256 = "1026nyqhgmgxi2nmk8xk3hca07gy5rpisjs8y6w00wnw4f01kpv0";
type = "gem";
};
version = "0.12.0";
};
tty-screen = {
groups = [ "default" ];
platforms = [ ];
source = {
remotes = [ "https://rubygems.org" ];
sha256 = "0azpjgyhdm8ycblnx9crq3dgb2x8yg454a13n60zfpsc0n138sw1";
type = "gem";
};
version = "0.6.5";
};
tty-table = {
dependencies = [
"equatable"
"necromancer"
"pastel"
"strings"
"tty-screen"
];
groups = [ "default" ];
platforms = [ ];
source = {
remotes = [ "https://rubygems.org" ];
sha256 = "05krrj1x5pmfbz74paszrsr1316w9b9jlc4wpd9s9gpzqfzwjzcg";
type = "gem";
};
version = "0.10.0";
};
unicode-display_width = {
groups = [ "default" ];
platforms = [ ];
source = {
remotes = [ "https://rubygems.org" ];
sha256 = "1204c1jx2g89pc25qk5150mk7j5k90692i7ihgfzqnad6qni74h2";
type = "gem";
};
version = "1.8.0";
};
unicode_utils = {
groups = [ "default" ];
platforms = [ ];
source = {
remotes = [ "https://rubygems.org" ];
sha256 = "0h1a5yvrxzlf0lxxa1ya31jcizslf774arnsd89vgdhk4g7x08mr";
type = "gem";
};
version = "1.4.0";
};
wisper = {
groups = [ "default" ];
platforms = [ ];
source = {
remotes = [ "https://rubygems.org" ];
sha256 = "19bw0z1qw1dhv7gn9lad25hgbgpb1bkw8d599744xdfam158ms2s";
type = "gem";
};
version = "1.6.1";
};
}

View File

@@ -0,0 +1,22 @@
{
lib,
bundlerApp,
bundlerUpdateScript,
}:
bundlerApp {
pname = "neocities";
gemdir = ./.;
exes = [ "neocities" ];
passthru.updateScript = bundlerUpdateScript "neocities";
meta = with lib; {
description = "CLI and library for interacting with the Neocities API";
homepage = "https://github.com/neocities/neocities-ruby";
license = licenses.mit;
mainProgram = "neocities";
maintainers = with maintainers; [ dawoox ];
platforms = platforms.unix;
};
}

View File

@@ -0,0 +1,42 @@
{
lib,
rustPlatform,
fetchFromGitHub,
installShellFiles,
}:
rustPlatform.buildRustPackage rec {
pname = "neocmakelsp";
version = "0.8.25";
src = fetchFromGitHub {
owner = "Decodetalkers";
repo = "neocmakelsp";
rev = "v${version}";
hash = "sha256-6VGF2sbd/yhm+bxYDikfmXtg2iyKaVaidra2eo0ZP40=";
};
cargoHash = "sha256-khxTrAPeI7aaNHUE9jHuHoUpnkpcvfSlUyU/ShZpv0Q=";
nativeBuildInputs = [
installShellFiles
];
postInstall = ''
installShellCompletion --bash completions/bash/neocmakelsp
installShellCompletion --fish completions/fish/neocmakelsp.fish
installShellCompletion --zsh completions/zsh/_neocmakelsp
'';
meta = {
description = "CMake lsp based on tower-lsp and treesitter";
homepage = "https://github.com/Decodetalkers/neocmakelsp";
license = lib.licenses.mit;
platforms = lib.platforms.unix;
maintainers = with lib.maintainers; [
wineee
multivac61
];
mainProgram = "neocmakelsp";
};
}

View File

@@ -0,0 +1,78 @@
{
lib,
stdenvNoCC,
fetchFromGitHub,
bash,
makeWrapper,
pciutils,
x11Support ? stdenvNoCC.hostPlatform.isLinux,
ueberzug,
fetchpatch,
}:
stdenvNoCC.mkDerivation {
pname = "neofetch";
version = "unstable-2021-12-10";
src = fetchFromGitHub {
owner = "dylanaraps";
repo = "neofetch";
rev = "ccd5d9f52609bbdcd5d8fa78c4fdb0f12954125f";
sha256 = "sha256-9MoX6ykqvd2iB0VrZCfhSyhtztMpBTukeKejfAWYW1w=";
};
patches = [
(fetchpatch {
url = "https://github.com/dylanaraps/neofetch/commit/413c32e55dc16f0360f8e84af2b59fe45505f81b.patch";
sha256 = "1fapdg9z79f0j3vw7fgi72b54aw4brn42bjsj48brbvg3ixsciph";
name = "avoid_overwriting_gio_extra_modules_env_var.patch";
})
# https://github.com/dylanaraps/neofetch/pull/2114
(fetchpatch {
url = "https://github.com/dylanaraps/neofetch/commit/c4eb4ec7783bb94cca0dbdc96db45a4d965956d2.patch";
sha256 = "sha256-F6Q4dUtfmR28VxLbITiLFJ44FjG4T1Cvuz3a0nLisMs=";
name = "update_old_nixos_logo.patch";
})
# https://github.com/dylanaraps/neofetch/pull/2157
(fetchpatch {
url = "https://github.com/dylanaraps/neofetch/commit/de253afcf41bab441dc58d34cae654040cab7451.patch";
sha256 = "sha256-3i7WnCWNfsRjbenTULmKHft5o/o176imzforNmuoJwo=";
name = "improve_detect_nixos_version.patch";
})
];
outputs = [
"out"
"man"
];
strictDeps = true;
buildInputs = [ bash ];
nativeBuildInputs = [ makeWrapper ];
postPatch = ''
patchShebangs --host neofetch
'';
postInstall = ''
wrapProgram $out/bin/neofetch \
--prefix PATH : ${
lib.makeBinPath (
lib.optional (!stdenvNoCC.hostPlatform.isOpenBSD) pciutils ++ lib.optional x11Support ueberzug
)
}
'';
makeFlags = [
"PREFIX=${placeholder "out"}"
"SYSCONFDIR=${placeholder "out"}/etc"
];
meta = with lib; {
description = "Fast, highly customizable system info script";
homepage = "https://github.com/dylanaraps/neofetch";
license = licenses.mit;
platforms = platforms.all;
maintainers = with maintainers; [ konimex ];
mainProgram = "neofetch";
};
}

View File

@@ -0,0 +1,69 @@
{
lib,
stdenv,
rustPlatform,
cargo-tauri,
nodejs,
npmHooks,
fetchNpmDeps,
pkg-config,
webkitgtk_4_1,
fetchFromGitHub,
glib,
gtk3,
openssl,
nix-update-script,
}:
rustPlatform.buildRustPackage (finalAttrs: {
pname = "neohtop";
version = "1.2.0";
src = fetchFromGitHub {
owner = "Abdenasser";
repo = "neohtop";
tag = "v${finalAttrs.version}";
hash = "sha256-a6yHg3LqnVQJPi4+WpsxHjvWC2hZhZZkAFqgOVmfWfg=";
};
npmDeps = fetchNpmDeps {
inherit (finalAttrs) src;
hash = "sha256-t0REXcsy9XIIARiI7lkOc5lO/ZSL50KOUK+SMsXpjdM=";
};
cargoPatches = [
# Remove when https://github.com/Abdenasser/neohtop/pull/187 is released
./tauri-version.patch
];
cargoHash = "sha256-fl/slVYr5RExI9ab8YeX2Q8mF+cnR1R1rUg5i11ao4M=";
cargoRoot = "src-tauri";
buildAndTestSubdir = "src-tauri";
nativeBuildInputs = [
cargo-tauri.hook
npmHooks.npmConfigHook
pkg-config
nodejs
];
buildInputs = lib.optionals stdenv.hostPlatform.isLinux [
glib
gtk3
openssl
webkitgtk_4_1
];
passthru.updateScript = nix-update-script { };
meta = {
description = "Blazing-fast system monitoring for your desktop";
homepage = "https://github.com/Abdenasser/neohtop";
changelog = "https://github.com/Abdenasser/neohtop/releases/tag/v${finalAttrs.version}";
mainProgram = "NeoHtop";
license = lib.licenses.mit;
platforms = lib.platforms.linux ++ lib.platforms.darwin;
maintainers = with lib.maintainers; [ sandarukasa ];
};
})

View File

@@ -0,0 +1,250 @@
diff --git a/src-tauri/Cargo.lock b/src-tauri/Cargo.lock
index 7e91351..16af8fb 100644
--- a/src-tauri/Cargo.lock
+++ b/src-tauri/Cargo.lock
@@ -379,6 +379,16 @@ version = "0.4.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "6245d59a3e82a7fc217c5828a6692dbc6dfb63a0c8c90495621f7b9d79704a0e"
+[[package]]
+name = "cookie"
+version = "0.18.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "4ddef33a339a91ea89fb53151bd0a4689cfce27055c291dfa69945475d22c747"
+dependencies = [
+ "time",
+ "version_check",
+]
+
[[package]]
name = "core-foundation"
version = "0.10.0"
@@ -762,15 +772,6 @@ dependencies = [
"miniz_oxide",
]
-[[package]]
-name = "fluent-uri"
-version = "0.1.4"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "17c704e9dbe1ddd863da1e6ff3567795087b1eb201ce80d8fa81162e1516500d"
-dependencies = [
- "bitflags 1.3.2",
-]
-
[[package]]
name = "fnv"
version = "1.0.7"
@@ -1507,41 +1508,18 @@ dependencies = [
"wasm-bindgen",
]
-[[package]]
-name = "json-patch"
-version = "2.0.0"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "5b1fb8864823fad91877e6caea0baca82e49e8db50f8e5c9f9a453e27d3330fc"
-dependencies = [
- "jsonptr 0.4.7",
- "serde",
- "serde_json",
- "thiserror 1.0.65",
-]
-
[[package]]
name = "json-patch"
version = "3.0.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "863726d7afb6bc2590eeff7135d923545e5e964f004c2ccf8716c25e70a86f08"
dependencies = [
- "jsonptr 0.6.3",
+ "jsonptr",
"serde",
"serde_json",
"thiserror 1.0.65",
]
-[[package]]
-name = "jsonptr"
-version = "0.4.7"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "1c6e529149475ca0b2820835d3dce8fcc41c6b943ca608d32f35b449255e4627"
-dependencies = [
- "fluent-uri",
- "serde",
- "serde_json",
-]
-
[[package]]
name = "jsonptr"
version = "0.6.3"
@@ -3146,9 +3124,9 @@ dependencies = [
[[package]]
name = "tao"
-version = "0.30.5"
+version = "0.30.8"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "63f1f6b2017cc33d7f6fc9c6186a2c0f5dfc985899a7b4fe9e64985c17533db3"
+checksum = "6682a07cf5bab0b8a2bd20d0a542917ab928b5edb75ebd4eda6b05cbaab872da"
dependencies = [
"bitflags 2.6.0",
"cocoa",
@@ -3202,9 +3180,9 @@ checksum = "61c41af27dd6d1e27b1b16b489db798443478cef1f06a660c96db617ba5de3b1"
[[package]]
name = "tauri"
-version = "2.0.6"
+version = "2.1.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "d3889b392db6d32a105d3757230ea0220090b8f94c90d3e60b6c5eb91178ab1b"
+checksum = "e545de0a2dfe296fa67db208266cd397c5a55ae782da77973ef4c4fac90e9f2c"
dependencies = [
"anyhow",
"bytes",
@@ -3239,7 +3217,7 @@ dependencies = [
"tauri-runtime",
"tauri-runtime-wry",
"tauri-utils",
- "thiserror 1.0.65",
+ "thiserror 2.0.1",
"tokio",
"tray-icon",
"url",
@@ -3252,16 +3230,16 @@ dependencies = [
[[package]]
name = "tauri-build"
-version = "2.0.2"
+version = "2.0.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "9f96827ccfb1aa40d55d0ded79562d18ba18566657a553f992a982d755148376"
+checksum = "7bd2a4bcfaf5fb9f4be72520eefcb61ae565038f8ccba2a497d8c28f463b8c01"
dependencies = [
"anyhow",
"cargo_toml",
"dirs",
"glob",
"heck 0.5.0",
- "json-patch 3.0.1",
+ "json-patch",
"schemars",
"semver",
"serde",
@@ -3274,14 +3252,14 @@ dependencies = [
[[package]]
name = "tauri-codegen"
-version = "2.0.2"
+version = "2.0.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "8947f16f47becd9e9cd39b74ee337fd1981574d78819be18e4384d85e5a0b82f"
+checksum = "bf79faeecf301d3e969b1fae977039edb77a4c1f25cc0a961be298b54bff97cf"
dependencies = [
"base64 0.22.1",
"brotli",
"ico",
- "json-patch 2.0.0",
+ "json-patch",
"plist",
"png",
"proc-macro2",
@@ -3292,7 +3270,7 @@ dependencies = [
"sha2",
"syn 2.0.87",
"tauri-utils",
- "thiserror 1.0.65",
+ "thiserror 2.0.1",
"time",
"url",
"uuid",
@@ -3301,9 +3279,9 @@ dependencies = [
[[package]]
name = "tauri-macros"
-version = "2.0.2"
+version = "2.0.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "8bd1c8d4a66799d3438747c3a79705cd665a95d6f24cb5f315413ff7a981fe2a"
+checksum = "c52027c8c5afb83166dacddc092ee8fff50772f9646d461d8c33ee887e447a03"
dependencies = [
"heck 0.5.0",
"proc-macro2",
@@ -3371,9 +3349,9 @@ dependencies = [
[[package]]
name = "tauri-runtime"
-version = "2.1.1"
+version = "2.2.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "a1ef7363e7229ac8d04e8a5d405670dbd43dde8fc4bc3bc56105c35452d03784"
+checksum = "cce18d43f80d4aba3aa8a0c953bbe835f3d0f2370aca75e8dbb14bd4bab27958"
dependencies = [
"dpi",
"gtk",
@@ -3383,16 +3361,16 @@ dependencies = [
"serde",
"serde_json",
"tauri-utils",
- "thiserror 1.0.65",
+ "thiserror 2.0.1",
"url",
"windows",
]
[[package]]
name = "tauri-runtime-wry"
-version = "2.1.2"
+version = "2.2.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "62fa2068e8498ad007b54d5773d03d57c3ff6dd96f8c8ce58beff44d0d5e0d30"
+checksum = "9f442a38863e10129ffe2cec7bd09c2dcf8a098a3a27801a476a304d5bb991d2"
dependencies = [
"gtk",
"http",
@@ -3428,7 +3406,7 @@ dependencies = [
"html5ever",
"http",
"infer",
- "json-patch 3.0.1",
+ "json-patch",
"kuchikiki",
"log",
"memchr",
@@ -4429,12 +4407,13 @@ dependencies = [
[[package]]
name = "wry"
-version = "0.46.3"
+version = "0.47.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "cd5cdf57c66813d97601181349c63b96994b3074fc3d7a31a8cce96e968e3bbd"
+checksum = "61ce51277d65170f6379d8cda935c80e3c2d1f0ff712a123c8bddb11b31a4b73"
dependencies = [
"base64 0.22.1",
"block2",
+ "cookie",
"crossbeam-channel",
"dpi",
"dunce",
@@ -4459,6 +4438,7 @@ dependencies = [
"soup3",
"tao-macros",
"thiserror 1.0.65",
+ "url",
"webkit2gtk",
"webkit2gtk-sys",
"webview2-com",
diff --git a/src-tauri/Cargo.toml b/src-tauri/Cargo.toml
index 3af22fb..9bff78d 100644
--- a/src-tauri/Cargo.toml
+++ b/src-tauri/Cargo.toml
@@ -11,7 +11,7 @@ tauri-build = { version = "2", features = [] }
[dependencies]
serde_json = "1.0"
serde = { version = "1.0", features = ["derive"] }
-tauri = { version = "2", features = ["macos-private-api"] }
+tauri = { version = "2.1.1", features = ["macos-private-api"] }
sysinfo = "0.29.0"
tauri-plugin-shell = "2"
tauri-plugin-os = "2"

View File

@@ -0,0 +1,184 @@
{
lib,
stdenv,
fetchFromGitHub,
gettext,
makeWrapper,
tcl,
which,
ncurses,
perl,
cyrus_sasl,
gitUpdater,
gss,
gpgme,
libkrb5,
libidn2,
libxml2,
notmuch,
openssl,
lua,
lmdb,
libxslt,
docbook_xsl,
docbook_xml_dtd_42,
w3m,
mailcap,
sqlite,
zlib,
lndir,
pkg-config,
zstd,
enableZstd ? true,
enableMixmaster ? false,
enableLua ? false,
enableSmimeKeys ? true,
withContrib ? true,
withNotmuch ? true,
}:
assert lib.warnIf enableMixmaster
"Support for mixmaster has been removed from neomutt since the 20241002 release"
true;
stdenv.mkDerivation (finalAttrs: {
pname = "neomutt";
version = "20250905";
src = fetchFromGitHub {
owner = "neomutt";
repo = "neomutt";
tag = finalAttrs.version;
hash = "sha256-RLyszU2u5jV/o6LrmZFkLx/Wu94Yq3JlXNgpe4agOZI=";
};
buildInputs = [
cyrus_sasl
gss
gpgme
libkrb5
libidn2
ncurses
openssl
perl
lmdb
mailcap
sqlite
]
++ lib.optional enableZstd zstd
++ lib.optional enableLua lua
++ lib.optional withNotmuch notmuch;
nativeBuildInputs = [
docbook_xsl
docbook_xml_dtd_42
gettext
libxml2
libxslt.bin
makeWrapper
tcl
which
zlib
w3m
pkg-config
];
enableParallelBuilding = true;
postPatch = ''
substituteInPlace auto.def --replace /usr/sbin/sendmail sendmail
substituteInPlace contrib/smime_keys \
--replace /usr/bin/openssl ${openssl}/bin/openssl
for f in doc/*.{xml,xsl}* ; do
substituteInPlace $f \
--replace http://docbook.sourceforge.net/release/xsl/current ${docbook_xsl}/share/xml/docbook-xsl \
--replace http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd ${docbook_xml_dtd_42}/xml/dtd/docbook/docbookx.dtd
done
# allow neomutt to map attachments to their proper mime.types if specified wrongly
# and use a far more comprehensive list than the one shipped with neomutt
substituteInPlace send/sendlib.c \
--replace /etc/mime.types ${mailcap}/etc/mime.types
'';
configureFlags = [
"--enable-autocrypt"
"--gpgme"
"--gss"
"--lmdb"
"--ssl"
"--sasl"
"--with-homespool=mailbox"
"--with-mailpath="
# To make it not reference .dev outputs. See:
# https://github.com/neomutt/neomutt/pull/2367
"--disable-include-path-in-cflags"
"--zlib"
]
++ lib.optional enableZstd "--zstd"
++ lib.optional enableLua "--lua"
++ lib.optional withNotmuch "--notmuch";
postInstall = ''
wrapProgram "$out/bin/neomutt" --prefix PATH : "$out/libexec/neomutt"
''
+ lib.optionalString enableSmimeKeys ''
install -m 755 $src/contrib/smime_keys $out/bin;
substituteInPlace $out/bin/smime_keys \
--replace-fail '/usr/bin/openssl' '${openssl}/bin/openssl';
''
# https://github.com/neomutt/neomutt-contrib
# Contains vim-keys, keybindings presets and more.
+ lib.optionalString withContrib "${lib.getExe lndir} ${finalAttrs.passthru.contrib} $out/share/doc/neomutt";
doCheck = true;
preCheck = ''
cp -r ${finalAttrs.passthru.test-files} $(pwd)/test-files
chmod -R +w test-files
(cd test-files && ./setup.sh)
export NEOMUTT_TEST_DIR=$(pwd)/test-files
# The test fails with: node_padding.c:135: Check rc == 15... failed
substituteInPlace test/main.c \
--replace-fail "NEOMUTT_TEST_ITEM(test_expando_node_padding)" ""
'';
passthru = {
test-files = fetchFromGitHub {
owner = "neomutt";
repo = "neomutt-test-files";
rev = "00efc8388110208e77e6ed9d8294dfc333753d54";
hash = "sha256-/ELowuMq67v56MAJBtO73g6OqV0DVwW4+x+0u4P5mB0=";
};
contrib = fetchFromGitHub {
owner = "neomutt";
repo = "neomutt-contrib";
rev = "8e97688693ca47ea1055f3d15055a4f4ecc5c832";
hash = "sha256-tx5Y819rNDxOpjg3B/Y2lPcqJDArAxVwjbYarVmJ79k=";
};
updateScript = gitUpdater { };
};
checkTarget = "test";
postCheck = "unset NEOMUTT_TEST_DIR";
meta = {
description = "Small but very powerful text-based mail client";
changelog = "https://github.com/neomutt/neomutt/releases/tag/${finalAttrs.version}/CHANGELOG.md";
mainProgram = "neomutt";
downloadPage = "https://github.com/neomutt/neomutt";
homepage = "https://www.neomutt.org";
license = lib.licenses.gpl2Plus;
maintainers = with lib.maintainers; [
erikryb
raitobezarius
ethancedwards8
];
platforms = lib.platforms.unix;
};
})

View File

@@ -0,0 +1,12 @@
diff -Nuar neon-0.29.6/configure neon-0.29.6-darwin-fix-configure/configure
--- neon-0.29.6/configure 2011-05-03 14:25:31.000000000 +0200
+++ neon-0.29.6-darwin-fix-configure/configure 2012-06-06 23:32:21.000000000 +0200
@@ -4184,7 +4184,7 @@
case x"$ne_cv_os_uname" in #(
x"Darwin") :
- CPPFLAGS="$CPPFLAGS -no-cpp-precomp"
+ CPPFLAGS="$CPPFLAGS"
LDFLAGS="$LDFLAGS -flat_namespace"
# poll has various issues in various Darwin releases
if test x${ac_cv_func_poll+set} != xset; then

View File

@@ -0,0 +1,66 @@
{
lib,
stdenv,
fetchurl,
libxml2,
pkg-config,
compressionSupport ? true,
zlib ? null,
sslSupport ? true,
openssl ? null,
static ? stdenv.hostPlatform.isStatic,
shared ? !stdenv.hostPlatform.isStatic,
bash,
}:
assert compressionSupport -> zlib != null;
assert sslSupport -> openssl != null;
assert static || shared;
let
inherit (lib) optionals;
in
stdenv.mkDerivation rec {
version = "0.35.0";
pname = "neon";
src = fetchurl {
url = "https://notroj.github.io/${pname}/${pname}-${version}.tar.gz";
sha256 = "sha256-FGevtz814/XQ6f1wYowUy6Jmpl4qH7bj+UXuM4XIWVs=";
};
patches = optionals stdenv.hostPlatform.isDarwin [ ./darwin-fix-configure.patch ];
nativeBuildInputs = [ pkg-config ];
buildInputs = [
libxml2
openssl
bash
]
++ lib.optional compressionSupport zlib;
strictDeps = true;
configureFlags = [
(lib.enableFeature shared "shared")
(lib.enableFeature static "static")
(lib.withFeature compressionSupport "zlib")
(lib.withFeature sslSupport "ssl")
];
preConfigure = ''
export PKG_CONFIG="$(command -v "$PKG_CONFIG")"
'';
passthru = { inherit compressionSupport sslSupport; };
meta = {
description = "HTTP and WebDAV client library";
mainProgram = "neon-config";
homepage = "https://notroj.github.io/neon/";
changelog = "https://github.com/notroj/${pname}/blob/${version}/NEWS";
platforms = lib.platforms.unix;
license = lib.licenses.lgpl2;
};
}

View File

@@ -0,0 +1,51 @@
{
stdenv,
lib,
buildGoModule,
fetchFromGitHub,
nix-update-script,
installShellFiles,
writableTmpDirAsHomeHook,
}:
buildGoModule (finalAttrs: {
pname = "neonmodem";
version = "1.0.7";
src = fetchFromGitHub {
owner = "mrusme";
repo = "neonmodem";
tag = "v${finalAttrs.version}";
hash = "sha256-gwhQG8H1OnGQmawPQ3m6VKVooBh8rZaNr6FDl6fgZXc=";
};
vendorHash = "sha256-zqQtuyFrsDB1xRdl4cbaTsCawMrBvcu78zXgU2jUwHI=";
passthru.updateScript = nix-update-script { };
nativeBuildInputs = [
installShellFiles
writableTmpDirAsHomeHook
];
postInstall = lib.optionalString (stdenv.buildPlatform.canExecute stdenv.hostPlatform) ''
# Will otherwise panic if it can't open $HOME/{Library/Caches,.cache}/neonmodem.log
# Upstream issue: https://github.com/mrusme/neonmodem/issues/53
mkdir -p "$HOME/${if stdenv.buildPlatform.isDarwin then "Library/Caches" else ".cache"}"
installShellCompletion --cmd neonmodem \
--bash <($out/bin/neonmodem completion bash) \
--fish <($out/bin/neonmodem completion fish) \
--zsh <($out/bin/neonmodem completion zsh)
'';
meta = {
description = "BBS-style TUI client for Discourse, Lemmy, Lobsters, and Hacker News";
homepage = "https://neonmodem.com";
downloadPage = "https://github.com/mrusme/neonmodem/releases";
changelog = "https://github.com/mrusme/neonmodem/releases/tag/v${finalAttrs.version}";
license = lib.licenses.gpl3Only;
maintainers = with lib.maintainers; [ acuteaangle ];
mainProgram = "neonmodem";
};
})

View File

@@ -0,0 +1,32 @@
{
lib,
buildGoModule,
fetchFromGitHub,
}:
buildGoModule rec {
pname = "neosay";
version = "1.0.1";
src = fetchFromGitHub {
owner = "donuts-are-good";
repo = "neosay";
rev = "v${version}";
hash = "sha256-2tFjvAobDpBh1h0ejdtqxDsC+AqyneN+xNssOJNfEbk=";
};
vendorHash = "sha256-w0aZnel5Obq73UXcG9wmO9t/7qQTE8ru656u349cvzQ=";
ldflags = [
"-s"
"-w"
];
meta = with lib; {
description = "Pipe stdin to matrix";
mainProgram = "neosay";
homepage = "https://github.com/donuts-are-good/neosay";
license = licenses.mit;
maintainers = [ ];
};
}

View File

@@ -0,0 +1,74 @@
{
rustPlatform,
fetchFromGitHub,
lib,
ffmpeg,
pkg-config,
alsa-lib,
wayland,
makeWrapper,
libxkbcommon,
vulkan-loader,
xorg,
}:
let
version = "0.3.1";
src = fetchFromGitHub {
owner = "PolyMeilex";
repo = "Neothesia";
rev = "v${version}";
hash = "sha256-qYwBSye6RYClSlWmHwuy/rxq9w5932tR33Z+o2S1l8k=";
};
in
rustPlatform.buildRustPackage {
pname = "neothesia";
inherit src version;
buildInputs = [
ffmpeg
alsa-lib
];
nativeBuildInputs = [
pkg-config
makeWrapper
rustPlatform.bindgenHook
];
cargoHash = "sha256-mXeNAVYqPsBWiUZFV/atx/xjLgFNarm2HwI7k/NaAbc=";
cargoBuildFlags = [
"-p neothesia -p neothesia-cli"
];
postInstall = ''
wrapProgram $out/bin/neothesia --prefix LD_LIBRARY_PATH : "${
lib.makeLibraryPath [
wayland
libxkbcommon
vulkan-loader
xorg.libX11
xorg.libXcursor
xorg.libXi
xorg.libXrender
]
}"
install -Dm 644 flatpak/com.github.polymeilex.neothesia.desktop $out/share/applications/com.github.polymeilex.neothesia.desktop
install -Dm 644 flatpak/com.github.polymeilex.neothesia.png $out/share/icons/hicolor/256x256/apps/com.github.polymeilex.neothesia.png
install -Dm 644 default.sf2 $out/share/neothesia/default.sf2
'';
meta = {
description = "Flashy Synthesia Like Software For Linux, Windows and macOS";
homepage = "https://github.com/PolyMeilex/Neothesia";
license = lib.licenses.gpl3;
platforms = lib.platforms.linux;
mainProgram = "neothesia";
maintainers = [
lib.maintainers.naxdy
];
};
}

View File

@@ -0,0 +1,136 @@
{
lib,
rustPlatform,
clangStdenv,
fetchFromGitHub,
linkFarm,
fetchgit,
runCommand,
gn,
neovim,
ninja,
makeWrapper,
pkg-config,
python3,
removeReferencesTo,
cctools,
SDL2,
fontconfig,
xorg,
stdenv,
libglvnd,
libxkbcommon,
enableWayland ? stdenv.hostPlatform.isLinux,
wayland,
}:
rustPlatform.buildRustPackage.override { stdenv = clangStdenv; } (finalAttrs: {
pname = "neovide";
version = "0.15.2";
src = fetchFromGitHub {
owner = "neovide";
repo = "neovide";
tag = finalAttrs.version;
hash = "sha256-NJ4BuJLABIuB7We11QGoKZ3fgjDBdZDyZuBKq6LIWA8=";
};
cargoHash = "sha256-DD2c63JHMdzwD1OmC7c9dMB59qjvdAYZ9drQf3f8xCs=";
SKIA_SOURCE_DIR =
let
repo = fetchFromGitHub {
owner = "rust-skia";
repo = "skia";
# see rust-skia:skia-bindings/Cargo.toml#package.metadata skia
tag = "m140-0.87.4";
hash = "sha256-pHxqTrqguZcPmuZgv0ASbJ3dgn8JAyHI7+PdBX5gAZQ=";
};
# The externals for skia are taken from skia/DEPS
externals = linkFarm "skia-externals" (
lib.mapAttrsToList (name: value: {
inherit name;
path = fetchgit value;
}) (lib.importJSON ./skia-externals.json)
);
in
runCommand "source" { } ''
cp -R ${repo} $out
chmod -R +w $out
ln -s ${externals} $out/third_party/externals
'';
SKIA_GN_COMMAND = "${gn}/bin/gn";
SKIA_NINJA_COMMAND = "${ninja}/bin/ninja";
nativeBuildInputs = [
makeWrapper
pkg-config
python3 # skia
removeReferencesTo
]
++ lib.optionals stdenv.hostPlatform.isDarwin [
cctools.libtool
];
nativeCheckInputs = [ neovim ];
buildInputs = [
SDL2
fontconfig
rustPlatform.bindgenHook
];
postFixup =
let
libPath = lib.makeLibraryPath (
[
libglvnd
libxkbcommon
xorg.libX11
xorg.libXcursor
xorg.libXext
xorg.libXrandr
xorg.libXi
]
++ lib.optionals enableWayland [ wayland ]
);
in
''
# library skia embeds the path to its sources
remove-references-to -t "$SKIA_SOURCE_DIR" \
$out/bin/neovide
wrapProgram $out/bin/neovide \
--prefix LD_LIBRARY_PATH : ${libPath}
'';
postInstall =
lib.optionalString stdenv.hostPlatform.isDarwin ''
mkdir -p $out/Applications
cp -r extra/osx/Neovide.app $out/Applications
ln -s $out/bin $out/Applications/Neovide.app/Contents/MacOS
''
+ lib.optionalString stdenv.hostPlatform.isLinux ''
for n in 16x16 32x32 48x48 256x256; do
install -m444 -D "assets/neovide-$n.png" \
"$out/share/icons/hicolor/$n/apps/neovide.png"
done
install -m444 -Dt $out/share/icons/hicolor/scalable/apps assets/neovide.svg
install -m444 -Dt $out/share/applications assets/neovide.desktop
'';
disallowedReferences = [ finalAttrs.SKIA_SOURCE_DIR ];
meta = {
description = "Simple, no-nonsense, cross-platform graphical user interface for Neovim";
mainProgram = "neovide";
homepage = "https://neovide.dev/";
changelog = "https://github.com/neovide/neovide/releases/tag/${finalAttrs.version}";
license = lib.licenses.mit;
maintainers = with lib.maintainers; [
ck3d
];
platforms = lib.platforms.unix;
};
})

View File

@@ -0,0 +1,37 @@
{
"expat": {
"url": "https://chromium.googlesource.com/external/github.com/libexpat/libexpat.git",
"rev": "8e49998f003d693213b538ef765814c7d21abada",
"sha256": "sha256-zP2kiB4nyLi0/I8OsRhxKG0qRGPe2ALLQ+HHfqlBJ6Y="
},
"libjpeg-turbo": {
"url": "https://chromium.googlesource.com/chromium/deps/libjpeg_turbo.git",
"rev": "e14cbfaa85529d47f9f55b0f104a579c1061f9ad",
"sha256": "sha256-Ig+tmprZDvlf/M72/DTar2pbxat9ZElgSqdXdoM0lPs="
},
"icu": {
"url": "https://chromium.googlesource.com/chromium/deps/icu.git",
"rev": "364118a1d9da24bb5b770ac3d762ac144d6da5a4",
"sha256": "sha256-frsmwYMiFixEULsE91x5+p98DvkyC0s0fNupqjoRnvg="
},
"zlib": {
"url": "https://chromium.googlesource.com/chromium/src/third_party/zlib",
"rev": "646b7f569718921d7d4b5b8e22572ff6c76f2596",
"sha256": "sha256-jNj6SuTZ5/a7crtYhxW3Q/TlfRMNMfYIVxDlr7bYdzQ="
},
"harfbuzz": {
"url": "https://chromium.googlesource.com/external/github.com/harfbuzz/harfbuzz.git",
"rev": "08b52ae2e44931eef163dbad71697f911fadc323",
"sha256": "sha256-sP9FQLUEgTZFlvfYqSZnzZqBMxVotzD0FKKsu3/OdUw="
},
"wuffs": {
"url": "https://skia.googlesource.com/external/github.com/google/wuffs-mirror-release-c.git",
"rev": "e3f919ccfe3ef542cfc983a82146070258fb57f8",
"sha256": "sha256-373d2F/STcgCHEq+PO+SCHrKVOo6uO1rqqwRN5eeBCw="
},
"libpng": {
"url": "https://skia.googlesource.com/third_party/libpng.git",
"rev": "ed217e3e601d8e462f7fd1e04bed43ac42212429",
"sha256": "sha256-Mo1M8TuVaoSIb7Hy2u6zgjZ1DKgpmgNmGRP6dGg/aTs="
}
}

View File

@@ -0,0 +1,12 @@
diff -ru a/src/ui.rs b/src/ui.rs
--- a/src/ui.rs
+++ b/src/ui.rs
@@ -385,7 +386,7 @@
files_list
.iter()
.map(|f| misc::escape_filename(f))
- .collect::<Box<_>>()
+ .collect::<Box<[_]>>()
.join(" ")
));
} else {

View File

@@ -0,0 +1,53 @@
{
lib,
rustPlatform,
fetchFromGitHub,
wrapGAppsHook4,
pkg-config,
gdk-pixbuf,
gtk4,
pango,
vte-gtk4,
}:
rustPlatform.buildRustPackage (finalAttrs: {
pname = "neovim-gtk";
version = "1.0.4";
src = fetchFromGitHub {
owner = "Lyude";
repo = "neovim-gtk";
tag = "v${finalAttrs.version}";
hash = "sha256-inva7pYwOw3bXvFeKZ4aKSQ65iCat5HxM+NME8jN4/I=";
};
cargoHash = "sha256-93cKoyLNSLDmm9PnJzn0x6VONPqiCA3wcLwYgdOLIg8=";
nativeBuildInputs = [
wrapGAppsHook4
pkg-config
];
buildInputs = [
gdk-pixbuf
gtk4
pango
vte-gtk4
];
patches = [ ./collect-box.patch ];
postInstall = ''
make PREFIX=$out install-resources
'';
meta = {
description = "Gtk ui for neovim";
homepage = "https://github.com/Lyude/neovim-gtk";
license = lib.licenses.gpl3Only;
maintainers = with lib.maintainers; [
aleksana
];
mainProgram = "nvim-gtk";
};
})

View File

@@ -0,0 +1,56 @@
{
lib,
buildNpmPackage,
fetchNpmDeps,
fetchFromGitHub,
versionCheckHook,
nix-update-script,
}:
buildNpmPackage rec {
pname = "node-client";
version = "5.4.0";
src = fetchFromGitHub {
owner = "neovim";
repo = "node-client";
tag = "v${version}";
hash = "sha256-nAV0X5882Ps5zDPfmoRHm0a0NtzCOpBQEZqOT2/GCZU=";
};
npmDeps = fetchNpmDeps {
inherit src;
hash = "sha256-AN3TVvCyWjjm1GfnI+ZMt27KQC7qYxQ0bcysAaDsyz4=";
};
buildPhase = ''
runHook preBuild
npm run build
runHook postBuild
'';
postInstall = ''
mkdir $out/bin
ln -s $out/lib/node_modules/neovim/node_modules/.bin/neovim-node-host $out/bin/neovim-node-host
'';
nativeInstallCheckInputs = [
versionCheckHook
];
versionCheckProgram = "${placeholder "out"}/bin/neovim-node-host";
versionCheckProgramArg = "--version";
doInstallCheck = true;
passthru = {
updateScript = nix-update-script { };
};
meta = {
description = "Nvim msgpack API client and remote plugin provider";
homepage = "https://github.com/neovim/node-client";
changelog = "https://github.com/neovim/node-client/releases/tag/v${version}";
license = lib.licenses.mit;
maintainers = with lib.maintainers; [ fidgetingbits ];
mainProgram = "neovim-node-host";
};
}

View File

@@ -0,0 +1,63 @@
{
stdenv,
lib,
libsForQt5,
fetchFromGitHub,
cmake,
doxygen,
msgpack-c,
neovim,
python3,
}:
stdenv.mkDerivation (finalAttrs: {
pname = "neovim-qt-unwrapped";
version = "0.2.19";
src = fetchFromGitHub {
owner = "equalsraf";
repo = "neovim-qt";
tag = "v${finalAttrs.version}";
hash = "sha256-r77tg3xVemHW/zDNA6dYerFjFaYDDeHsD68WhMfI70Q=";
};
cmakeFlags = [
"-DUSE_SYSTEM_MSGPACK=1"
"-DENABLE_TESTS=0" # tests fail because xcb platform plugin is not found
];
nativeBuildInputs = [
cmake
doxygen
libsForQt5.wrapQtAppsHook
(python3.withPackages (ps: [
ps.jinja2
ps.msgpack
]))
];
buildInputs = [
neovim.unwrapped # only used to generate help tags at build time
libsForQt5.qtbase
libsForQt5.qtsvg
msgpack-c
];
preCheck = ''
# The GUI tests require a running X server, disable them
sed -i ../test/CMakeLists.txt -e '/^add_xtest_gui/d'
'';
doCheck = true;
meta = {
description = "Neovim client library and GUI, in Qt5";
homepage = "https://github.com/equalsraf/neovim-qt";
license = lib.licenses.isc;
mainProgram = "nvim-qt";
maintainers = with lib.maintainers; [
peterhoeg
];
inherit (neovim.meta) platforms;
};
})

View File

@@ -0,0 +1,46 @@
{
stdenvNoCC,
makeWrapper,
neovim,
neovim-qt-unwrapped,
}:
let
unwrapped = neovim-qt-unwrapped;
in
stdenvNoCC.mkDerivation {
pname = "neovim-qt";
version = unwrapped.version;
buildCommand =
if stdenvNoCC.hostPlatform.isDarwin then
''
mkdir -p $out/Applications
cp -r ${unwrapped}/bin/nvim-qt.app $out/Applications
chmod -R a+w $out/Applications/nvim-qt.app/Contents/MacOS
wrapProgram $out/Applications/nvim-qt.app/Contents/MacOS/nvim-qt \
--prefix PATH : ${neovim}/bin
''
else
''
makeWrapper ${unwrapped}/bin/nvim-qt $out/bin/nvim-qt \
--prefix PATH : ${neovim}/bin
# link .desktop file
mkdir -p $out/share/pixmaps
ln -s ${unwrapped}/share/applications $out/share/applications
ln -s ${unwrapped}/share/icons $out/share/icons
'';
preferLocalBuild = true;
nativeBuildInputs = [
makeWrapper
];
passthru = {
inherit unwrapped;
};
inherit (unwrapped) meta;
}

View File

@@ -0,0 +1,58 @@
{
lib,
stdenv,
fetchFromGitHub,
python3,
neovim,
fetchpatch,
}:
python3.pkgs.buildPythonApplication rec {
pname = "neovim-remote";
version = "2.5.1";
pyproject = true;
src = fetchFromGitHub {
owner = "mhinz";
repo = "neovim-remote";
rev = "v${version}";
hash = "sha256-uO5KezbUQGj3rNpuw2SJOzcP86DZqX7DJFz3BxEnf1E=";
};
patches = [
# Fix a compatibility issue with neovim 0.8.0
(fetchpatch {
url = "https://github.com/mhinz/neovim-remote/commit/56d2a4097f4b639a16902390d9bdd8d1350f948c.patch";
hash = "sha256-/PjE+9yfHtOUEp3xBaobzRM8Eo2wqOhnF1Es7SIdxvM=";
})
];
build-system = with python3.pkgs; [ setuptools ];
dependencies = with python3.pkgs; [
pynvim
psutil
];
nativeCheckInputs = [
neovim
python3.pkgs.pytestCheckHook
];
doCheck = !stdenv.hostPlatform.isDarwin;
preCheck = ''
export HOME="$(mktemp -d)"
'';
pythonImportsCheck = [ "nvr" ];
meta = with lib; {
description = "Tool that helps controlling nvim processes from a terminal";
homepage = "https://github.com/mhinz/neovim-remote/";
license = licenses.mit;
maintainers = with maintainers; [ edanaher ];
platforms = platforms.unix;
mainProgram = "nvr";
};
}

View File

@@ -0,0 +1,272 @@
{
lib,
stdenv,
fetchFromGitHub,
cmake,
gettext,
libuv,
lua,
pkg-config,
unibilium,
utf8proc,
tree-sitter,
fetchurl,
buildPackages,
treesitter-parsers ? import ./treesitter-parsers.nix { inherit fetchurl; },
fixDarwinDylibNames,
glibcLocales ? null,
procps ? null,
versionCheckHook,
nix-update-script,
# now defaults to false because some tests can be flaky (clipboard etc), see
# also: https://github.com/neovim/neovim/issues/16233
nodejs ? null,
fish ? null,
python3 ? null,
}:
stdenv.mkDerivation (
finalAttrs:
let
nvim-lpeg-dylib =
luapkgs:
if stdenv.hostPlatform.isDarwin then
let
luaLibDir = "$out/lib/lua/${lib.versions.majorMinor luapkgs.lua.luaversion}";
in
(luapkgs.lpeg.overrideAttrs (oa: {
preConfigure = ''
# neovim wants clang .dylib
substituteInPlace Makefile \
--replace-fail "CC = gcc" "CC = clang" \
--replace-fail "-bundle" "-dynamiclib" \
--replace-fail "lpeg.so" "lpeg.dylib"
'';
preBuild = ''
# there seems to be implicit calls to Makefile from luarocks, we need to
# add a stage to build our dylib
make macosx
mkdir -p ${luaLibDir}
mv lpeg.dylib ${luaLibDir}/lpeg.dylib
'';
postInstall = ''
rm -f ${luaLibDir}/lpeg.so
'';
nativeBuildInputs =
oa.nativeBuildInputs ++ (lib.optional stdenv.hostPlatform.isDarwin fixDarwinDylibNames);
}))
else
luapkgs.lpeg;
requiredLuaPkgs =
ps:
(
with ps;
[
(nvim-lpeg-dylib ps)
luabitop
mpack
]
++ lib.optionals finalAttrs.finalPackage.doCheck [
luv
coxpcall
busted
luafilesystem
penlight
inspect
]
);
neovimLuaEnv = lua.withPackages requiredLuaPkgs;
neovimLuaEnvOnBuild = lua.luaOnBuild.withPackages requiredLuaPkgs;
codegenLua =
if lua.luaOnBuild.pkgs.isLuaJIT then
let
deterministicLuajit = lua.luaOnBuild.override {
deterministicStringIds = true;
self = deterministicLuajit;
};
in
deterministicLuajit.withPackages (ps: [
ps.mpack
(nvim-lpeg-dylib ps)
])
else
lua.luaOnBuild;
in
{
pname = "neovim-unwrapped";
version = "0.11.4";
__structuredAttrs = true;
src = fetchFromGitHub {
owner = "neovim";
repo = "neovim";
tag = "v${finalAttrs.version}";
hash = "sha256-IpMHxIDpldg4FXiXPEY2E51DfO/Z5XieKdtesLna9Xw=";
};
patches = [
# introduce a system-wide rplugin.vim in addition to the user one
# necessary so that nix can handle `UpdateRemotePlugins` for the plugins
# it installs. See https://github.com/neovim/neovim/issues/9413.
./system_rplugin_manifest.patch
];
inherit lua;
treesitter-parsers =
treesitter-parsers
// {
markdown = treesitter-parsers.markdown // {
location = "tree-sitter-markdown";
};
}
// {
markdown_inline = treesitter-parsers.markdown // {
language = "markdown_inline";
location = "tree-sitter-markdown-inline";
};
};
buildInputs = [
libuv
# This is actually a c library, hence it's not included in neovimLuaEnv,
# see:
# https://github.com/luarocks/luarocks/issues/1402#issuecomment-1080616570
# and it's definition at: pkgs/development/lua-modules/overrides.nix
lua.pkgs.libluv
neovimLuaEnv
tree-sitter
unibilium
utf8proc
]
++ lib.optionals finalAttrs.finalPackage.doCheck [
glibcLocales
procps
];
doCheck = false;
# to be exhaustive, one could run
# make oldtests too
checkPhase = ''
runHook preCheck
make functionaltest
runHook postCheck
'';
nativeBuildInputs = [
cmake
gettext
pkg-config
];
# extra programs test via `make functionaltest`
nativeCheckInputs =
let
pyEnv = python3.withPackages (
ps: with ps; [
pynvim
msgpack
]
);
in
[
fish
nodejs
pyEnv # for src/clint.py
];
# nvim --version output retains compilation flags and references to build tools
postPatch = lib.optionalString (!stdenv.buildPlatform.canExecute stdenv.hostPlatform) ''
sed -i runtime/CMakeLists.txt \
-e "s|\".*/bin/nvim|\${stdenv.hostPlatform.emulator buildPackages} &|g"
sed -i src/nvim/po/CMakeLists.txt \
-e "s|\$<TARGET_FILE:nvim|\${stdenv.hostPlatform.emulator buildPackages} &|g"
'';
# check that the above patching actually works
disallowedRequisites = [ stdenv.cc ] ++ lib.optional (lua != codegenLua) codegenLua;
cmakeFlags = [
# Don't use downloaded dependencies. At the end of the configurePhase one
# can spot that cmake says this option was "not used by the project".
# That's because all dependencies were found and
# third-party/CMakeLists.txt is not read at all.
(lib.cmakeBool "USE_BUNDLED" false)
(lib.cmakeBool "ENABLE_TRANSLATIONS" true)
]
++ (
if lua.pkgs.isLuaJIT then
[
(lib.cmakeFeature "LUAC_PRG" "${lib.getExe' codegenLua "luajit"} -b -s %s -")
(lib.cmakeFeature "LUA_GEN_PRG" (lib.getExe' codegenLua "luajit"))
(lib.cmakeFeature "LUA_PRG" (lib.getExe' neovimLuaEnvOnBuild "luajit"))
]
else
[
(lib.cmakeBool "PREFER_LUA" true)
]
);
preConfigure = ''
mkdir -p $out/lib/nvim/parser
''
+ lib.concatStrings (
lib.mapAttrsToList (language: grammar: ''
ln -s \
${
tree-sitter.buildGrammar {
inherit (grammar) src;
version = "neovim-${finalAttrs.version}";
language = grammar.language or language;
location = grammar.location or null;
}
}/parser \
$out/lib/nvim/parser/${language}.so
'') finalAttrs.treesitter-parsers
);
shellHook = ''
export VIMRUNTIME=$PWD/runtime
'';
separateDebugInfo = true;
nativeInstallCheckInputs = [
versionCheckHook
];
versionCheckProgram = "${placeholder "out"}/bin/nvim";
versionCheckProgramArg = "--version";
doInstallCheck = true;
passthru = {
updateScript = nix-update-script { };
};
meta = {
description = "Vim text editor fork focused on extensibility and agility";
longDescription = ''
Neovim is a project that seeks to aggressively refactor Vim in order to:
- Simplify maintenance and encourage contributions
- Split the work between multiple developers
- Enable the implementation of new/modern user interfaces without any
modifications to the core source
- Improve extensibility with a new plugin architecture
'';
homepage = "https://neovim.io";
changelog = "https://github.com/neovim/neovim/releases/tag/${finalAttrs.src.tag}";
mainProgram = "nvim";
# "Contributions committed before b17d96 by authors who did not sign the
# Contributor License Agreement (CLA) remain under the Vim license.
# Contributions committed after b17d96 are licensed under Apache 2.0 unless
# those contributions were copied from Vim (identified in the commit logs
# by the vim-patch token). See LICENSE for details."
license = with lib.licenses; [
asl20
vim
];
teams = [ lib.teams.neovim ];
platforms = lib.platforms.unix;
};
}
)

View File

@@ -0,0 +1,29 @@
diff --git a/runtime/autoload/remote/host.vim b/runtime/autoload/remote/host.vim
index 6266b312b..965fabf1e 100644
--- a/runtime/autoload/remote/host.vim
+++ b/runtime/autoload/remote/host.vim
@@ -71,7 +71,8 @@ function! remote#host#RegisterPlugin(host, path, specs) abort
for plugin in plugins
if plugin.path == a:path
- throw 'Plugin "'.a:path.'" is already registered'
+ " plugin already registered
+ return
endif
endfor
diff --git a/runtime/plugin/rplugin.vim b/runtime/plugin/rplugin.vim
index 122d8d47f..83fbf8b57 100644
--- a/runtime/plugin/rplugin.vim
+++ b/runtime/plugin/rplugin.vim
@@ -54,6 +54,10 @@ function! s:GetManifest() abort
endfunction
function! s:LoadRemotePlugins() abort
+ if exists('$NVIM_SYSTEM_RPLUGIN_MANIFEST')
+ let g:system_remote_plugins = fnamemodify($NVIM_SYSTEM_RPLUGIN_MANIFEST, ':p')
+ execute 'source' fnameescape(g:system_remote_plugins)
+ endif
let g:loaded_remote_plugins = s:GetManifest()
if filereadable(g:loaded_remote_plugins)
execute 'source' fnameescape(g:loaded_remote_plugins)

View File

@@ -0,0 +1,28 @@
{ fetchurl }:
{
c.src = fetchurl {
url = "https://github.com/tree-sitter/tree-sitter-c/archive/v0.24.1.tar.gz";
hash = "sha256:25dd4bb3dec770769a407e0fc803f424ce02c494a56ce95fedc525316dcf9b48";
};
lua.src = fetchurl {
url = "https://github.com/tree-sitter-grammars/tree-sitter-lua/archive/v0.4.0.tar.gz";
hash = "sha256:b0977aced4a63bb75f26725787e047b8f5f4a092712c840ea7070765d4049559";
};
vim.src = fetchurl {
url = "https://github.com/tree-sitter-grammars/tree-sitter-vim/archive/v0.7.0.tar.gz";
hash = "sha256:44eabc31127c4feacda19f2a05a5788272128ff561ce01093a8b7a53aadcc7b2";
};
vimdoc.src = fetchurl {
url = "https://github.com/neovim/tree-sitter-vimdoc/archive/v4.0.0.tar.gz";
hash = "sha256:8096794c0f090b2d74b7bff94548ac1be3285b929ec74f839bd9b3ff4f4c6a0b";
};
query.src = fetchurl {
url = "https://github.com/tree-sitter-grammars/tree-sitter-query/archive/v0.6.2.tar.gz";
hash = "sha256:90682e128d048fbf2a2a17edca947db71e326fa0b3dba4136e041e096538b4eb";
};
markdown.src = fetchurl {
url = "https://github.com/tree-sitter-grammars/tree-sitter-markdown/archive/v0.5.0.tar.gz";
hash = "sha256:14c2c948ccf0e9b606eec39b09286c59dddf28307849f71b7ce2b1d1ef06937e";
};
}

View File

@@ -0,0 +1,46 @@
#!/usr/bin/env nix-shell
#!nix-shell -i python3 -p python3
import re
import subprocess
from pathlib import Path
parsers = {}
dir = Path(__file__).parent
regex = re.compile(r"^TREESITTER_([A-Z_]+)_(URL|SHA256)\s+(.+)$")
src = subprocess.check_output(
[
"nix-build",
dir.parent.parent.parent.parent,
"-A",
"neovim-unwrapped.src",
"--no-out-link",
],
text=True,
).strip()
for line in open(f"{src}/cmake.deps/deps.txt"):
m = regex.fullmatch(line.strip())
if m is None:
continue
lang = m[1].lower()
ty = m[2]
val = m[3]
if not lang in parsers:
parsers[lang] = {}
parsers[lang][ty] = val
with open(dir / "treesitter-parsers.nix", "w") as f:
f.write("{ fetchurl }:\n\n{\n")
for lang, src in parsers.items():
f.write(
f""" {lang}.src = fetchurl {{
url = "{src["URL"]}";
hash = "sha256:{src["SHA256"]}";
}};
"""
)
f.write("}\n")

View File

@@ -0,0 +1,41 @@
{
python3Packages,
lib,
fetchzip,
}:
python3Packages.buildPythonApplication rec {
pname = "nerd-font-patcher";
version = "3.4.0";
src = fetchzip {
url = "https://github.com/ryanoasis/nerd-fonts/releases/download/v${version}/FontPatcher.zip";
sha256 = "sha256-koZj0Tn1HtvvSbQGTc3RbXQdUU4qJwgClOVq1RXW6aM=";
stripRoot = false;
};
propagatedBuildInputs = with python3Packages; [ fontforge ];
format = "other";
patches = [
./use-nix-paths.patch
];
dontBuild = true;
installPhase = ''
mkdir -p $out/bin $out/share $out/lib
install -Dm755 font-patcher $out/bin/nerd-font-patcher
cp -ra src/glyphs $out/share/
cp -ra bin/scripts/name_parser $out/lib/
'';
meta = with lib; {
description = "Font patcher to generate Nerd font";
mainProgram = "nerd-font-patcher";
homepage = "https://nerdfonts.com/";
license = licenses.mit;
maintainers = with maintainers; [ ck3d ];
};
}

View File

@@ -0,0 +1,22 @@
diff --git a/font-patcher b/font-patcher
index c48039f2c..e776adfbc 100755
--- a/font-patcher
+++ b/font-patcher
@@ -38,7 +38,7 @@ except ImportError:
)
)
-sys.path.insert(0, os.path.join(os.path.abspath(os.path.dirname(sys.argv[0])), 'bin', 'scripts', 'name_parser'))
+sys.path.insert(0, os.path.join(os.path.abspath(os.path.dirname(sys.argv[0])), '..', 'lib', 'name_parser'))
try:
from FontnameParser import FontnameParser
from FontnameTools import FontnameTools
@@ -2075,7 +2075,7 @@ def setup_arguments():
expert_group.add_argument('--configfile', dest='configfile', default=False, type=str, help='Specify a file path for configuration file (see sample: src/config.sample.cfg)')
expert_group.add_argument('--custom', dest='custom', default=False, type=str, help='Specify a custom symbol font, all glyphs will be copied; absolute path suggested')
expert_group.add_argument('--dry', dest='dry_run', default=False, action='store_true', help='Do neither patch nor store the font, to check naming')
- expert_group.add_argument('--glyphdir', dest='glyphdir', default=__dir__ + "/src/glyphs/", type=str, help='Path to glyphs to be used for patching')
+ expert_group.add_argument('--glyphdir', dest='glyphdir', default=__dir__ + "/../share/glyphs/", type=str, help='Path to glyphs to be used for patching')
expert_group.add_argument('--has-no-italic', dest='noitalic', default=False, action='store_true', help='Font family does not have Italic (but Oblique), to help create correct RIBBI set')
expert_group.add_argument('--metrics', dest='metrics', default=None, choices=get_metrics_names(), help='Select vertical metrics source (for problematic cases)')
expert_group.add_argument('--name', dest='force_name', default=None, type=str, help='Specify naming source (\'full\', \'postscript\', \'filename\', or concrete free name-string)')

View File

@@ -0,0 +1,75 @@
{
lib,
buildGoModule,
fetchFromGitHub,
makeWrapper,
installShellFiles,
buildkit,
cni-plugins,
extraPackages ? [ ],
}:
buildGoModule rec {
pname = "nerdctl";
version = "1.7.7";
src = fetchFromGitHub {
owner = "containerd";
repo = "nerdctl";
rev = "v${version}";
hash = "sha256-GHFs8QvLcXu+DZ851TCLI7EVc9wMS5fRC4TYBXzyv3Q=";
};
vendorHash = "sha256-5LRsT04T/CKv+YHaiM2g6giimWWXyzPju3iZuj2DfAY=";
nativeBuildInputs = [
makeWrapper
installShellFiles
];
ldflags =
let
t = "github.com/containerd/nerdctl/pkg/version";
in
[
"-s"
"-w"
"-X ${t}.Version=v${version}"
"-X ${t}.Revision=<unknown>"
];
# Many checks require a containerd socket and running nerdctl after it's built
doCheck = false;
postInstall = ''
wrapProgram $out/bin/nerdctl \
--prefix PATH : "${lib.makeBinPath ([ buildkit ] ++ extraPackages)}" \
--prefix CNI_PATH : "${cni-plugins}/bin"
installShellCompletion --cmd nerdctl \
--bash <($out/bin/nerdctl completion bash) \
--fish <($out/bin/nerdctl completion fish) \
--zsh <($out/bin/nerdctl completion zsh)
'';
doInstallCheck = true;
installCheckPhase = ''
runHook preInstallCheck
$out/bin/nerdctl --help
$out/bin/nerdctl --version | grep "nerdctl version ${version}"
runHook postInstallCheck
'';
meta = {
homepage = "https://github.com/containerd/nerdctl/";
changelog = "https://github.com/containerd/nerdctl/releases/tag/v${version}";
description = "Docker-compatible CLI for containerd";
mainProgram = "nerdctl";
license = lib.licenses.asl20;
maintainers = with lib.maintainers; [
developer-guy
jk
];
platforms = lib.platforms.linux;
};
}

View File

@@ -0,0 +1,39 @@
{
lib,
stdenvNoCC,
fetchFromGitHub,
gitUpdater,
}:
stdenvNoCC.mkDerivation (finalAttrs: {
pname = "nerdfetch";
version = "8.4.2";
src = fetchFromGitHub {
owner = "ThatOneCalculator";
repo = "NerdFetch";
tag = "v${finalAttrs.version}";
hash = "sha256-G1BWggVPxpIKK82pKHD4Jxyis4CY156Jox2/xHRQfrI=";
};
dontUnpack = true;
dontConfigure = true;
dontBuild = true;
installPhase = ''
mkdir -p $out/bin
cp $src/nerdfetch $out/bin
'';
passthru.updateScript = gitUpdater {
rev-prefix = "v";
};
meta = with lib; {
description = "POSIX *nix (Linux, macOS, Android, *BSD, etc) fetch script using Nerdfonts";
homepage = "https://github.com/ThatOneCalculator/NerdFetch";
changelog = "https://github.com/ThatOneCalculator/NerdFetch/releases/tag/${finalAttrs.version}";
maintainers = with maintainers; [ ByteSudoer ];
license = licenses.mit;
mainProgram = "nerdfetch";
platforms = platforms.unix;
};
})

View File

@@ -0,0 +1,31 @@
{
lib,
rustPlatform,
fetchFromGitHub,
}:
rustPlatform.buildRustPackage rec {
pname = "nerdfix";
version = "0.4.2";
src = fetchFromGitHub {
owner = "loichyan";
repo = "nerdfix";
rev = "v${version}";
hash = "sha256-Mp8QFzMQXJEFIzkrmiW/wxMy/+WC4VqbPtWzE92z9Gc=";
};
cargoHash = "sha256-8EchpubKnixlvAyM2iSf4fE5wowJHT6/mDHIvLPnEok=";
meta = with lib; {
description = "Helps you to find/fix obsolete nerd font icons in your project";
mainProgram = "nerdfix";
homepage = "https://github.com/loichyan/nerdfix";
changelog = "https://github.com/loichyan/nerdfix/blob/${src.rev}/CHANGELOG.md";
license = with licenses; [
asl20
mit
];
maintainers = with maintainers; [ figsoda ];
};
}

View File

@@ -0,0 +1,93 @@
{
lib,
stdenv,
fetchFromGitHub,
cmake,
pkg-config,
qt6,
qt6Packages,
icu,
icoextract,
icoutils,
umu-launcher,
winetricks,
curl,
mangohud,
gamescope,
gamemode,
}:
stdenv.mkDerivation (finalAttrs: {
pname = "nero-umu";
version = "1.1.4";
src = fetchFromGitHub {
owner = "SeongGino";
repo = "Nero-umu";
tag = "v${finalAttrs.version}";
hash = "sha256-Cx2hN5LV7/EOXnn9RfIsj9OmnlM1oMZB7a535/hwTas=";
};
#Replace quazip git submodule with pre-packaged quazip
postUnpack = ''
rmdir source/lib/quazip/
ln -s ${qt6Packages.quazip.src} source/lib/quazip
'';
nativeBuildInputs = [
cmake
qt6.wrapQtAppsHook
pkg-config
];
buildInputs = [
qt6.qtbase
qt6.qttools
qt6.qt5compat
qt6Packages.quazip
icu
];
runtimeDeps = [
icoextract
icoutils
winetricks
curl
umu-launcher
mangohud
gamescope
gamemode
];
cmakeFlags = [
(lib.cmakeFeature "NERO_QT_VERSION" "Qt6")
];
installPhase = ''
runHook preInstall
install -Dm755 "nero-umu" "$out/bin/nero-umu"
for size in 32 48 64 128; do
install -Dm644 "$src/img/ico/ico_"$size".png" "$out/share/icons/hicolor/"$size"x"$size"/apps/xyz.TOS.Nero.png"
done
install -Dm644 "$src/xyz.TOS.Nero.desktop" "$out/share/applications/xyz.TOS.Nero.desktop"
runHook postInstall
'';
preFixup = ''
qtWrapperArgs+=(
--prefix PATH : ${lib.makeBinPath finalAttrs.runtimeDeps}
)
'';
meta = {
homepage = "https://github.com/SeongGino/Nero-umu";
description = "Fast and efficient Proton prefix runner and manager using umu as backend";
license = lib.licenses.gpl3Plus;
mainProgram = "nero-umu";
platforms = [ "x86_64-linux" ];
maintainers = with lib.maintainers; [
ern775
blghnks
keenanweaver
];
};
})

View File

@@ -0,0 +1,41 @@
{
buildNpmPackage,
fetchFromGitHub,
lib,
python3,
}:
buildNpmPackage rec {
pname = "nest-cli";
version = "11.0.10";
src = fetchFromGitHub {
owner = "nestjs";
repo = "nest-cli";
tag = version;
hash = "sha256-mNnEbZv6LG5YDYZj7kAiPcg2Se9wJidON+9Tp/TIpd4=";
};
npmDepsHash = "sha256-dEg0WmNNNLMQj+9bHkwf0uz9Vyx+QFSHrQv7fk1DxjQ=";
npmFlags = [ "--legacy-peer-deps" ];
env = {
npm_config_build_from_source = true;
};
nativeBuildInputs = [
python3
];
meta = {
homepage = "https://nestjs.com";
description = "CLI tool for Nest applications";
license = lib.licenses.mit;
changelog = "https://github.com/nestjs/nest-cli/releases/tag/${version}";
mainProgram = "nest";
maintainers = with lib.maintainers; [
ehllie
phanirithvij
];
};
}

View File

@@ -0,0 +1,91 @@
{
lib,
stdenv,
fetchFromGitHub,
testers,
cmake,
gsl,
libtool,
findutils,
llvmPackages,
mpi,
nest,
pkg-config,
boost,
python3,
readline,
withPython ? false,
withMpi ? false,
}:
stdenv.mkDerivation rec {
pname = "nest";
version = "3.9";
src = fetchFromGitHub {
owner = "nest";
repo = "nest-simulator";
rev = "v${version}";
hash = "sha256-4tGLRAsJLOHl9frdo35p/uoTiT2zfstx1e+fv5+ZBCs=";
};
postPatch = ''
patchShebangs cmake/CheckFiles/check_return_val.sh
# fix PyNEST installation path
# it expects CMAKE_INSTALL_LIBDIR to be relative
substituteInPlace cmake/ProcessOptions.cmake \
--replace "\''${CMAKE_INSTALL_LIBDIR}/python" "lib/python"
'';
nativeBuildInputs = [
cmake
pkg-config
findutils
];
buildInputs = [
gsl
readline
libtool # libltdl
boost
]
++ lib.optionals withPython [
python3
python3.pkgs.cython
]
++ lib.optional withMpi mpi
++ lib.optional stdenv.hostPlatform.isDarwin llvmPackages.openmp;
propagatedBuildInputs = with python3.pkgs; [
numpy
];
cmakeFlags = [
"-Dwith-python=${if withPython then "ON" else "OFF"}"
"-Dwith-mpi=${if withMpi then "ON" else "OFF"}"
"-Dwith-openmp=ON"
];
postInstall = ''
# Alternative to autoPatchElf, moves libraries where
# Nest expects them to be
find $out/lib/nest -exec ln -s {} $out/lib \;
'';
passthru.tests.version = testers.testVersion {
package = nest;
command = "nest --version";
};
meta = {
description = "Command line tool for simulating neural networks";
homepage = "https://www.nest-simulator.org/";
changelog = "https://github.com/nest/nest-simulator/releases/tag/v${version}";
license = lib.licenses.gpl2Plus;
maintainers = with lib.maintainers; [
jiegec
davidcromp
];
platforms = lib.platforms.unix;
};
}

View File

@@ -0,0 +1,61 @@
{
lib,
stdenv,
# Need macOS 15+ for nested virtualization.
apple-sdk_15,
buildGoModule,
fetchFromGitLab,
nix-update-script,
versionCheckHook,
}:
buildGoModule (finalAttrs: {
pname = "nesting";
version = "0.4.0";
src = fetchFromGitLab {
owner = "gitlab-org/fleeting";
repo = "nesting";
tag = "v${finalAttrs.version}";
hash = "sha256-W4Pv990X3R4ksHGfwycdTYvUfjwm5sxh0AeoG9EZ/0A=";
};
vendorHash = "sha256-YYHiyNg15VdijyrR5t1PwIjHWXmofHcVD6YMrbwn4Qk=";
buildInputs = lib.optionals stdenv.hostPlatform.isDarwin [ apple-sdk_15 ];
# Needed for "nesting version" to not show "dev".
#
# https://gitlab.com/gitlab-org/fleeting/nesting/-/blob/v0.3.0/Makefile?ref_type=tags#L22-24
ldflags =
let
ldflagsPackageVariablePrefix = "gitlab.com/gitlab-org/fleeting/nesting";
in
[
"-X ${ldflagsPackageVariablePrefix}.NAME=nesting"
"-X ${ldflagsPackageVariablePrefix}.VERSION=${finalAttrs.version}"
"-X ${ldflagsPackageVariablePrefix}.REFERENCE=v${finalAttrs.version}"
];
doInstallCheck = true;
nativeInstallCheckInputs = [ versionCheckHook ];
versionCheckProgramArg = "version";
passthru = {
updateScript = nix-update-script { };
};
meta = {
description = "Basic and opinionated daemon that sits in front of virtualization platforms";
homepage = "https://gitlab.com/gitlab-org/fleeting/nesting";
license = lib.licenses.mit;
mainProgram = "nesting";
maintainers = with lib.maintainers; [ commiterate ];
badPlatforms = [
# Only supports AArch64 for Darwin.
"x86_64-darwin"
];
};
})

View File

@@ -0,0 +1,81 @@
{
lib,
SDL2,
alsa-lib,
autoconf-archive,
autoreconfHook,
fetchFromGitHub,
fltk,
libGL,
libGLU,
libao,
libarchive,
libepoxy,
makeWrapper,
pkg-config,
libsamplerate,
stdenv,
unzip,
wrapGAppsHook3,
xdg-utils,
}:
stdenv.mkDerivation (finalAttrs: {
pname = "nestopia";
version = "1.53.2";
src = fetchFromGitHub {
owner = "0ldsk00l";
repo = "nestopia";
rev = finalAttrs.version;
hash = "sha256-sKemwbmEr637KL951wsmDxLFDvWh+0K+exdDd0+Iq1c=";
};
buildInputs = [
SDL2
alsa-lib
fltk
libepoxy
libGLU
libGL
libarchive
libao
xdg-utils
libsamplerate
];
nativeBuildInputs = [
SDL2
autoconf-archive
autoreconfHook
fltk
pkg-config
makeWrapper
wrapGAppsHook3
unzip
];
strictDeps = true;
preInstall = ''
mkdir -p $out/{bin,share/nestopia}
'';
preFixup = ''
for f in $out/bin/*; do
wrapProgram $f \
--prefix XDG_DATA_DIRS : "$GSETTINGS_SCHEMAS_PATH:$out/share"
done
'';
meta = {
homepage = "http://0ldsk00l.ca/nestopia/";
description = "Cross-platform Nestopia emulator core with a GUI";
changelog = "https://raw.githubusercontent.com/0ldsk00l/nestopia/${finalAttrs.src.rev}/ChangeLog";
license = lib.licenses.gpl2Plus;
mainProgram = "nestopia";
maintainers = [ ];
platforms = lib.platforms.linux;
};
})

View File

@@ -0,0 +1,110 @@
{
stdenv,
lib,
fetchFromGitLab,
gitUpdater,
makeFontsConf,
testers,
# https://gitlab.com/ubports/development/core/lib-cpp/net-cpp/-/issues/5
boost186,
cmake,
curl,
doxygen,
graphviz,
gtest,
jsoncpp,
lomiri,
pkg-config,
process-cpp,
properties-cpp,
python3,
validatePkgConfig,
writableTmpDirAsHomeHook,
}:
let
pythonEnv = python3.withPackages (
ps: with ps; [
httpbin
]
);
in
stdenv.mkDerivation (finalAttrs: {
pname = "net-cpp";
version = "3.2.0";
src = fetchFromGitLab {
owner = "ubports";
repo = "development/core/lib-cpp/net-cpp";
rev = finalAttrs.version;
hash = "sha256-JfVSAwBWtHw7a0CtY5C1xuxThO3FbS4MgNuIO1CGuts=";
};
outputs = [
"out"
"dev"
"doc"
];
postPatch = lib.optionalString finalAttrs.finalPackage.doCheck ''
# Use wrapped python. Removing just the /usr/bin doesn't seem to work?
substituteInPlace tests/httpbin.h.in \
--replace '/usr/bin/python3' '${lib.getExe pythonEnv}'
'';
strictDeps = true;
nativeBuildInputs = [
cmake
doxygen
graphviz
validatePkgConfig
writableTmpDirAsHomeHook # makes doc generation quieter
];
buildInputs = [
boost186
curl
];
nativeCheckInputs = [
pkg-config
pythonEnv
];
checkInputs = [
lomiri.cmake-extras
gtest
jsoncpp
process-cpp
properties-cpp
];
cmakeFlags = [
(lib.cmakeBool "ENABLE_WERROR" true)
];
env.FONTCONFIG_FILE = makeFontsConf { fontDirectories = [ ]; };
doCheck = stdenv.buildPlatform.canExecute stdenv.hostPlatform;
# Tests start HTTP server in separate process with fixed URL, parallelism breaks things
enableParallelChecking = false;
passthru = {
tests.pkg-config = testers.testMetaPkgConfig finalAttrs.finalPackage;
updateScript = gitUpdater { };
};
meta = {
description = "Simple yet beautiful networking API for C++11";
homepage = "https://gitlab.com/ubports/development/core/lib-cpp/net-cpp";
changelog = "https://gitlab.com/ubports/development/core/lib-cpp/net-cpp/-/blob/${finalAttrs.version}/ChangeLog";
license = lib.licenses.lgpl3Only;
teams = [ lib.teams.lomiri ];
platforms = lib.platforms.linux;
pkgConfigModules = [
"net-cpp"
];
};
})

View File

@@ -0,0 +1,58 @@
{
lib,
stdenvNoCC,
fetchurl,
unzip,
nix-update-script,
makeBinaryWrapper,
}:
stdenvNoCC.mkDerivation rec {
pname = "net-news-wire";
version = "6.1.9";
src = fetchurl {
url = "https://github.com/Ranchero-Software/NetNewsWire/releases/download/mac-${version}/NetNewsWire${version}.zip";
hash = "sha256-wG1/EpsK1CMXDTM/WlNFBBUVq6IUSj0GEkqY5Azf/ls=";
};
sourceRoot = ".";
nativeBuildInputs = [
unzip
makeBinaryWrapper
];
installPhase = ''
runHook preInstall
mkdir -p $out/Applications
cp -R NetNewsWire.app $out/Applications/
mkdir -p $out/bin
makeWrapper $out/Applications/NetNewsWire.app/Contents/MacOS/NetNewsWire $out/bin/net-news-wire
runHook postInstall
'';
passthru.updateScript = nix-update-script {
extraArgs = [
"--version-regex"
"^mac-(\\d+\\.\\d+\\.\\d+)$"
];
};
meta = {
description = "RSS reader for macOS and iOS";
longDescription = ''
It's like podcasts but for reading.
NetNewsWire shows you articles from your favorite blogs and news sites and keeps track of what you've read.
'';
homepage = "https://github.com/Ranchero-Software/NetNewsWire";
changelog = "https://github.com/Ranchero-Software/NetNewsWire/releases/tag/mac-${version}";
license = lib.licenses.mit;
platforms = lib.platforms.darwin;
maintainers = with lib.maintainers; [
jakuzure
DimitarNestorov
];
sourceProvenance = [ lib.sourceTypes.binaryNativeCode ];
};
}

View File

@@ -0,0 +1,109 @@
{
lib,
stdenv,
fetchurl,
fetchpatch,
file,
openssl,
perl,
net-tools,
autoreconfHook,
withPerlTools ? false,
}:
let
perlWithPkgs = perl.withPackages (
ps: with ps; [
JSON
TermReadKey
Tk
]
);
in
stdenv.mkDerivation rec {
pname = "net-snmp";
version = "5.9.4";
src = fetchurl {
url = "mirror://sourceforge/net-snmp/${pname}-${version}.tar.gz";
sha256 = "sha256-i03gE5HnTjxwFL60OWGi1tb6A6zDQoC5WF9JMHRbBUQ=";
};
patches =
let
fetchAlpinePatch =
name: sha256:
fetchurl {
url = "https://git.alpinelinux.org/aports/plain/main/net-snmp/${name}?id=ebb21045c31f4d5993238bcdb654f21d8faf8123";
inherit name sha256;
};
in
[
(fetchAlpinePatch "fix-includes.patch" "0zpkbb6k366qpq4dax5wknwprhwnhighcp402mlm7950d39zfa3m")
(fetchAlpinePatch "netsnmp-swinst-crash.patch" "0gh164wy6zfiwiszh58fsvr25k0ns14r3099664qykgpmickkqid")
(fetchpatch {
name = "configure-musl.patch";
url = "https://github.com/net-snmp/net-snmp/commit/a62169f1fa358be8f330ea8519ade0610fac525b.patch";
hash = "sha256-+vWH095fFL3wE6XLsTaPXgMDya0LRWdlL6urD5AIBUs=";
})
];
outputs = [
"bin"
"out"
"dev"
"lib"
];
configureFlags = [
"--with-default-snmp-version=3"
"--with-sys-location=Unknown"
"--with-sys-contact=root@unknown"
"--with-logfile=/var/log/net-snmpd.log"
"--with-persistent-directory=/var/lib/net-snmp"
"--with-openssl=${openssl.dev}"
"--disable-embedded-perl"
"--without-perl-modules"
]
++ lib.optional stdenv.hostPlatform.isLinux "--with-mnttab=/proc/mounts";
postPatch = ''
substituteInPlace testing/fulltests/support/simple_TESTCONF.sh --replace "/bin/netstat" "${net-tools}/bin/netstat"
'';
postConfigure = ''
# libraries contain configure options. Mangle store paths out from
# ./configure-generated file.
sed -i include/net-snmp/net-snmp-config.h \
-e "/NETSNMP_CONFIGURE_OPTIONS/ s|$NIX_STORE/[a-z0-9]\{32\}-|$NIX_STORE/eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee-|g"
'';
nativeBuildInputs = [
net-tools
file
autoreconfHook
];
buildInputs = [ openssl ] ++ lib.optional withPerlTools perlWithPkgs;
enableParallelBuilding = true;
# Missing dependencies during relinking:
# ./.libs/libnetsnmpagent.so: file not recognized: file format not recognized
enableParallelInstalling = false;
doCheck = false; # tries to use networking
postInstall = ''
for f in "$lib/lib/"*.la $bin/bin/net-snmp-config $bin/bin/net-snmp-create-v3-user; do
sed 's|-L${openssl.dev}|-L${lib.getLib openssl}|g' -i $f
done
mkdir $dev/bin
mv $bin/bin/net-snmp-config $dev/bin
'';
meta = with lib; {
description = "Clients and server for the SNMP network monitoring protocol";
homepage = "https://www.net-snmp.org/";
license = licenses.bsd3;
platforms = platforms.unix;
};
}

View File

@@ -0,0 +1,42 @@
{
lib,
buildGoModule,
fetchFromGitHub,
}:
buildGoModule rec {
pname = "netassert";
version = "2.0.4";
src = fetchFromGitHub {
owner = "controlplaneio";
repo = "netassert";
rev = "v${version}";
hash = "sha256-72LwWzn9sQNbtPj8X0WsR0j0Cs0s00ogcYfQqULTffw=";
};
vendorHash = "sha256-JuyE1pYlTIeG3IGOsvYgQN1lTAb7NWytkp/Ibh91QgA=";
ldflags = [
"-s"
"-w"
"-X main.version=${src.rev}"
];
postBuild = ''
mv $GOPATH/bin/{cli,netassert}
'';
meta = with lib; {
homepage = "https://github.com/controlplaneio/netassert";
changelog = "https://github.com/controlplaneio/netassert/blob/${src.rev}/CHANGELOG.md";
description = "Command line utility to test network connectivity between kubernetes objects";
longDescription = ''
NetAssert is a command line utility to test network connectivity between kubernetes objects.
It currently supports Deployment, Pod, Statefulset and Daemonset.
You can check the traffic flow between these objects or from these objects to a remote host or an IP address.
'';
license = licenses.asl20;
maintainers = with maintainers; [ jk ];
mainProgram = "netassert";
};
}

View File

@@ -0,0 +1,87 @@
{
lib,
stdenv,
fetchurl,
acl,
autoreconfHook,
avahi,
db,
libevent,
libgcrypt,
libiconv,
openssl,
pam,
perl,
pkg-config,
meson,
ninja,
file,
cracklib,
cups,
libtirpc,
openldap,
glib,
dbus,
iniparser,
pandoc,
}:
stdenv.mkDerivation (finalAttrs: {
pname = "netatalk";
version = "4.2.4";
src = fetchurl {
url = "mirror://sourceforge/netatalk/netatalk/netatalk-${finalAttrs.version}.tar.xz";
hash = "sha256-Twe74RipUd10DT9RqHtcr7oklr0LIucEQ49CGqZnD5k=";
};
nativeBuildInputs = [
pkg-config
meson
ninja
file
];
buildInputs = [
acl
avahi
db
libevent
libgcrypt
libiconv
openssl
pam
cracklib
cups
libtirpc
openldap
glib
perl
dbus
iniparser
pandoc
];
mesonFlags = [
"-Dwith-appletalk=true"
"-Dwith-statedir-path=/var/lib"
"-Dwith-bdb-path=${db.out}"
"-Dwith-bdb-include-path=${db.dev}/include"
"-Dwith-install-hooks=false"
"-Dwith-init-hooks=false"
"-Dwith-lockfile-path=/run/lock/"
"-Dwith-cracklib=true"
"-Dwith-cracklib-path=${cracklib.out}"
"-Dwith-statedir-creation=false"
];
enableParallelBuilding = true;
meta = {
description = "Apple Filing Protocol Server";
homepage = "https://netatalk.io/";
license = lib.licenses.gpl2Plus;
platforms = lib.platforms.linux;
maintainers = with lib.maintainers; [ jcumming ];
};
})

View File

@@ -0,0 +1,47 @@
{
lib,
rustPlatform,
fetchFromGitHub,
installShellFiles,
mandown,
protobuf,
nixosTests,
go-md2man,
}:
rustPlatform.buildRustPackage rec {
pname = "netavark";
version = "1.16.1";
src = fetchFromGitHub {
owner = "containers";
repo = "netavark";
rev = "v${version}";
hash = "sha256-8Yai0c5AHHx+xTEVH23C5dy4VXRERLeg0iIAbD/Glis=";
};
cargoHash = "sha256-U8rNA5sAR9+q7cWQBt18iJfnylcCq/tVLXAdxWpAhjw=";
nativeBuildInputs = [
installShellFiles
mandown
protobuf
go-md2man
];
postBuild = ''
make -C docs netavark.1
installManPage docs/netavark.1
'';
passthru.tests = { inherit (nixosTests) podman; };
meta = with lib; {
changelog = "https://github.com/containers/netavark/releases/tag/${src.rev}";
description = "Rust based network stack for containers";
homepage = "https://github.com/containers/netavark";
license = licenses.asl20;
teams = [ teams.podman ];
platforms = platforms.linux;
};
}

View File

@@ -0,0 +1,101 @@
{
lib,
stdenv,
fetchurl,
makeWrapper,
makeDesktopItem,
which,
unzip,
libicns,
imagemagick,
jdk21,
perl,
}:
let
version = "24";
desktopItem = makeDesktopItem {
name = "netbeans";
exec = "netbeans";
comment = "Integrated Development Environment";
desktopName = "Apache NetBeans IDE";
genericName = "Integrated Development Environment";
categories = [ "Development" ];
icon = "netbeans";
};
in
stdenv.mkDerivation {
pname = "netbeans";
inherit version;
src = fetchurl {
url = "mirror://apache/netbeans/netbeans/${version}/netbeans-${version}-bin.zip";
hash = "sha256-mzmviZuyS68SZhOAzwWOdZLveOTS5UOgY1oW+oAv9Gs=";
};
buildCommand = ''
# Unpack and perform some path patching.
unzip $src
patchShebangs .
rm netbeans/bin/*.exe
# Copy to installation directory and create a wrapper capable of starting
# it.
mkdir -pv $out/bin
cp -a netbeans $out
makeWrapper $out/netbeans/bin/netbeans $out/bin/netbeans \
--prefix PATH : ${
lib.makeBinPath [
jdk21
which
]
} \
--prefix JAVA_HOME : ${jdk21.home} \
--add-flags "--jdkhome ${jdk21.home} \
-J-Dawt.useSystemAAFontSettings=gasp -J-Dswing.aatext=true"
# Extract pngs from the Apple icon image and create
# the missing ones from the 1024x1024 image.
icns2png --extract $out/netbeans/nb/netbeans.icns
for size in 16 24 32 48 64 128 256 512 1024; do
mkdir -pv $out/share/icons/hicolor/"$size"x"$size"/apps
if [ -e netbeans_"$size"x"$size"x32.png ]
then
mv netbeans_"$size"x"$size"x32.png $out/share/icons/hicolor/"$size"x"$size"/apps/netbeans.png
else
convert -resize "$size"x"$size" netbeans_1024x1024x32.png $out/share/icons/hicolor/"$size"x"$size"/apps/netbeans.png
fi
done;
# Create desktop item, so we can pick it from the KDE/GNOME menu
mkdir -pv $out/share/applications
ln -s ${desktopItem}/share/applications/* $out/share/applications
'';
nativeBuildInputs = [
makeWrapper
unzip
];
buildInputs = [
perl
libicns
imagemagick
];
meta = {
description = "Integrated development environment for Java, C, C++ and PHP";
homepage = "https://netbeans.apache.org/";
license = lib.licenses.asl20;
sourceProvenance = with lib.sourceTypes; [
binaryBytecode
binaryNativeCode
];
maintainers = with lib.maintainers; [
sander
rszibele
kashw2
];
platforms = lib.platforms.unix;
mainProgram = "netbeans";
};
}

View File

@@ -0,0 +1,37 @@
{
lib,
buildNpmPackage,
fetchFromGitHub,
}:
buildNpmPackage rec {
pname = "netbird-dashboard";
version = "2.19.2";
src = fetchFromGitHub {
owner = "netbirdio";
repo = "dashboard";
rev = "v${version}";
hash = "sha256-3rHNk/rc0j5mWF2jbrMOtFrDkosph1YWnFoh1lLHTPs=";
};
npmDepsHash = "sha256-pC4Vvkb+NAGyhd090LAeGZTLVGufnC9LylJGQt8aEZg=";
npmFlags = [ "--legacy-peer-deps" ];
installPhase = ''
cp -R out $out
'';
env = {
CYPRESS_INSTALL_BINARY = 0;
};
meta = with lib; {
description = "NetBird Management Service Web UI Panel";
homepage = "https://github.com/netbirdio/dashboard";
license = licenses.bsd3;
maintainers = with maintainers; [
patrickdag
];
};
}

View File

@@ -0,0 +1,5 @@
{ netbird }:
netbird.override {
componentName = "management";
}

View File

@@ -0,0 +1,5 @@
{ netbird }:
netbird.override {
componentName = "relay";
}

View File

@@ -0,0 +1,5 @@
{ netbird }:
netbird.override {
componentName = "signal";
}

View File

@@ -0,0 +1,5 @@
{ netbird }:
netbird.override {
componentName = "ui";
}

View File

@@ -0,0 +1,5 @@
{ netbird }:
netbird.override {
componentName = "upload";
}

View File

@@ -0,0 +1,172 @@
{
stdenv,
lib,
nixosTests,
nix-update-script,
buildGoModule,
fetchFromGitHub,
installShellFiles,
pkg-config,
gtk3,
libayatana-appindicator,
libX11,
libXcursor,
libXxf86vm,
versionCheckHook,
netbird-management,
netbird-relay,
netbird-signal,
netbird-ui,
netbird-upload,
componentName ? "client",
needsUpdateScript ? componentName == "client",
}:
let
/*
License tagging is based off:
- https://github.com/netbirdio/netbird/blob/9e95841252c62b50ae93805c8dfd2b749ac95ea7/LICENSES/REUSE.toml
- https://github.com/netbirdio/netbird/blob/9e95841252c62b50ae93805c8dfd2b749ac95ea7/LICENSE#L1-L2
*/
availableComponents = {
client = {
module = "client";
binaryName = "netbird";
license = lib.licenses.bsd3;
versionCheckProgramArg = "version";
hasCompletion = true;
};
ui = {
module = "client/ui";
binaryName = "netbird-ui";
license = lib.licenses.bsd3;
};
upload = {
module = "upload-server";
binaryName = "netbird-upload";
license = lib.licenses.bsd3;
};
management = {
module = "management";
binaryName = "netbird-mgmt";
license = lib.licenses.agpl3Only;
versionCheckProgramArg = "--version";
hasCompletion = true;
};
signal = {
module = "signal";
binaryName = "netbird-signal";
license = lib.licenses.agpl3Only;
hasCompletion = true;
};
relay = {
module = "relay";
binaryName = "netbird-relay";
license = lib.licenses.agpl3Only;
};
};
component = availableComponents.${componentName};
in
buildGoModule (finalAttrs: {
pname = "netbird-${componentName}";
version = "0.59.2";
src = fetchFromGitHub {
owner = "netbirdio";
repo = "netbird";
tag = "v${finalAttrs.version}";
hash = "sha256-EXBRgTY2zlIMDSMdzLeSezIuIBcctDzkqe1v4+8qNAk=";
};
vendorHash = "sha256-hg9vzosB6yVS0e0McekIuchWaByYS02kbbtilKjCo7s=";
nativeBuildInputs = [ installShellFiles ] ++ lib.optional (componentName == "ui") pkg-config;
buildInputs = lib.optionals (stdenv.hostPlatform.isLinux && componentName == "ui") [
gtk3
libayatana-appindicator
libX11
libXcursor
libXxf86vm
];
subPackages = [ component.module ];
ldflags = [
"-s"
"-w"
"-X github.com/netbirdio/netbird/version.version=${finalAttrs.version}"
"-X main.builtBy=nix"
];
# needs network access
doCheck = false;
postPatch = ''
# make it compatible with systemd's RuntimeDirectory
substituteInPlace client/cmd/root.go \
--replace-fail 'unix:///var/run/netbird.sock' 'unix:///var/run/netbird/sock'
substituteInPlace client/ui/client_ui.go \
--replace-fail 'unix:///var/run/netbird.sock' 'unix:///var/run/netbird/sock'
'';
postInstall =
let
builtBinaryName = lib.last (lib.splitString "/" component.module);
in
''
mv $out/bin/${builtBinaryName} $out/bin/${component.binaryName}
''
+
lib.optionalString
(stdenv.buildPlatform.canExecute stdenv.hostPlatform && (component.hasCompletion or false))
''
installShellCompletion --cmd ${component.binaryName} \
--bash <($out/bin/${component.binaryName} completion bash) \
--fish <($out/bin/${component.binaryName} completion fish) \
--zsh <($out/bin/${component.binaryName} completion zsh)
''
# assemble & adjust netbird.desktop files for the GUI
+ lib.optionalString (stdenv.hostPlatform.isLinux && componentName == "ui") ''
install -Dm644 "$src/client/ui/assets/netbird-systemtray-connected.png" "$out/share/pixmaps/netbird.png"
install -Dm644 "$src/client/ui/build/netbird.desktop" "$out/share/applications/netbird.desktop"
substituteInPlace $out/share/applications/netbird.desktop \
--replace-fail "Exec=/usr/bin/netbird-ui" "Exec=$out/bin/${component.binaryName}"
'';
nativeInstallCheckInputs = lib.lists.optionals (component ? versionCheckProgramArg) [
versionCheckHook
];
versionCheckProgram = "${placeholder "out"}/bin/${component.binaryName}";
versionCheckProgramArg = component.versionCheckProgramArg or "version";
passthru = {
tests = lib.attrsets.optionalAttrs (componentName == "client") {
nixos = nixosTests.netbird;
inherit
# make sure child packages are built by `ofborg`
netbird-management
netbird-relay
netbird-signal
netbird-ui
netbird-upload
;
};
}
// lib.attrsets.optionalAttrs needsUpdateScript {
updateScript = nix-update-script { };
};
meta = {
homepage = "https://netbird.io";
changelog = "https://github.com/netbirdio/netbird/releases/tag/v${finalAttrs.version}";
description = "Connect your devices into a single secure private WireGuard®-based mesh network with SSO/MFA and simple access controls";
license = component.license;
maintainers = with lib.maintainers; [
nazarewk
saturn745
loc
];
mainProgram = component.binaryName;
};
})

View File

@@ -0,0 +1,49 @@
{
lib,
stdenv,
fetchurl,
bison,
lzo,
db4,
versionCheckHook,
}:
stdenv.mkDerivation (finalAttrs: {
pname = "netboot";
version = "0.10.2";
src = fetchurl {
url = "mirror://sourceforge/netboot/netboot-${finalAttrs.version}.tar.gz";
hash = "sha256-4HFIsMOW+owsVCOZt5pq2q+oRoS5fAmR/R2sx/dKgCc=";
};
buildInputs = [
bison
lzo
db4
];
hardeningDisable = [ "format" ];
# mgllex.l:398:53: error: passing argument 1 of 'copy_string' from incompatible pointer type []
env.NIX_CFLAGS_COMPILE = "-Wno-error=incompatible-pointer-types";
# Disable parallel build, errors:
# link: `parseopt.lo' is not a valid libtool object
enableParallelBuilding = false;
nativeInstallCheckInputs = [ versionCheckHook ];
versionCheckProgram = "${placeholder "out"}/bin/nbdbtool";
versionCheckProgramArg = "--version";
doInstallCheck = true;
meta = {
description = "Mini PXE server";
maintainers = with lib.maintainers; [ raskin ];
platforms = [
"x86_64-linux"
"aarch64-linux"
];
license = lib.licenses.gpl2Only;
};
})

View File

@@ -0,0 +1,31 @@
{
lib,
stdenv,
fetchurl,
nix-update-script,
}:
stdenv.mkDerivation (finalAttrs: {
pname = "netboot.xyz-efi";
version = "2.0.88";
src = fetchurl {
url = "https://github.com/netbootxyz/netboot.xyz/releases/download/${finalAttrs.version}/netboot.xyz.efi";
hash = "sha256-ipbZJ0mPCuwzb/TDtXXUBTuWOcSsKGAJ1GEGIgB2G7E=";
};
dontUnpack = true;
postInstall = ''
cp $src $out
'';
passthru.updateScript = nix-update-script { };
meta = {
homepage = "https://netboot.xyz/";
description = "Tool to boot OS installers and utilities over the network, to be run from a bootloader";
license = lib.licenses.asl20;
maintainers = with lib.maintainers; [ pinpox ];
};
})

View File

@@ -0,0 +1,37 @@
{
lib,
rustPlatform,
fetchFromGitHub,
pkg-config,
openssl,
}:
rustPlatform.buildRustPackage rec {
pname = "netbox2netshot";
version = "0.2.0";
src = fetchFromGitHub {
owner = "scaleway";
repo = "netbox2netshot";
rev = version;
hash = "sha256-4Leg7MaLSos2RjmxB6yVzxGju6OzNrChXdw5htppuZU=";
};
cargoHash = "sha256-XjHOlpYSOwSXxbGp/xZVVcBGhprg4hh61L5dhVE5ODM=";
nativeBuildInputs = [
pkg-config
];
buildInputs = [
openssl
];
meta = with lib; {
description = "Inventory synchronization tool between Netbox and Netshot";
homepage = "https://github.com/scaleway/netbox2netshot";
license = licenses.asl20;
maintainers = [ ];
mainProgram = "netbox2netshot";
};
}

View File

@@ -0,0 +1,13 @@
diff --git a/netbox/netbox/settings.py b/netbox/netbox/settings.py
index 2de06dd10..00406af48 100644
--- a/netbox/netbox/settings.py
+++ b/netbox/netbox/settings.py
@@ -410,7 +412,7 @@ USE_X_FORWARDED_HOST = True
X_FRAME_OPTIONS = 'SAMEORIGIN'
# Static files (CSS, JavaScript, Images)
-STATIC_ROOT = BASE_DIR + '/static'
+STATIC_ROOT = getattr(configuration, 'STATIC_ROOT', os.path.join(BASE_DIR, 'static')).rstrip('/')
STATIC_URL = f'/{BASE_PATH}static/'
STATICFILES_DIRS = (
os.path.join(BASE_DIR, 'project-static', 'dist'),

View File

@@ -0,0 +1,138 @@
{
lib,
fetchFromGitHub,
fetchpatch,
python3,
plugins ? _ps: [ ],
nixosTests,
}:
let
py = python3.override {
packageOverrides = _final: prev: { django = prev.django_5; };
};
extraBuildInputs = plugins py.pkgs;
in
py.pkgs.buildPythonApplication rec {
pname = "netbox";
version = "4.1.11";
format = "other";
src = fetchFromGitHub {
owner = "netbox-community";
repo = "netbox";
tag = "v${version}";
hash = "sha256-Nd8HWXn7v0llmg934KGtS5+Tj2RvBhJDuXEvB2Pg3nQ=";
};
patches = [
./custom-static-root.patch
# Rebase of PR 17620 "Upgrade to Django 5.1"
# https://github.com/netbox-community/netbox/pull/17620
(fetchpatch {
url = "https://github.com/netbox-community/netbox/commit/cda9e0525dc850ddd82bf46762a64607bf97df83.patch";
hash = "sha256-iJiz5f926Np1k4c9DpfPe0HefJy1CH6c0wjwBIt1vWQ=";
})
];
propagatedBuildInputs =
(
with py.pkgs;
[
django
django-cors-headers
django-debug-toolbar
django-filter
django-graphiql-debug-toolbar
django-htmx
django-mptt
django-pglocks
django-prometheus
django-redis
django-rq
django-tables2
django-taggit
django-timezone-field
djangorestframework
drf-spectacular
drf-spectacular-sidecar
feedparser
jinja2
markdown
netaddr
nh3
pillow
psycopg
psycopg.optional-dependencies.c
psycopg.optional-dependencies.pool
pyyaml
requests
social-auth-core
social-auth-app-django
strawberry-graphql
strawberry-django
svgwrite
tablib
# Optional dependencies, kept here for backward compatibility
# for the S3 data source backend
boto3
# for Git data source backend
dulwich
# for error reporting
sentry-sdk
]
++ social-auth-core.passthru.optional-dependencies.openidconnect
)
++ extraBuildInputs;
buildInputs = with py.pkgs; [
mkdocs-material
mkdocs-material-extensions
mkdocstrings
mkdocstrings-python
];
nativeBuildInputs = [ py.pkgs.mkdocs ];
postBuild = ''
PYTHONPATH=$PYTHONPATH:netbox/
python -m mkdocs build
'';
installPhase = ''
mkdir -p $out/opt/netbox
cp -r . $out/opt/netbox
chmod +x $out/opt/netbox/netbox/manage.py
makeWrapper $out/opt/netbox/netbox/manage.py $out/bin/netbox \
--prefix PYTHONPATH : "$PYTHONPATH"
'';
passthru = {
python = python3;
# PYTHONPATH of all dependencies used by the package
pythonPath = py.pkgs.makePythonPath propagatedBuildInputs;
inherit (py.pkgs) gunicorn;
tests = {
netbox = nixosTests.netbox_4_1;
inherit (nixosTests) netbox-upgrade;
};
};
meta = {
homepage = "https://github.com/netbox-community/netbox";
description = "IP address management (IPAM) and data center infrastructure management (DCIM) tool";
mainProgram = "netbox";
license = lib.licenses.asl20;
knownVulnerabilities = [
"Netbox version ${version} is EOL; please upgrade by following the current release notes instructions."
];
maintainers = with lib.maintainers; [
minijackson
raitobezarius
];
};
}

View File

@@ -0,0 +1,13 @@
diff --git a/netbox/netbox/settings.py b/netbox/netbox/settings.py
index 2de06dd10..00406af48 100644
--- a/netbox/netbox/settings.py
+++ b/netbox/netbox/settings.py
@@ -410,7 +412,7 @@ USE_X_FORWARDED_HOST = True
X_FRAME_OPTIONS = 'SAMEORIGIN'
# Static files (CSS, JavaScript, Images)
-STATIC_ROOT = BASE_DIR + '/static'
+STATIC_ROOT = getattr(configuration, 'STATIC_ROOT', os.path.join(BASE_DIR, 'static')).rstrip('/')
STATIC_URL = f'/{BASE_PATH}static/'
STATICFILES_DIRS = (
os.path.join(BASE_DIR, 'project-static', 'dist'),

View File

@@ -0,0 +1,132 @@
{
lib,
fetchFromGitHub,
python3,
plugins ? _ps: [ ],
nixosTests,
nix-update-script,
}:
let
py = python3.override {
packageOverrides = _final: prev: { django = prev.django_5; };
};
extraBuildInputs = plugins py.pkgs;
in
py.pkgs.buildPythonApplication rec {
pname = "netbox";
version = "4.2.9";
format = "other";
src = fetchFromGitHub {
owner = "netbox-community";
repo = "netbox";
tag = "v${version}";
hash = "sha256-uVe4YTZoxRMBfvItFa9SMHu4AaVvygfAg9GDB115TFc=";
};
patches = [
./custom-static-root.patch
];
propagatedBuildInputs =
(
with py.pkgs;
[
django
django-cors-headers
django-debug-toolbar
django-filter
django-graphiql-debug-toolbar
django-htmx
django-mptt
django-pglocks
django-prometheus
django-redis
django-rq
django-tables2
django-taggit
django-timezone-field
djangorestframework
drf-spectacular
drf-spectacular-sidecar
feedparser
jinja2
markdown
netaddr
nh3
pillow
psycopg
psycopg.optional-dependencies.c
psycopg.optional-dependencies.pool
pyyaml
requests
social-auth-core
social-auth-app-django
strawberry-graphql
strawberry-django
svgwrite
tablib
# Optional dependencies, kept here for backward compatibility
# for the S3 data source backend
boto3
# for Git data source backend
dulwich
# for error reporting
sentry-sdk
]
++ social-auth-core.passthru.optional-dependencies.openidconnect
)
++ extraBuildInputs;
buildInputs = with py.pkgs; [
mkdocs-material
mkdocs-material-extensions
mkdocstrings
mkdocstrings-python
];
nativeBuildInputs = [ py.pkgs.mkdocs ];
postBuild = ''
PYTHONPATH=$PYTHONPATH:netbox/
python -m mkdocs build
'';
installPhase = ''
mkdir -p $out/opt/netbox
cp -r . $out/opt/netbox
chmod +x $out/opt/netbox/netbox/manage.py
makeWrapper $out/opt/netbox/netbox/manage.py $out/bin/netbox \
--prefix PYTHONPATH : "$PYTHONPATH"
'';
passthru = {
python = python3;
# PYTHONPATH of all dependencies used by the package
pythonPath = py.pkgs.makePythonPath propagatedBuildInputs;
inherit (py.pkgs) gunicorn;
tests = {
netbox = nixosTests.netbox_4_2;
inherit (nixosTests) netbox-upgrade;
};
updateScript = nix-update-script { };
};
meta = {
homepage = "https://github.com/netbox-community/netbox";
description = "IP address management (IPAM) and data center infrastructure management (DCIM) tool";
mainProgram = "netbox";
license = lib.licenses.asl20;
knownVulnerabilities = [
"Netbox Version ${version} is EOL; please upgrade by following the current release notes instructions"
];
maintainers = with lib.maintainers; [
minijackson
raitobezarius
];
};
}

View File

@@ -0,0 +1,13 @@
diff --git a/netbox/netbox/settings.py b/netbox/netbox/settings.py
index 2de06dd10..00406af48 100644
--- a/netbox/netbox/settings.py
+++ b/netbox/netbox/settings.py
@@ -410,7 +412,7 @@ USE_X_FORWARDED_HOST = True
X_FRAME_OPTIONS = 'SAMEORIGIN'
# Static files (CSS, JavaScript, Images)
-STATIC_ROOT = BASE_DIR + '/static'
+STATIC_ROOT = getattr(configuration, 'STATIC_ROOT', os.path.join(BASE_DIR, 'static')).rstrip('/')
STATIC_URL = f'/{BASE_PATH}static/'
STATICFILES_DIRS = (
os.path.join(BASE_DIR, 'project-static', 'dist'),

Some files were not shown because too many files have changed in this diff Show More