2020-03-05 17:53:11 +00:00
|
|
|
{ buildFHSUserEnv, coreutils, file, libarchive, runtimeShell
|
|
|
|
, extraPkgs ? pkgs: [], appimageTools, stdenv, bash }:
|
2018-06-09 18:10:16 +01:00
|
|
|
|
2019-01-27 13:02:50 +00:00
|
|
|
let
|
2018-06-09 18:10:16 +01:00
|
|
|
|
2020-03-05 17:53:11 +00:00
|
|
|
name = "appimage-run";
|
|
|
|
version = "1.0";
|
|
|
|
fhsArgs = appimageTools.defaultFhsEnvArgs;
|
2018-06-09 18:10:16 +01:00
|
|
|
|
2020-03-05 17:53:11 +00:00
|
|
|
appimage-exec = stdenv.mkDerivation {
|
|
|
|
#inherit pname version;
|
|
|
|
name = "appimage-exec";
|
2018-09-19 17:42:13 +01:00
|
|
|
|
2020-03-05 17:53:11 +00:00
|
|
|
inherit coreutils file libarchive bash;
|
2018-06-09 18:10:16 +01:00
|
|
|
|
2020-03-05 17:53:11 +00:00
|
|
|
buildCommand = ''
|
|
|
|
mkdir -p $out/bin/
|
|
|
|
substituteAll ${./appimage-exec.sh} $out/bin/appimage-exec.sh
|
|
|
|
chmod +x $out/bin/appimage-exec.sh
|
|
|
|
'';
|
|
|
|
};
|
2018-06-09 18:10:16 +01:00
|
|
|
|
2020-03-05 17:53:11 +00:00
|
|
|
in buildFHSUserEnv (fhsArgs // {
|
|
|
|
inherit name;
|
2018-06-09 18:10:16 +01:00
|
|
|
|
2020-03-05 17:53:11 +00:00
|
|
|
targetPkgs = pkgs:
|
|
|
|
[ appimage-exec
|
|
|
|
] ++ fhsArgs.targetPkgs pkgs ++ extraPkgs pkgs;
|
|
|
|
#extraInstallCommands = '''';
|
|
|
|
runScript = "appimage-exec.sh";
|
2019-01-27 13:02:50 +00:00
|
|
|
})
|