diff options
author | Mark Nipper <nipsy@bitgnome.net> | 2024-03-02 03:31:02 -0800 |
---|---|---|
committer | Mark Nipper <nipsy@bitgnome.net> | 2024-03-02 03:31:02 -0800 |
commit | fdec064211fd12e9e1e379d7908caee3274ed6c3 (patch) | |
tree | 85b2033ada5aff4838aeed1cac3d0704c9ccc23a | |
parent | 5cfd4425361c33642cc836be990097e9049b9fd3 (diff) | |
download | nix-fdec064211fd12e9e1e379d7908caee3274ed6c3.tar nix-fdec064211fd12e9e1e379d7908caee3274ed6c3.tar.gz nix-fdec064211fd12e9e1e379d7908caee3274ed6c3.tar.bz2 nix-fdec064211fd12e9e1e379d7908caee3274ed6c3.tar.lz nix-fdec064211fd12e9e1e379d7908caee3274ed6c3.tar.xz nix-fdec064211fd12e9e1e379d7908caee3274ed6c3.tar.zst nix-fdec064211fd12e9e1e379d7908caee3274ed6c3.zip |
Add manually patched SDRconnect package
Diffstat (limited to '')
-rw-r--r-- | sdrconnect.nix | 46 |
1 files changed, 46 insertions, 0 deletions
diff --git a/sdrconnect.nix b/sdrconnect.nix new file mode 100644 index 0000000..a54a69f --- /dev/null +++ b/sdrconnect.nix @@ -0,0 +1,46 @@ +{ pkgs }: +pkgs.stdenv.mkDerivation rec { + pname = "sdrconnect"; + version = "0.0.0"; + src = builtins.fetchurl { + url = "https://www.sdrplay.com/software/SDRconnect_linux-x64_0fd82d9dc.run"; + sha256 = "7200f58efc1bd78250f6057cc08b5564ea9e8f33f8ef655805bbff97f56d38c2"; + }; + sourceRoot = "."; + unpackCmd = "bash $src --quiet --noexec --target ."; + + buildInputs = with pkgs; [ + alsa-lib + fontconfig.lib + icu + libusb1 + remarkable2-toolchain + stdenv.cc.cc.lib + util-linux.lib + ]; + + installPhase = '' + runHook preInstall + mkdir -p $out/{bin,lib} $out/share/{doc,icons} + patchelf --set-interpreter ${pkgs.stdenv.cc.libc}/lib/ld-linux-x86-64.so.2 SDRconnect + patchelf --set-rpath \$ORIGIN/../lib:${pkgs.alsa-lib}/lib:${pkgs.fontconfig.lib}/lib:${pkgs.icu}/lib:${pkgs.libusb1}/lib:${pkgs.remarkable2-toolchain}/lib:${pkgs.stdenv.cc.cc.lib}/lib:${pkgs.util-linux.lib}/lib:${pkgs.xorg.libICE}/lib:${pkgs.xorg.libSM}/lib:${pkgs.xorg.libX11}/lib SDRconnect + patchelf --add-needed libasound.so.2 --add-needed libfontconfig.so.1 --add-needed libSkiaSharp.so --add-needed swig_bindings.so --add-needed libusb-1.0.so.0 --add-needed libuuid.so.1 SDRconnect + mv SDRconnect $out/bin + mv libHarfBuzzSharp.so libSkiaSharp.so swig_bindings.so $out/lib + mv sdrconnect.ico $out/share/icons + mv sdrplay_license.txt $out/share/doc + rm install.sh + runHook postInstall + ''; + + dontFixup = true; + + meta = with pkgs.lib; { + description = "sdrconnect"; + homepage = "https://www.sdrplay.com/sdrconnect/"; + sourceProvenance = with sourceTypes; [ binaryNativeCode ]; + license = licenses.unfree; + platforms = [ "x86_64-linux" ]; + mainProgram = "$out/bin/SDRconnect"; + }; +} |