Compare commits
4 commits
7b9ef8fde4
...
33d829736d
Author | SHA1 | Date | |
---|---|---|---|
33d829736d | |||
59d3c1b77f | |||
f2912871de | |||
9af99b6de4 |
12 changed files with 197 additions and 9 deletions
|
@ -101,6 +101,7 @@
|
|||
(import ./packages) {
|
||||
inherit flake-utils nixpkgs;
|
||||
deprekages = self.outputs.packages;
|
||||
esp-dev = esp-dev.outputs.packages;
|
||||
}
|
||||
|
||||
#
|
||||
|
@ -335,7 +336,6 @@
|
|||
modules = linuxOfflineGuiModules [
|
||||
./nixos/hosts/komashi
|
||||
|
||||
./nixos/configs/vmware.nix
|
||||
./nixos/configs/cellular.nix
|
||||
./nixos/configs/nfc-kernel.nix
|
||||
./nixos/configs/power-saving.nix
|
||||
|
|
|
@ -10,7 +10,7 @@
|
|||
packages = [
|
||||
deprekages.ykush-udev-rules
|
||||
deprekages.hantek-udev-rules
|
||||
deprekages.dreamsource-udev-rules
|
||||
deprekages.dsview
|
||||
deprekages.humanfx
|
||||
pkgs.numworks-udev-rules
|
||||
pkgs.android-udev-rules
|
||||
|
|
|
@ -87,6 +87,7 @@ with pkgs;
|
|||
hexyl
|
||||
htop
|
||||
imagemagick
|
||||
inetutils
|
||||
jq
|
||||
jre
|
||||
jmtpfs
|
||||
|
@ -118,6 +119,7 @@ with pkgs;
|
|||
unzip
|
||||
unar
|
||||
unrar
|
||||
deprekages.vja
|
||||
wget
|
||||
zstd
|
||||
zip
|
||||
|
@ -152,7 +154,7 @@ with pkgs;
|
|||
))
|
||||
|
||||
# Reversing.
|
||||
#binwalk
|
||||
binwalk
|
||||
|
||||
# Development.
|
||||
colmena
|
||||
|
|
|
@ -9,5 +9,19 @@
|
|||
appId = "org.kde.kitinerary-workbench";
|
||||
origin = "kitinerary";
|
||||
}
|
||||
{
|
||||
appId = "com.github.vikdevelop.photopea_app";
|
||||
origin = "flathub";
|
||||
}
|
||||
];
|
||||
|
||||
services.flatpak.overrides = {
|
||||
|
||||
# Try to use Wayland whenever possible.
|
||||
global = {
|
||||
Context.sockets = [ "wayland" ];
|
||||
Environment.ELECTRON_ELECTRON_OZONE_PLATFORM_HINT = "wayland";
|
||||
};
|
||||
|
||||
};
|
||||
}
|
||||
|
|
|
@ -71,6 +71,9 @@ with pkgs;
|
|||
bytecode-viewer
|
||||
# Poking our phone.
|
||||
|
||||
# Hardware hacking
|
||||
deprekages.dsview
|
||||
|
||||
# Backup
|
||||
kitty
|
||||
|
||||
|
|
|
@ -30,6 +30,7 @@ with pkgs;
|
|||
python3
|
||||
cfr
|
||||
procyon
|
||||
esp-dev.esp-idf-full
|
||||
|
||||
# Build systems.
|
||||
cmake
|
||||
|
@ -81,7 +82,6 @@ with pkgs;
|
|||
if pkgs.stdenv.isDarwin then
|
||||
[
|
||||
|
||||
esp-dev.esp-idf-full
|
||||
|
||||
]
|
||||
else
|
||||
|
|
|
@ -4,6 +4,7 @@
|
|||
# vim: et:ts=2:sw=2:
|
||||
#
|
||||
{
|
||||
lib,
|
||||
stdenv,
|
||||
autoPatchelfHook,
|
||||
makeWrapper,
|
||||
|
@ -17,7 +18,9 @@
|
|||
xkeyboard_config,
|
||||
libxkbcommon,
|
||||
wayland,
|
||||
qt6,
|
||||
python3,
|
||||
svd2py,
|
||||
qt6
|
||||
}:
|
||||
let
|
||||
desktopFile = writeText "binary-ninja.desktop" ''
|
||||
|
@ -29,6 +32,17 @@ let
|
|||
Categories=Development;
|
||||
'';
|
||||
|
||||
# Additional packages to put in Binja's python envrioment.
|
||||
additional-python-packages = pypkgs: with pypkgs; [
|
||||
click
|
||||
colorama
|
||||
pyyaml
|
||||
svd2py
|
||||
];
|
||||
|
||||
# Python specialized for our environment.
|
||||
binja-python = python3.withPackages additional-python-packages;
|
||||
|
||||
binary-ninja = stdenv.mkDerivation {
|
||||
pname = "binary-ninja";
|
||||
version = "4.0.5902";
|
||||
|
@ -53,9 +67,12 @@ let
|
|||
xorg.xcbutilrenderutil
|
||||
qt6.qtdeclarative
|
||||
wayland
|
||||
binja-python
|
||||
dbus
|
||||
];
|
||||
|
||||
propogatedBuildInputs = (additional-python-packages python3.pkgs);
|
||||
|
||||
# Use our local zip directly.
|
||||
dontBuild = true;
|
||||
src = if stdenv.isAarch64 then
|
||||
|
@ -70,8 +87,8 @@ let
|
|||
chmod +x $out/opt/binaryninja
|
||||
|
||||
# Icons.
|
||||
mkdir -p $out/share/icons
|
||||
cp -r docs/img/logo.png $out/share/icons/binary-ninja.png
|
||||
mkdir -p $out/share/icons
|
||||
cp -r docs/img/logo.png $out/share/icons/binary-ninja.png
|
||||
|
||||
# Application file.
|
||||
mkdir -p $out/share/applications
|
||||
|
@ -80,7 +97,9 @@ let
|
|||
mkdir -p $out/bin
|
||||
makeWrapper $out/opt/binaryninja \
|
||||
$out/bin/binaryninja \
|
||||
--prefix "QT_XKB_CONFIG_ROOT" ":" "${xkeyboard_config}/share/X11/xkb"
|
||||
--set "PYTHONHOME" "${binja-python}" \
|
||||
--prefix "QT_XKB_CONFIG_ROOT" ":" "${xkeyboard_config}/share/X11/xkb" \
|
||||
--prefix "LD_LIBRARY_PATH" ":" "${lib.makeLibraryPath binary-ninja.buildInputs}"
|
||||
ln -s $out/bin/binaryninja $out/bin/binary-ninja
|
||||
'';
|
||||
};
|
||||
|
|
|
@ -5,6 +5,7 @@
|
|||
flake-utils,
|
||||
deprekages,
|
||||
nixpkgs,
|
||||
esp-dev
|
||||
}:
|
||||
|
||||
flake-utils.lib.eachDefaultSystem (
|
||||
|
@ -30,6 +31,7 @@ flake-utils.lib.eachDefaultSystem (
|
|||
ffts = callPackage ./scopehal-apps/ffts.nix { };
|
||||
libsigrok4DSL = callPackage ./scopehal-apps/libsigrok4DSL.nix { };
|
||||
vulkan-sdk = callPackage ./scopehal-apps/vulkan-sdk.nix { };
|
||||
dsview = pkgs.libsForQt5.callPackage ./dsview { };
|
||||
scopehal-apps = callPackage ./scopehal-apps { deprekages = deprekages.${system}; };
|
||||
scopehal-sigrok-bridge = callPackage ./scopehal-apps/sigrok-bridge.nix {
|
||||
deprekages = deprekages.${system};
|
||||
|
@ -38,7 +40,7 @@ flake-utils.lib.eachDefaultSystem (
|
|||
# apps
|
||||
navit = callPackage ./navit.nix { };
|
||||
navit-with-maps = callPackage ./navit.nix { with_maps = true; };
|
||||
binary-ninja = callPackage ./binary-ninja.nix { };
|
||||
binary-ninja = callPackage ./binary-ninja.nix { inherit svd2py; };
|
||||
argos = callPackage ./argos.nix { };
|
||||
todoist-electron = callPackage ./todoist-electron.nix { };
|
||||
home-assistant-desktop = callPackage ./home-assistant-desktop/x86_64-linux.nix { };
|
||||
|
@ -67,6 +69,7 @@ flake-utils.lib.eachDefaultSystem (
|
|||
okc-agents = callPackage ./okc-agents.nix { };
|
||||
_7zz = pkgs._7zz.override { useUasm = true; };
|
||||
mergiraf = callPackage ./mergiraf.nix { };
|
||||
vja = callPackage ./vja.nix { };
|
||||
|
||||
# libraries
|
||||
libnfc-nci = callPackage ./libnfc-nci { };
|
||||
|
@ -80,6 +83,9 @@ flake-utils.lib.eachDefaultSystem (
|
|||
jdk = jetbrains-jdk;
|
||||
};
|
||||
|
||||
# pytho modules
|
||||
svd2py = callPackage ./svd2py.nix { };
|
||||
|
||||
# kernel modules
|
||||
linuxPackages_i915-sriov = callPackage ./i915-sriov/kernel.nix { };
|
||||
i915-sriov = callPackage ./i915-sriov { linuxPackages = linuxPackages_i915-sriov; };
|
||||
|
@ -108,6 +114,9 @@ flake-utils.lib.eachDefaultSystem (
|
|||
# plasma
|
||||
kde-karousel = callPackage ./kde-karousel.nix { };
|
||||
|
||||
# esp32
|
||||
esp-env = esp-dev.${system}.esp-idf-full;
|
||||
|
||||
# xonsh and xontribs
|
||||
xonsh-with-xontribs = pkgs.xonsh.override {
|
||||
extraPackages = pythonPackages: [
|
||||
|
|
62
packages/dsview/default.nix
Normal file
62
packages/dsview/default.nix
Normal file
|
@ -0,0 +1,62 @@
|
|||
{
|
||||
stdenv,
|
||||
lib,
|
||||
fetchFromGitHub,
|
||||
pkg-config,
|
||||
cmake,
|
||||
wrapQtAppsHook,
|
||||
libzip,
|
||||
boost,
|
||||
fftw,
|
||||
libusb1,
|
||||
qtbase,
|
||||
qtsvg,
|
||||
qtwayland,
|
||||
python3,
|
||||
desktopToDarwinBundle,
|
||||
}:
|
||||
|
||||
stdenv.mkDerivation (finalAttrs: {
|
||||
pname = "dsview";
|
||||
|
||||
version = "2024-11-05";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "DreamSourceLab";
|
||||
repo = "DSView";
|
||||
rev = "2e9e2c8e726df4ef5687d39b83d4f797cc44b574";
|
||||
sha256 = "sha256-F7T3wEasIzfhQXVaU8MVo06h3RB1nhWxkp2sUb8Ct80=";
|
||||
};
|
||||
|
||||
patches = [
|
||||
# Fix absolute install paths
|
||||
./install.patch
|
||||
];
|
||||
|
||||
# /build/source/libsigrok4DSL/strutil.c:343:19: error: implicit declaration of function 'strcasecmp'; did you mean 'g_strcasecmp'? []
|
||||
env.NIX_CFLAGS_COMPILE = "-Wno-error=implicit-function-declaration -Wno-error=format-security";
|
||||
|
||||
nativeBuildInputs = [
|
||||
cmake
|
||||
pkg-config
|
||||
wrapQtAppsHook
|
||||
] ++ lib.optional stdenv.hostPlatform.isDarwin desktopToDarwinBundle;
|
||||
|
||||
buildInputs = [
|
||||
boost
|
||||
fftw
|
||||
qtbase
|
||||
qtsvg
|
||||
libusb1
|
||||
libzip
|
||||
python3
|
||||
] ++ lib.optional stdenv.hostPlatform.isLinux qtwayland;
|
||||
|
||||
meta = {
|
||||
description = "GUI program for supporting various instruments from DreamSourceLab, including logic analyzer, oscilloscope, etc";
|
||||
mainProgram = "DSView";
|
||||
homepage = "https://www.dreamsourcelab.com/";
|
||||
license = lib.licenses.gpl3Plus;
|
||||
platforms = lib.platforms.unix;
|
||||
};
|
||||
})
|
27
packages/dsview/install.patch
Normal file
27
packages/dsview/install.patch
Normal file
|
@ -0,0 +1,27 @@
|
|||
diff --git a/CMakeLists.txt b/CMakeLists.txt
|
||||
index cc82669f..d196c78f 100644
|
||||
--- a/CMakeLists.txt
|
||||
+++ b/CMakeLists.txt
|
||||
@@ -669,19 +669,10 @@ install(FILES DSView/icons/logo.svg DESTINATION share/icons/hicolor/scalable/app
|
||||
install(FILES DSView/icons/logo.svg DESTINATION share/pixmaps RENAME dsview.svg)
|
||||
|
||||
if(CMAKE_SYSTEM_NAME MATCHES "Linux")
|
||||
- install(FILES DSView/DSView.desktop DESTINATION /usr/share/applications RENAME dsview.desktop)
|
||||
-
|
||||
add_compile_definitions(_DEFAULT_SOURCE)
|
||||
-
|
||||
- if(IS_DIRECTORY /usr/lib/udev/rules.d)
|
||||
- install(FILES DSView/DreamSourceLab.rules DESTINATION /usr/lib/udev/rules.d RENAME 60-dreamsourcelab.rules)
|
||||
- elseif(IS_DIRECTORY /lib/udev/rules.d)
|
||||
- install(FILES DSView/DreamSourceLab.rules DESTINATION /lib/udev/rules.d RENAME 60-dreamsourcelab.rules)
|
||||
- elseif(IS_DIRECTORY /etc/udev/rules.d)
|
||||
- install(FILES DSView/DreamSourceLab.rules DESTINATION /etc/udev/rules.d RENAME 60-dreamsourcelab.rules)
|
||||
- endif()
|
||||
-
|
||||
-endif()
|
||||
+ install(FILES DSView/DreamSourceLab.rules DESTINATION lib/udev/rules.d RENAME 60-dreamsourcelab.rules)
|
||||
+ endif()
|
||||
+install(FILES DSView/DSView.desktop DESTINATION share/applications RENAME dsview.desktop)
|
||||
|
||||
install(FILES NEWS25 DESTINATION share/DSView RENAME NEWS25)
|
||||
install(FILES NEWS31 DESTINATION share/DSView RENAME NEWS31)
|
25
packages/svd2py.nix
Normal file
25
packages/svd2py.nix
Normal file
|
@ -0,0 +1,25 @@
|
|||
{
|
||||
python3Packages,
|
||||
fetchPypi,
|
||||
xonsh
|
||||
}:
|
||||
python3Packages.buildPythonPackage rec {
|
||||
pname = "svd2py";
|
||||
version = "1.0.2";
|
||||
format = "pyproject";
|
||||
|
||||
src = fetchPypi {
|
||||
inherit pname version;
|
||||
hash = "sha256-V90CD13Fb9kPqZ3mZn3+zzCAgaMR2kX/pBg+dOMMhK0=";
|
||||
};
|
||||
|
||||
nativeBuildInputs = with python3Packages; [
|
||||
setuptools
|
||||
poetry-core
|
||||
];
|
||||
|
||||
buildInputs = with python3Packages; [
|
||||
click
|
||||
pyyaml
|
||||
];
|
||||
}
|
27
packages/vja.nix
Normal file
27
packages/vja.nix
Normal file
|
@ -0,0 +1,27 @@
|
|||
#
|
||||
# oxfs faster sshfs (asynchronous ops)
|
||||
#
|
||||
# vim: et:ts=2:sw=2:
|
||||
#
|
||||
{
|
||||
fetchPypi,
|
||||
lib,
|
||||
python3Packages,
|
||||
}:
|
||||
python3Packages.buildPythonApplication rec {
|
||||
pname = "vja";
|
||||
version = "4.7.1";
|
||||
|
||||
src = fetchPypi {
|
||||
inherit pname version;
|
||||
hash = "sha256-cVMJ5huUjtyUB+ywXgki9baoSAo860St11ZpKm5RmFU=";
|
||||
};
|
||||
|
||||
dependencies = with python3Packages; [
|
||||
click
|
||||
click-aliases
|
||||
requests
|
||||
parsedatetime
|
||||
python-dateutil
|
||||
];
|
||||
}
|
Loading…
Add table
Reference in a new issue