diff options
author | skovati <skovati@protonmail.com> | 2023-11-14 05:22:01 +0000 |
---|---|---|
committer | skovati <skovati@protonmail.com> | 2023-11-15 04:44:50 +0000 |
commit | 98aadc594cdb2cd2fedbc65c4a15df0626d3f2c4 (patch) | |
tree | 8553ae7eb204944652df01abd09cb9f43dc8166d /pkgs/by-name | |
parent | ac9d70a3731d20e9da0fbaba03af9f85dec1fd22 (diff) | |
download | nixpkgs-98aadc594cdb2cd2fedbc65c4a15df0626d3f2c4.tar nixpkgs-98aadc594cdb2cd2fedbc65c4a15df0626d3f2c4.tar.gz nixpkgs-98aadc594cdb2cd2fedbc65c4a15df0626d3f2c4.tar.bz2 nixpkgs-98aadc594cdb2cd2fedbc65c4a15df0626d3f2c4.tar.lz nixpkgs-98aadc594cdb2cd2fedbc65c4a15df0626d3f2c4.tar.xz nixpkgs-98aadc594cdb2cd2fedbc65c4a15df0626d3f2c4.tar.zst nixpkgs-98aadc594cdb2cd2fedbc65c4a15df0626d3f2c4.zip |
osmo-rtl-sdr: init at 2.0.1
Diffstat (limited to 'pkgs/by-name')
-rw-r--r-- | pkgs/by-name/rt/rtl-sdr-osmocom/package.nix | 53 |
1 files changed, 53 insertions, 0 deletions
diff --git a/pkgs/by-name/rt/rtl-sdr-osmocom/package.nix b/pkgs/by-name/rt/rtl-sdr-osmocom/package.nix new file mode 100644 index 00000000000..9f88ebd503a --- /dev/null +++ b/pkgs/by-name/rt/rtl-sdr-osmocom/package.nix @@ -0,0 +1,53 @@ +{ lib +, stdenv +, fetchFromGitea +, cmake +, pkg-config +, libusb1 +}: + +stdenv.mkDerivation rec { + pname = "rtl-sdr-osmocom"; + version = "2.0.1"; + + src = fetchFromGitea { + domain = "gitea.osmocom.org"; + owner = "sdr"; + repo = "rtl-sdr"; + rev = "v${version}"; + hash = "sha256-+RYSCn+wAkb9e7NRI5kLY8a6OXtJu7QcSUht1R6wDX0="; + }; + + postPatch = '' + substituteInPlace CMakeLists.txt \ + --replace '/etc/udev/rules.d' "$out/etc/udev/rules.d" \ + --replace "VERSION_INFO_PATCH_VERSION git" "VERSION_INFO_PATCH_VERSION ${lib.versions.patch version}" + + substituteInPlace rtl-sdr.rules \ + --replace 'MODE:="0666"' 'ENV{ID_SOFTWARE_RADIO}="1", MODE="0660", GROUP="plugdev"' + ''; + + nativeBuildInputs = [ pkg-config cmake ]; + + propagatedBuildInputs = [ libusb1 ]; + + cmakeFlags = lib.optionals stdenv.isLinux [ + "-DINSTALL_UDEV_RULES=ON" + "-DWITH_RPC=ON" + ]; + + meta = with lib; { + description = "Software to turn the RTL2832U into a SDR receiver"; + longDescription = '' + This packages the rtl-sdr library by the Osmocom project. This is the upstream codebase of the unsuffixed "rtl-sdr" package, which is a downstream fork. A list of differences can be found here: + https://github.com/librtlsdr/librtlsdr/blob/master/README_improvements.md + + The Osmocom upstream has a regular release schedule, so this package will likely support newer SDR dongles. It should be compatible with most software that currently depends on the "rtl-sdr" nixpkg, but comptabiliy should be manually confirmed. + ''; + homepage = "https://gitea.osmocom.org/sdr/rtl-sdr"; + license = licenses.gpl2Plus; + maintainers = with maintainers; [ skovati ]; + platforms = platforms.unix; + mainProgram = "rtl_sdr"; + }; +} |