From a0f4d19925705945b2beb393239f1a9f72b5035d Mon Sep 17 00:00:00 2001 From: Matthew Bauer Date: Fri, 25 May 2018 04:21:47 -0500 Subject: [PATCH] treewide: use appendToName where appropriate Using appendToName preserves the version at the end of the name. --- pkgs/applications/networking/cluster/terraform/default.nix | 6 +++--- pkgs/development/idris-modules/with-packages.nix | 6 +++--- pkgs/misc/lilypond/with-fonts.nix | 6 +++--- 3 files changed, 9 insertions(+), 9 deletions(-) diff --git a/pkgs/applications/networking/cluster/terraform/default.nix b/pkgs/applications/networking/cluster/terraform/default.nix index 5879c0e83974..ad8bae014542 100644 --- a/pkgs/applications/networking/cluster/terraform/default.nix +++ b/pkgs/applications/networking/cluster/terraform/default.nix @@ -60,8 +60,8 @@ let # of plugins, which might be counterintuitive if someone just wants a vanilla Terraform. if actualPlugins == [] then terraform.overrideAttrs (orig: { passthru = orig.passthru // passthru; }) - else stdenv.mkDerivation { - name = "${terraform.name}-with-plugins"; + else lib.appendToName "with-plugins "(stdenv.mkDerivation { + inherit (terraform) name; buildInputs = [ makeWrapper ]; buildCommand = '' @@ -72,7 +72,7 @@ let ''; inherit passthru; - }; + }); in withPlugins (_: []); plugins = import ./providers { inherit stdenv lib buildGoPackage fetchFromGitHub; }; diff --git a/pkgs/development/idris-modules/with-packages.nix b/pkgs/development/idris-modules/with-packages.nix index 1631555eee4a..8b390d4bf5be 100644 --- a/pkgs/development/idris-modules/with-packages.nix +++ b/pkgs/development/idris-modules/with-packages.nix @@ -4,9 +4,9 @@ let paths = stdenv.lib.closePropagation packages; in -symlinkJoin { +stdenv.lib.appendToName "with-packages" (symlinkJoin { - name = idris.name + "-with-packages"; + inherit (idris) name; paths = paths ++ [idris] ; @@ -17,4 +17,4 @@ symlinkJoin { --set IDRIS_LIBRARY_PATH $out/libs ''; -} +}) diff --git a/pkgs/misc/lilypond/with-fonts.nix b/pkgs/misc/lilypond/with-fonts.nix index 2218b75a2e0f..5bc74cb65ddf 100644 --- a/pkgs/misc/lilypond/with-fonts.nix +++ b/pkgs/misc/lilypond/with-fonts.nix @@ -5,8 +5,8 @@ , fonts ? openlilylib-fonts.all }: -stdenv.mkDerivation { - name = "${lilypond.name}-with-fonts"; +stdenv.lib.appendToName "with-fonts" (stdenv.mkDerivation { + inherit (lilypond) name; phases = "installPhase"; buildInputs = fonts; nativeBuildInputs = [ lndir ]; @@ -32,4 +32,4 @@ stdenv.mkDerivation { substituteInPlace $p --replace "exec -a \"${lilypond}" "exec -a \"$out" done ''; -} +})