Skip to content

Commit 36a32b3

Browse files
committed
update the code to the new r09-receiver name
1 parent 954b651 commit 36a32b3

File tree

7 files changed

+41
-41
lines changed

7 files changed

+41
-41
lines changed

.github/workflows/radio-conf-aarch64.yml renamed to .github/workflows/r09-receiver-aarch64.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: "radio-conf-aarch64"
1+
name: "r09-receiver-aarch64"
22

33
on: [push, pull_request]
44

@@ -17,4 +17,4 @@ jobs:
1717
with:
1818
name: dump-dvb
1919
authToken: '${{ secrets.CACHIX_AUTH_TOKEN }}'
20-
- run: nix build --option system aarch64-linux --option sandbox false --extra-platforms aarch64-linux -vL .\#packages.aarch64-linux.gnuradio-decoder
20+
- run: nix build --option system aarch64-linux --option sandbox false --extra-platforms aarch64-linux -vL .\#packages.aarch64-linux.r09-receiver

.github/workflows/radio-conf-x86_64.yml renamed to .github/workflows/r09-receiver-x86_64.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11

2-
name: "radio-conf-x86_64"
2+
name: "r09-receiver-x86_64"
33

44
on: [push, pull_request]
55

@@ -13,4 +13,4 @@ jobs:
1313
with:
1414
name: dump-dvb
1515
authToken: '${{ secrets.CACHIX_AUTH_TOKEN }}'
16-
- run: nix build -vL .\#packages.x86_64-linux.gnuradio-decoder
16+
- run: nix build -vL .\#packages.x86_64-linux.r09-receiver

CMakeLists.txt

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
cmake_minimum_required(VERSION 3.22)
22

