aboutsummaryrefslogtreecommitdiffstats
path: root/pkgs
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--pkgs/default.nix5
-rw-r--r--pkgs/sdrconnect/default.nix (renamed from sdrconnect.nix)17
2 files changed, 15 insertions, 7 deletions
diff --git a/pkgs/default.nix b/pkgs/default.nix
new file mode 100644
index 0000000..d1a6549
--- /dev/null
+++ b/pkgs/default.nix
@@ -0,0 +1,5 @@
+# You can build these directly using 'nix build .#example'
+
+{ pkgs ? import <nixpkgs> { } }: rec {
+ sdrconnect = pkgs.callPackage ./sdrconnect { };
+}
diff --git a/sdrconnect.nix b/pkgs/sdrconnect/default.nix
index 22b41d8..d262268 100644
--- a/sdrconnect.nix
+++ b/pkgs/sdrconnect/default.nix
@@ -1,9 +1,12 @@
-{ pkgs }:
-pkgs.stdenv.mkDerivation rec {
+{ fetchurl, lib, stdenv }:
+let
pname = "sdrconnect";
+in
+stdenv.mkDerivation {
+ inherit pname;
version = "0.0.0";
- src = builtins.fetchurl {
+ src = fetchurl {
url = "https://www.sdrplay.com/software/SDRconnect_linux-x64_0fd82d9dc.run";
sha256 = "7200f58efc1bd78250f6057cc08b5564ea9e8f33f8ef655805bbff97f56d38c2";
};
@@ -11,7 +14,7 @@ pkgs.stdenv.mkDerivation rec {
sourceRoot = ".";
unpackCmd = "bash $src --quiet --noexec --target .";
- buildInputs = with pkgs; [
+ buildInputs = [
alsa-lib
fontconfig.lib
icu
@@ -27,8 +30,8 @@ pkgs.stdenv.mkDerivation rec {
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 --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
@@ -40,7 +43,7 @@ pkgs.stdenv.mkDerivation rec {
dontFixup = true;
- meta = with pkgs.lib; {
+ meta = with lib; {
description = "sdrconnect";
homepage = "https://www.sdrplay.com/sdrconnect/";
sourceProvenance = with sourceTypes; [ binaryNativeCode ];