nix/package/homer/default.nix

27 lines
581 B
Nix
Raw Normal View History

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