pencil2d: add ffmpeg dependency; fix build id (#411080)

authored by Peder Bergebakken Sundt and committed by GitHub 805e7c8d 75d7e7a5

+42 -3
+13
pkgs/by-name/pe/pencil2d/git-inherit.patch
··· 1 + --- a/app/app.pro 2 + +++ b/app/app.pro 3 + @@ -208,8 +208,8 @@ 4 + 5 + GIT { 6 + DEFINES += GIT_EXISTS \ 7 + - "GIT_CURRENT_SHA1=$$system(git --git-dir=.git --work-tree=. -C $$_PRO_FILE_PWD_/../ rev-parse HEAD)" \ 8 + - "GIT_TIMESTAMP=$$system(git --git-dir=.git --work-tree=. -C $$_PRO_FILE_PWD_/../ log -n 1 --pretty=format:"%cd" --date=format:"%Y-%m-%d_%H:%M:%S")" 9 + + "GIT_CURRENT_SHA1=$$cat($$_PRO_FILE_PWD_/../COMMIT)" \ 10 + + "GIT_TIMESTAMP=$$cat($$_PRO_FILE_PWD_/../SOURCE_TIMESTAMP_EPOCH)" 11 + } 12 + 13 + macx {
+29 -3
pkgs/by-name/pe/pencil2d/package.nix
··· 3 3 stdenv, 4 4 fetchFromGitHub, 5 5 qt5, 6 + git, 7 + ffmpeg_6, 8 + nix-update-script, 6 9 }: 7 10 8 - stdenv.mkDerivation (FinalAttrs: { 11 + stdenv.mkDerivation (finalAttrs: { 9 12 pname = "pencil2d"; 10 13 version = "0.7.0"; 11 14 12 15 src = fetchFromGitHub { 13 16 owner = "pencil2d"; 14 17 repo = "pencil"; 15 - tag = "v${FinalAttrs.version}"; 16 - hash = "sha256-OuZpKgX2BgfuQdnjk/RTBww/blO1CIrYWr7KytqcIbQ="; 18 + tag = "v${finalAttrs.version}"; 19 + hash = "sha256-l+iW0k3WdNXDwXtt958JJWSe3zNhQVul4FUcPPMrVxE="; 20 + leaveDotGit = true; 21 + postFetch = '' 22 + # Obtain the last commit ID and its timestamp, then zap .git for reproducibility 23 + cd $out 24 + git rev-parse HEAD > $out/COMMIT 25 + # 0000-00-00T00:00:00Z 26 + date -u -d "@$(git log -1 --pretty=%ct)" "+%Y-%m-%d_%H:%M:%S" > $out/SOURCE_TIMESTAMP_EPOCH 27 + find "$out" -name .git -print0 | xargs -0 rm -rf 28 + ''; 17 29 }; 30 + 31 + patches = [ ./git-inherit.patch ]; 18 32 19 33 nativeBuildInputs = with qt5; [ 20 34 qmake 21 35 wrapQtAppsHook 22 36 qttools 37 + git 23 38 ]; 24 39 40 + qmakeFlags = [ 41 + "pencil2d.pro" 42 + "CONFIG+=release" 43 + "CONFIG+=PENCIL2D_RELEASE" 44 + "CONFIG+=GIT" 45 + "VERSION=${finalAttrs.version}" 46 + ]; 47 + 48 + passthru.updateScript = nix-update-script { }; 49 + 25 50 buildInputs = with qt5; [ 26 51 qtbase 27 52 qtmultimedia 28 53 qtsvg 29 54 qtwayland 55 + ffmpeg_6 30 56 ]; 31 57 32 58 meta = {