androidStudioPackages: Use more intuitive names for the derivations
This commit is contained in:
parent
31583d7cb6
commit
d8b44edd8f
@ -37,8 +37,9 @@
|
||||
}:
|
||||
|
||||
let
|
||||
drvName = "android-studio-${channel}-${version}";
|
||||
androidStudio = stdenv.mkDerivation {
|
||||
name = "${pname}-${version}";
|
||||
name = drvName;
|
||||
|
||||
src = fetchurl {
|
||||
url = "https://dl.google.com/dl/android/studio/ide-zips/${version}/android-studio-ide-${build}-linux.zip";
|
||||
@ -116,18 +117,19 @@ let
|
||||
# (e.g. `mksdcard`) have `/lib/ld-linux.so.2` set as the interpreter. An FHS
|
||||
# environment is used as a work around for that.
|
||||
fhsEnv = buildFHSUserEnv {
|
||||
name = "${pname}-fhs-env";
|
||||
name = "${drvName}-fhs-env";
|
||||
multiPkgs = pkgs: [ pkgs.ncurses5 ];
|
||||
};
|
||||
|
||||
in
|
||||
writeTextFile {
|
||||
name = "${pname}-${version}";
|
||||
name = "${drvName}-wrapper";
|
||||
# TODO: Rename preview -> beta (and add -stable suffix?):
|
||||
destination = "/bin/${pname}";
|
||||
executable = true;
|
||||
text = ''
|
||||
#!${bash}/bin/bash
|
||||
${fhsEnv}/bin/${pname}-fhs-env ${androidStudio}/bin/studio.sh
|
||||
${fhsEnv}/bin/${drvName}-fhs-env ${androidStudio}/bin/studio.sh
|
||||
'';
|
||||
} // {
|
||||
meta = with stdenv.lib; {
|
||||
|
@ -26,18 +26,16 @@ in rec {
|
||||
# Old alias
|
||||
preview = beta;
|
||||
|
||||
# Attributes are named by the corresponding release channels
|
||||
# Attributes are named by their corresponding release channels
|
||||
|
||||
stable = mkStudio (stableVersion // {
|
||||
channel = "stable";
|
||||
pname = "android-studio";
|
||||
#pname = "android-studio-stable"; # TODO: Rename and provide symlink
|
||||
});
|
||||
|
||||
beta = mkStudio (betaVersion // {
|
||||
channel = "beta";
|
||||
pname = "android-studio-preview";
|
||||
#pname = "android-studio-beta"; # TODO: Rename and provide symlink
|
||||
});
|
||||
|
||||
dev = mkStudio (latestVersion // {
|
||||
|
Loading…
Reference in New Issue
Block a user