3-
add_executable(gnuradio-decoder-cpp
3+
add_executable(r09-receiver
44
src/main.cpp
55
src/correlate_access_code_bb_ts_fl_impl.cpp
66
src/rational_resampler_impl.cc)
77

8-
target_compile_options(gnuradio-decoder-cpp PUBLIC -std=c++17 -Wall)
8+
target_compile_options(r09-receiver PUBLIC -std=c++17 -Wall)
99

1010
include_directories(src)
1111

@@ -18,6 +18,6 @@ include(${OSMOSDR_DIR}/lib/cmake/osmosdr/gnuradio-osmosdrConfig.cmake)
1818

1919
include_directories(${GNURADIO_ALL_INCLUDE_DIRS})
2020

21-
target_link_libraries(gnuradio-decoder-cpp log4cpp gnuradio-digital gnuradio-analog gnuradio-filter gnuradio-blocks gnuradio-fft gnuradio-runtime gnuradio-pmt volk gnuradio-osmosdr libenvpp::libenvpp)
21+
target_link_libraries(r09-receiver log4cpp gnuradio-digital gnuradio-analog gnuradio-filter gnuradio-blocks gnuradio-fft gnuradio-runtime gnuradio-pmt volk gnuradio-osmosdr libenvpp::libenvpp)
2222

23-
install(TARGETS gnuradio-decoder-cpp DESTINATION bin)
23+
install(TARGETS r09-receiver DESTINATION bin)

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,5 +20,5 @@ DECODER\_DEVICE\_STRING | device string for osmosdr
2020
## building with nix flakes
2121

2222
```
23-
$ nix build .\#packages.x86_64-linux.gnuradio-decoder
23+
$ nix build .\#packages.x86_64-linux.r09-receiver
2424
```

flake.nix

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -13,19 +13,19 @@
1313
pkgs = nixpkgs.legacyPackages.${system};
1414

1515
libenvpp = pkgs.callPackage ./pkgs/libenvpp.nix { };
16-
gnuradio-decoder = let
16+
r09-receiver = let
1717
gnuradio_unwrapped = pkgs.callPackage ./pkgs/gnuradio.nix {
1818
gnuradio = pkgs.gnuradio3_8;
1919
};
20-
in pkgs.callPackage ./pkgs/gnuradio-decoder-cpp.nix {
20+
in pkgs.callPackage ./pkgs/r09-receiver.nix {
2121
inherit gnuradio_unwrapped libenvpp;
2222
gnuradioPackages = pkgs.gnuradio3_8Packages;
2323
};
2424
in rec {
2525
checks = packages;
2626
packages = {
27-
inherit gnuradio-decoder libenvpp;
28-
default = gnuradio-decoder;
27+
inherit r09-receiver libenvpp;
28+
default = r09-receiver;
2929
docs = (pkgs.nixosOptionsDoc {
3030
options = (nixpkgs.lib.nixosSystem {
3131
inherit system;
@@ -35,16 +35,16 @@
3535
};
3636
devShells.default = pkgs.mkShell {
3737
nativeBuildInputs =
38-
(with packages.gnuradio-decoder; buildInputs ++ nativeBuildInputs);
38+
(with packages.r09-receiver; buildInputs ++ nativeBuildInputs);
3939
};
4040
}) // {
4141
overlays.default = final: prev: {
42-
inherit (self.packages.${prev.system}) gnuradio-decoder;
42+
inherit (self.packages.${prev.system}) r09-receiver;
4343
};
4444

4545
nixosModules = rec {
46-
default = gnuradio-decoder;
47-
gnuradio-decoder = import ./nixos-module;
46+
default = r09-receiver;
47+
r09-receiver = import ./nixos-module;
4848
};
4949

5050
hydraJobs = let

nixos-module/default.nix

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,19 @@
11
{ pkgs, config, lib, ... }:
22
let
3-
cfg = config.TLMS.gnuradio;
3+
cfg = config.TLMS.r09-receiver;
44
in
55
{
6-
options.TLMS.gnuradio = with lib; {
6+
options.TLMS.r09-receiver = with lib; {
77
enable = mkOption {
88
type = types.bool;
99
default = false;
10-
description = ''Wether to enable TLMS gnuradio reciever'';
10+
description = ''Wether to enable TLMS r09-receiver'';
1111
};
1212
device = mkOption {
1313
type = types.str;
1414
default = "";
1515
example = "hackrf=0";
16-
description = ''Device string to pass to gnuradio'';
16+
description = ''Device string to pass to r09-receiver'';
1717
};
1818
frequency = mkOption {
1919
type = types.int;
@@ -42,13 +42,13 @@ in
4242
};
4343
user = mkOption {
4444
type = types.str;
45-
default = "gnuradio";
46-
description = "as which user gnuradio should run";
45+
default = "r09-receiver";
46+
description = "as which user r09-receiver should run";
4747
};
4848
group = mkOption {
4949
type = types.str;
50-
default = "gnuradio";
51-
description = "as which group gnuradio should run";
50+
default = "r09-receiver";
51+
description = "as which group r09-receiver should run";
5252
};
5353
};
5454

@@ -59,13 +59,13 @@ in
5959
rtl-sdr.enable = true;
6060
};
6161

62-
environment.systemPackages = [ pkgs.gnuradio-decoder ];
62+
environment.systemPackages = [ pkgs.r09-receiver ];
6363

64-
systemd.services."gnuradio" = {
64+
systemd.services."r09-receiver" = {
6565
enable = true;
6666
wantedBy = [ "multi-user.target" ];
6767

68-
script = "exec ${pkgs.gnuradio-decoder}/bin/gnuradio-decoder-cpp &";
68+
script = "exec ${pkgs.r09-receiver}/bin/r09-receiver &";
6969

7070
environment = with cfg; {
7171
"DECODER_FREQUENCY" = toString frequency;
@@ -88,17 +88,17 @@ in
8888
users.groups."${cfg.group}" = { };
8989
users.users."${cfg.user}" = {
9090
name = cfg.user;
91-
description = "gnu radio service user";
91+
description = "r09-receiver service user";
9292
isNormalUser = true;
9393
group = cfg.group;
9494
extraGroups = [ "plugdev" ];
9595
};
9696

97-
security.wrappers.gnuradio-decode = {
97+
security.wrappers.r09-receiver = {
9898
owner = cfg.user;
9999
group = "users";
100100
capabilities = "cap_sys_nice+eip";
101-
source = "${pkgs.gnuradio-decoder}/bin/gnuradio-decoder-cpp";
101+
source = "${pkgs.r09-receiver}/bin/r09-receiver";
102102
};
103103

104104
};

pkgs/gnuradio-decoder-cpp.nix renamed to pkgs/r09-receiver.nix

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -75,8 +75,8 @@ let
7575
'';
7676
};
7777

78-
decoder = stdenv.mkDerivation {
79-
name = "decoder";
78+
r09-receiver = stdenv.mkDerivation {
79+
name = "r09-receiver";
8080
version = "0.1.0";
8181

8282
src = ./..;
@@ -88,24 +88,24 @@ let
8888
};
8989
in
9090
stdenv.mkDerivation {
91-
name = "decoder-shrinked";
91+
name = "r09-receiver-striped";
9292
version = "0.1.0";
9393

94-
src = decoder;
94+
src = r09-receiver;
9595

9696
phases = [ "installPhase" ];
9797

9898
installPhase = ''
9999
mkdir -p $out/bin
100100
101-
cp $src/bin/gnuradio-decoder-cpp gnuradio-decoder-cpp
102-
chmod +w gnuradio-decoder-cpp
101+
cp $src/bin/r09-receiver r09-receiver
102+
chmod +w r09-receiver
103103
104-
RPATH=$(${patchelf}/bin/patchelf --print-rpath gnuradio-decoder-cpp)
104+
RPATH=$(${patchelf}/bin/patchelf --print-rpath r09-receiver)
105105
106-
${patchelf}/bin/patchelf --set-rpath ${decoder-dependencies}/lib:${osmosdr-dependency}/lib:$RPATH gnuradio-decoder-cpp
107-
${patchelf}/bin/patchelf --shrink-rpath gnuradio-decoder-cpp
106+
${patchelf}/bin/patchelf --set-rpath ${decoder-dependencies}/lib:${osmosdr-dependency}/lib:$RPATH r09-receiver
107+
${patchelf}/bin/patchelf --shrink-rpath r09-receiver
108108
109-
cp gnuradio-decoder-cpp $out/bin/gnuradio-decoder-cpp
109+
cp r09-receiver $out/bin/r09-receiver
110110
'';
111111
}

0 commit comments

Comments
 (0)