-
Notifications
You must be signed in to change notification settings - Fork 162
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
NixOS Support #685
Comments
I will admin I'm no expert with NixOS, and this definitely sound like something isn't being passed right for OpenGL to work. This could be trying to run it with the wrong glfw backend (eg, wayland vs xorg) or such. You should not need to link mbedtls directly, instead NNG should be built as a shared library (which it is not by default), and itself link to mbedtls if enabled. This is most likely why you are having to link against mbedtls directly. I need to do the same on Android as there everything's static (but this won't be supported on standard Linux builds). |
@2ck It seems to be working fine for me on nixpkgs commit Here's my solution: { config, pkgs, ... }:
let
satdump_version = "1.2.0";
in
{
environment.systemPackages =
let
satdump = with pkgs;
stdenv.mkDerivation rec {
pname = "satdump";
version = satdump_version;
src = fetchgit {
url = "https://github.com/SatDump/SatDump.git";
rev = satdump_version;
sha256 = "sha256-QGegi5/geL5U3/ecc3hsdW+gp25UE9fOYVLFJUo/N50=";
};
nativeBuildInputs = [ cmake pkg-config ];
buildInputs = [
# required deps
fftwFloat
libpng
libtiff
jemalloc
volk
(nng.overrideAttrs (old: {
cmakeFlags = old.cmakeFlags ++ [ "-DBUILD_SHARED_LIBS=ON" ];
}))
rtl-sdr-librtlsdr
hackrf
airspy
airspyhf
glfw
gnome.zenity
zstd
# optional hw support
libad9361
libiio
];
cmakeFlags = [
"-DCMAKE_BUILD_TYPE=Release"
];
};
in
[ satdump ];
} |
how would i use this? |
@NikoKamtsioras What do you mean how would you use this? Could you please elaborate, do you use NixOS and want to install SatDump? |
yes, i want to install it. |
@NikoKamtsioras well you can take the code i have provided, put it into a .nix file, set the You can see an example of this in my NixOS configuration although in my case it's all a little more complicated If you don't use the Nix package manager or NixOS the above does not apply, in that case please refer to the SatDump installation instructions** |
Thanks for the work you're putting into this @theverygaming for NixOS. We'll keep an eye on NixOS/nixpkgs#369540. |
Hello! I've been trying to build SatDump on two Linux machines, and ran into lots of trouble in the process.
I'm using the following tiny Nix flake to have a reproducible build environment:
As you can see, I just adapted the dependencies from the README.
Interestingly enough,
mbedtls
is listed as a dependency only for MacOS, which brings me to the first issue.Part 1 - Building fails
I generate the Makefiles with
cmake -DCMAKE_BUILD_TYPE=Release ..
Building then fails, among other things, with linker issues:
This is resolved by adding
pkgs.mbedtls
to the build dependencies, and changingsrc-core/CMakeLists.txt
to linkmbedtls
in the appropriate locationThe next error is
The file
src-core-imgui/imgui_demo.cpp
already contains a bandaid fix which I can just copy.Now finally, the build completes successfully.
I have tested this on the master branch at
b1087fc240c96542c9911b5347fb1860a66829af
, the nightly at57cb01f253d0bb70327d9a2c26b68ad5e2f66d80
and the 1.1.4 tag.Part 2 - Running
satdump-ui
failsI'm not sure if this should be a separate issue.
Once I've built SatDump with the modifications from above (this time just on
master
), running./satdump-ui
fails with GLFW errors:This seems strange, as
glxinfo | grep -i "glxfb"
returns896 GLXFBConfigs:
.My laptop has an AMD Ryzen 7 PRO 5850U,
glxinfo
also reportsOpenGL version string: 4.6 (Compatibility Profile) Mesa 24.0.3
Running with
LIBGL_ALWAYS_SOFTWARE=1
does not change anything.The text was updated successfully, but these errors were encountered: