about summary refs log tree commit diff
path: root/pkgs/applications/radio
diff options
context:
space:
mode:
authorgithub-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>2023-09-21 12:01:19 +0000
committerGitHub <noreply@github.com>2023-09-21 12:01:19 +0000
commit4c610adf95276c9c810b715121bd24ad453dc77a (patch)
tree9363bf05c0d30523c23b7b6f1685a13f4b1f5671 /pkgs/applications/radio
parent743d7baa31ff74f2e1dbf09a6ea38a7e24aedfc3 (diff)
parentc9a667043fdd65c3511d9b61481240dd56c56f2d (diff)
downloadnixlib-4c610adf95276c9c810b715121bd24ad453dc77a.tar
nixlib-4c610adf95276c9c810b715121bd24ad453dc77a.tar.gz
nixlib-4c610adf95276c9c810b715121bd24ad453dc77a.tar.bz2
nixlib-4c610adf95276c9c810b715121bd24ad453dc77a.tar.lz
nixlib-4c610adf95276c9c810b715121bd24ad453dc77a.tar.xz
nixlib-4c610adf95276c9c810b715121bd24ad453dc77a.tar.zst
nixlib-4c610adf95276c9c810b715121bd24ad453dc77a.zip
Merge master into staging-next
Diffstat (limited to 'pkgs/applications/radio')
-rw-r--r--pkgs/applications/radio/uhd/default.nix13
1 files changed, 7 insertions, 6 deletions
diff --git a/pkgs/applications/radio/uhd/default.nix b/pkgs/applications/radio/uhd/default.nix
index 873c49dd9a7c..23c0a7285868 100644
--- a/pkgs/applications/radio/uhd/default.nix
+++ b/pkgs/applications/radio/uhd/default.nix
@@ -41,7 +41,7 @@ let
   );
 in
 
-stdenv.mkDerivation rec {
+stdenv.mkDerivation (finalAttrs: {
   pname = "uhd";
   # UHD seems to use three different version number styles: x.y.z, xxx_yyy_zzz
   # and xxx.yyy.zzz. Hrmpf... style keeps changing
@@ -52,14 +52,15 @@ stdenv.mkDerivation rec {
   src = fetchFromGitHub {
     owner = "EttusResearch";
     repo = "uhd";
-    rev = "v${version}";
+    rev = "v${finalAttrs.version}";
     sha256 = "sha256-khVOHlvacZc4EMg4m55rxEqPvLY1xURpAfOW905/3jg=";
   };
   # Firmware images are downloaded (pre-built) from the respective release on Github
   uhdImagesSrc = fetchurl {
-    url = "https://github.com/EttusResearch/uhd/releases/download/v${version}/uhd-images_${version}.tar.xz";
+    url = "https://github.com/EttusResearch/uhd/releases/download/v${finalAttrs.version}/uhd-images_${finalAttrs.version}.tar.xz";
     sha256 = "V8ldW8bvYWbrDAvpWpHcMeLf9YvF8PIruDAyNK/bru4=";
   };
+  # TODO: Add passthru.updateScript that will update both of the above hashes...
 
   cmakeFlags = [
     "-DENABLE_LIBUHD=ON"
@@ -105,7 +106,7 @@ stdenv.mkDerivation rec {
     # pythonEnv for runtime as well. The utilities' runtime dependencies are
     # handled at the environment
     ++ optionals (enableExamples) [ ncurses ncurses.dev ]
-    ++ optionals (enablePythonApi || enableUtils) [ pythonEnv ]
+    ++ optionals (enablePythonApi || enableUtils) [ finalAttrs.pythonEnv ]
     ++ optionals (enableDpdk) [ dpdk ]
   ;
 
@@ -128,7 +129,7 @@ stdenv.mkDerivation rec {
   # UHD expects images in `$CMAKE_INSTALL_PREFIX/share/uhd/images`
   installFirmware = ''
     mkdir -p "$out/share/uhd/images"
-    tar --strip-components=1 -xvf "${uhdImagesSrc}" -C "$out/share/uhd/images"
+    tar --strip-components=1 -xvf "${finalAttrs.uhdImagesSrc}" -C "$out/share/uhd/images"
   '';
 
   # -DENABLE_TESTS=ON installs the tests, we don't need them in the output
@@ -157,4 +158,4 @@ stdenv.mkDerivation rec {
     platforms = platforms.linux ++ platforms.darwin;
     maintainers = with maintainers; [ bjornfor fpletz tomberek doronbehar ];
   };
-}
+})