overlays/android-studio: init

This commit is contained in:
LavaDesu 2023-07-21 20:13:08 +07:00
parent dcb9acf8bd
commit 28692abd1d
Signed by: cilly
GPG key ID: 6500251E087653C9
2 changed files with 28 additions and 0 deletions

View file

@ -0,0 +1,27 @@
self: { bash, buildFHSEnv, cacert, ncurses5, runCommand, ... } @ super:
let
drvName = super.android-studio.name;
fhsEnv = buildFHSEnv {
name = "${drvName}-fhs-env";
# google's analytics calls jdk's getOperatingSystemMXBean which tries to parse cgroups and ultimately fails for whatever reason with an npe
unshareCgroup = false;
multiPkgs = pkgs: [
ncurses5
(runCommand "fedoracert" {}
''
mkdir -p $out/etc/pki/tls/
ln -s ${cacert}/etc/ssl/certs $out/etc/pki/tls/certs
'')
];
};
startScript = ''
#!${bash}/bin/bash
${fhsEnv}/bin/${drvName}-fhs-env ${super.android-studio.passthru.unwrapped}/bin/studio.sh "$@"
'';
in {
android-studio = super.android-studio.overrideAttrs(_: {
inherit startScript;
});
}

View file

@ -1,4 +1,5 @@
builtins.map (path: import path) [
./android-studio.nix
./discord.nix
./eww.nix
./material-icons.nix