diff --git a/pkgs/by-name/ch/chatterino2/common.nix b/pkgs/by-name/ch/chatterino2/common.nix index 0e8fb6cd4bb1..3f45d34812a9 100644 --- a/pkgs/by-name/ch/chatterino2/common.nix +++ b/pkgs/by-name/ch/chatterino2/common.nix @@ -38,6 +38,12 @@ stdenv.mkDerivation { ] ++ lib.optional enableAvifSupport libavif; + preConfigure = '' + if [[ -f "$src/GIT_HASH" ]]; then + export GIT_HASH="$(cat $src/GIT_HASH)" + fi + ''; + cmakeFlags = [ (lib.cmakeBool "BUILD_WITH_QT6" true) (lib.cmakeBool "USE_SYSTEM_QTKEYCHAIN" true) diff --git a/pkgs/by-name/ch/chatterino2/package.nix b/pkgs/by-name/ch/chatterino2/package.nix index 7e109330875f..9ad3e6b96e71 100644 --- a/pkgs/by-name/ch/chatterino2/package.nix +++ b/pkgs/by-name/ch/chatterino2/package.nix @@ -18,8 +18,13 @@ owner = "Chatterino"; repo = "chatterino2"; tag = "v${finalAttrs.version}"; - hash = "sha256-W2sqlqL6aa68aQ3nE161G64x7K7p8iByX03g1dseQbs="; + hash = "sha256-XV8WhdjdnVrOg0PVyIhGfxC4sJ62oH03KchvGr1c2w8="; fetchSubmodules = true; + leaveDotGit = true; + postFetch = '' + git -C $out rev-parse --short HEAD > $out/GIT_HASH + find "$out" -name .git -print0 | xargs -0 rm -rf + ''; }; passthru = { diff --git a/pkgs/by-name/ch/chatterino7/package.nix b/pkgs/by-name/ch/chatterino7/package.nix index bd60c3dc2a5a..19e6e5897bc8 100644 --- a/pkgs/by-name/ch/chatterino7/package.nix +++ b/pkgs/by-name/ch/chatterino7/package.nix @@ -17,8 +17,13 @@ owner = "SevenTV"; repo = "chatterino7"; tag = "v${finalAttrs.version}"; - hash = "sha256-KrAr3DcQDjb+LP+vIf0qLSSgII0m5rNwhncLNHlLaC8="; + hash = "sha256-tft0+vcE+LGPrlv4ZBgzmeF66Jf66iTjUr0pdF1vx24="; fetchSubmodules = true; + leaveDotGit = true; + postFetch = '' + git -C $out rev-parse --short HEAD > $out/GIT_HASH + find "$out" -name .git -print0 | xargs -0 rm -rf + ''; }; passthru.updateScript = gitUpdater {