diff options
author | Mark Nipper <nipsy@bitgnome.net> | 2024-03-31 02:40:11 -0700 |
---|---|---|
committer | Mark Nipper <nipsy@bitgnome.net> | 2024-03-31 02:40:11 -0700 |
commit | 76b3b07e7329be637b37f92e767595143d3b03fa (patch) | |
tree | ff674a9bc8d8e1cdba94cb0d1c13de28b75c1e74 /pkgs/sdrconnect/default.nix | |
parent | 04fd53819ffce3e1275ec48bcdf71769414fdea1 (diff) | |
download | nix-76b3b07e7329be637b37f92e767595143d3b03fa.tar nix-76b3b07e7329be637b37f92e767595143d3b03fa.tar.gz nix-76b3b07e7329be637b37f92e767595143d3b03fa.tar.bz2 nix-76b3b07e7329be637b37f92e767595143d3b03fa.tar.lz nix-76b3b07e7329be637b37f92e767595143d3b03fa.tar.xz nix-76b3b07e7329be637b37f92e767595143d3b03fa.tar.zst nix-76b3b07e7329be637b37f92e767595143d3b03fa.zip |
Migrate to more modular layout
Diffstat (limited to 'pkgs/sdrconnect/default.nix')
-rw-r--r-- | pkgs/sdrconnect/default.nix | 53 |
1 files changed, 53 insertions, 0 deletions
diff --git a/pkgs/sdrconnect/default.nix b/pkgs/sdrconnect/default.nix new file mode 100644 index 0000000..d262268 --- /dev/null +++ b/pkgs/sdrconnect/default.nix @@ -0,0 +1,53 @@ +{ fetchurl, lib, stdenv }: +let + pname = "sdrconnect"; +in +stdenv.mkDerivation { + inherit pname; + version = "0.0.0"; + + src = fetchurl { + url = "https://www.sdrplay.com/software/SDRconnect_linux-x64_0fd82d9dc.run"; + sha256 = "7200f58efc1bd78250f6057cc08b5564ea9e8f33f8ef655805bbff97f56d38c2"; + }; + + sourceRoot = "."; + unpackCmd = "bash $src --quiet --noexec --target ."; + + buildInputs = [ + alsa-lib + fontconfig.lib + icu + libusb1 + remarkable2-toolchain + stdenv.cc.cc.lib + util-linux.lib + xorg.libICE + xorg.libSM + xorg.libX11 + ]; + + installPhase = '' + runHook preInstall + mkdir -p $out/{bin,lib} $out/share/{doc,icons} + patchelf --set-interpreter ${stdenv.cc.libc}/lib/ld-linux-x86-64.so.2 SDRconnect + patchelf --set-rpath \$ORIGIN/../lib:${alsa-lib}/lib:${fontconfig.lib}/lib:${icu}/lib:${libusb1}/lib:${remarkable2-toolchain}/lib:${stdenv.cc.cc.lib}/lib:${util-linux.lib}/lib:${xorg.libICE}/lib:${xorg.libSM}/lib:${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 lib; { + description = "sdrconnect"; + homepage = "https://www.sdrplay.com/sdrconnect/"; + sourceProvenance = with sourceTypes; [ binaryNativeCode ]; + license = licenses.unfree; + platforms = [ "x86_64-linux" ]; + }; +} |