summary refs log tree commit diff
path: root/pkgs/build-support/release/rpm-build.nix
diff options
context:
space:
mode:
authorFelix Buehler <account@buehler.rocks>2023-02-06 21:49:02 +0100
committerFelix Buehler <account@buehler.rocks>2023-02-13 21:52:34 +0100
commitcdb39a86e0dd7cda3a057f4f4795485a5c9b9be5 (patch)
tree1fef6e55f39dab2289b68b68972ee4c9b89520f7 /pkgs/build-support/release/rpm-build.nix
parent7f610b4d3f6e6f695b1f5521862066c0ece79a5a (diff)
downloadnixpkgs-cdb39a86e0dd7cda3a057f4f4795485a5c9b9be5.tar
nixpkgs-cdb39a86e0dd7cda3a057f4f4795485a5c9b9be5.tar.gz
nixpkgs-cdb39a86e0dd7cda3a057f4f4795485a5c9b9be5.tar.bz2
nixpkgs-cdb39a86e0dd7cda3a057f4f4795485a5c9b9be5.tar.lz
nixpkgs-cdb39a86e0dd7cda3a057f4f4795485a5c9b9be5.tar.xz
nixpkgs-cdb39a86e0dd7cda3a057f4f4795485a5c9b9be5.tar.zst
nixpkgs-cdb39a86e0dd7cda3a057f4f4795485a5c9b9be5.zip
treewide: use optionalString
Diffstat (limited to 'pkgs/build-support/release/rpm-build.nix')
-rw-r--r--pkgs/build-support/release/rpm-build.nix4
1 files changed, 2 insertions, 2 deletions
diff --git a/pkgs/build-support/release/rpm-build.nix b/pkgs/build-support/release/rpm-build.nix
index 47c01f2e66b..8f471147050 100644
--- a/pkgs/build-support/release/rpm-build.nix
+++ b/pkgs/build-support/release/rpm-build.nix
@@ -3,7 +3,7 @@
 
 { name ? "rpm-build"
 , diskImage
-, src, vmTools
+, src, lib, vmTools
 , ... } @ args:
 
 vmTools.buildRPM (
@@ -11,7 +11,7 @@ vmTools.buildRPM (
   removeAttrs args ["vmTools"] //
 
   {
-    name = name + "-" + diskImage.name + (if src ? version then "-" + src.version else "");
+    name = name + "-" + diskImage.name + (lib.optionalString (src ? version) "-${src.version}");
 
     preBuild = ''
       . ${./functions.sh}