2024-10-11 23:27:07 +03:00
|
|
|
{
|
|
|
|
stdenv,
|
|
|
|
pkgs,
|
|
|
|
config,
|
|
|
|
...
|
|
|
|
}@args:
|
|
|
|
let
|
|
|
|
cfg = (import ./Config.nix args).file;
|
|
|
|
in
|
|
|
|
stdenv.mkDerivation (finalAttrs: {
|
|
|
|
pname = "Homer";
|
|
|
|
version = "24.05.1";
|
2024-06-09 23:35:53 +03:00
|
|
|
|
2024-10-11 23:27:07 +03:00
|
|
|
src = pkgs.fetchurl {
|
|
|
|
url = "https://github.com/bastienwirtz/homer/releases/download/v${finalAttrs.version}/homer.zip";
|
|
|
|
sha256 = "sha256-Ji/7BSKCnnhj4NIdGngTHcGRRbx9UWrx48bBsKkEj34=";
|
|
|
|
};
|
2024-06-09 23:35:53 +03:00
|
|
|
|
2024-10-11 23:27:07 +03:00
|
|
|
nativeBuildInputs = with pkgs; [ unzip ];
|
2024-06-09 23:35:53 +03:00
|
|
|
|
2024-10-11 23:27:07 +03:00
|
|
|
dontUnpack = true;
|
2024-06-09 23:35:53 +03:00
|
|
|
|
2024-10-11 23:27:07 +03:00
|
|
|
installPhase = ''
|
|
|
|
runHook preInstall
|
2024-06-09 23:35:53 +03:00
|
|
|
|
2024-10-11 23:27:07 +03:00
|
|
|
mkdir -p $out/assets
|
|
|
|
pushd $out
|
|
|
|
unzip $src
|
|
|
|
cp ${cfg} $out/assets/config.yml
|
2024-06-09 23:35:53 +03:00
|
|
|
|
2024-10-11 23:27:07 +03:00
|
|
|
runHook postInstall
|
|
|
|
'';
|
2024-06-09 23:35:53 +03:00
|
|
|
})
|