Browse Source

androidStudioPackages: Use more intuitive names for the derivations

nixos-19.03
Michael Weiss 4 years ago
parent
commit
d8b44edd8f
  1. 10
      pkgs/applications/editors/android-studio/common.nix
  2. 4
      pkgs/applications/editors/android-studio/default.nix

10
pkgs/applications/editors/android-studio/common.nix

@ -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; {

4
pkgs/applications/editors/android-studio/default.nix

@ -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…
Cancel
Save