-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathproton-cli-steamrun.nix
50 lines (43 loc) · 1.21 KB
/
proton-cli-steamrun.nix
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
{ stdenv
, steam-run
, writeScriptBin
, makeWrapper
, fetchurl
, ... }:
# stdenv.mkDerivation rec {
# name = "vizr-proton-cli";
# src = fetchurl {
# url = "https://proton.me/download/export-tool/proton-mail-export-cli-linux_x86_64.tar.gz";
# hash = "sha256-8Lm2Nbw1LgFjEtTyBJRwhYEXPbd9wJHKZE1GISDwlfI=";
# };
# sourceRoot = ".";
# nativeBuildInputs = [ makeWrapper ];
# installPhase = ''
# mkdir -p $out/bin
# ls -al
# cp -av $out/proton-mail-export-cli $out/bin/.proton-mail-export-cli-unwrapped
# makeWrapper ${steam-run}/bin/steam-run $out/bin/proton-mail-export-cli
# '';
# }
let
proton-cli = stdenv.mkDerivation rec {
name = "proton-mail-export-cli";
src = fetchurl {
url = "https://proton.me/download/export-tool/proton-mail-export-cli-linux_x86_64.tar.gz";
hash = "sha256-SXcCk7Noz64XsbRdEVsn0aszR3uK8SgkoBxji7bjqLs=";
};
sourceRoot = ".";
nativeBuildInputs = [ makeWrapper ];
installPhase = ''
cp -R . $out/
ls -al
ln -s /tmp/ $out/logs
'';
preFixup = ''
wrapProgram $out/${name}
'';
};
in
writeScriptBin "vizr-proton-cli" ''
exec ${steam-run}/bin/steam-run ${proton-cli}/proton-mail-export-cli "$@"
''