From 9d53c38f615d9e683e88a1899fd6ffc368bf4be8 Mon Sep 17 00:00:00 2001 From: Felix Buehler Date: Tue, 1 Mar 2022 17:12:33 +0100 Subject: [PATCH] adoptopenjdk-bin: rename name to pname&version --- .../compilers/adoptopenjdk-bin/jdk-darwin-base.nix | 7 ++++--- .../compilers/adoptopenjdk-bin/jdk-linux-base.nix | 6 +++--- 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/pkgs/development/compilers/adoptopenjdk-bin/jdk-darwin-base.nix b/pkgs/development/compilers/adoptopenjdk-bin/jdk-darwin-base.nix index ef3e4b7219e4..68d33b657c68 100644 --- a/pkgs/development/compilers/adoptopenjdk-bin/jdk-darwin-base.nix +++ b/pkgs/development/compilers/adoptopenjdk-bin/jdk-darwin-base.nix @@ -10,9 +10,10 @@ assert (stdenv.isDarwin && stdenv.isx86_64); let cpuName = stdenv.hostPlatform.parsed.cpu.name; result = stdenv.mkDerivation { - name = if sourcePerArch.packageType == "jdk" - then "adoptopenjdk-${sourcePerArch.vmType}-bin-${sourcePerArch.${cpuName}.version}" - else "adoptopenjdk-${sourcePerArch.packageType}-${sourcePerArch.vmType}-bin-${sourcePerArch.${cpuName}.version}"; + pname = if sourcePerArch.packageType == "jdk" + then "adoptopenjdk-${sourcePerArch.vmType}-bin" + else "adoptopenjdk-${sourcePerArch.packageType}-${sourcePerArch.vmType}-bin"; + version = sourcePerArch.${cpuName}.version or (throw "unsupported CPU ${cpuName}"); src = fetchurl { inherit (sourcePerArch.${cpuName}) url sha256; diff --git a/pkgs/development/compilers/adoptopenjdk-bin/jdk-linux-base.nix b/pkgs/development/compilers/adoptopenjdk-bin/jdk-linux-base.nix index 39685131edd3..6fc96b4d1825 100644 --- a/pkgs/development/compilers/adoptopenjdk-bin/jdk-linux-base.nix +++ b/pkgs/development/compilers/adoptopenjdk-bin/jdk-linux-base.nix @@ -33,9 +33,9 @@ let in let result = stdenv.mkDerivation rec { - name = if sourcePerArch.packageType == "jdk" - then "adoptopenjdk-${sourcePerArch.vmType}-bin-${version}" - else "adoptopenjdk-${sourcePerArch.packageType}-${sourcePerArch.vmType}-bin-${version}"; + pname = if sourcePerArch.packageType == "jdk" + then "adoptopenjdk-${sourcePerArch.vmType}-bin" + else "adoptopenjdk-${sourcePerArch.packageType}-${sourcePerArch.vmType}-bin"; version = sourcePerArch.${cpuName}.version or (throw "unsupported CPU ${cpuName}");