mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-06-09 19:13:26 +03:00
pencil2d: added ffmpeg dependency; fixed build
Patched qmake files and source repository to correctly acquire Git information Added ffmpeg dependency
This commit is contained in:
parent
1623891d1c
commit
78a0e4dfad
2 changed files with 42 additions and 3 deletions
13
pkgs/by-name/pe/pencil2d/git-inherit.patch
Normal file
13
pkgs/by-name/pe/pencil2d/git-inherit.patch
Normal file
|
@ -0,0 +1,13 @@
|
|||
--- a/app/app.pro
|
||||
+++ b/app/app.pro
|
||||
@@ -208,8 +208,8 @@
|
||||
|
||||
GIT {
|
||||
DEFINES += GIT_EXISTS \
|
||||
- "GIT_CURRENT_SHA1=$$system(git --git-dir=.git --work-tree=. -C $$_PRO_FILE_PWD_/../ rev-parse HEAD)" \
|
||||
- "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")"
|
||||
+ "GIT_CURRENT_SHA1=$$cat($$_PRO_FILE_PWD_/../COMMIT)" \
|
||||
+ "GIT_TIMESTAMP=$$cat($$_PRO_FILE_PWD_/../SOURCE_TIMESTAMP_EPOCH)"
|
||||
}
|
||||
|
||||
macx {
|
|
@ -3,30 +3,56 @@
|
|||
stdenv,
|
||||
fetchFromGitHub,
|
||||
qt5,
|
||||
git,
|
||||
ffmpeg_6,
|
||||
nix-update-script,
|
||||
}:
|
||||
|
||||
stdenv.mkDerivation (FinalAttrs: {
|
||||
stdenv.mkDerivation (finalAttrs: {
|
||||
pname = "pencil2d";
|
||||
version = "0.7.0";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "pencil2d";
|
||||
repo = "pencil";
|
||||
tag = "v${FinalAttrs.version}";
|
||||
hash = "sha256-OuZpKgX2BgfuQdnjk/RTBww/blO1CIrYWr7KytqcIbQ=";
|
||||
tag = "v${finalAttrs.version}";
|
||||
hash = "sha256-l+iW0k3WdNXDwXtt958JJWSe3zNhQVul4FUcPPMrVxE=";
|
||||
leaveDotGit = true;
|
||||
postFetch = ''
|
||||
# Obtain the last commit ID and its timestamp, then zap .git for reproducibility
|
||||
cd $out
|
||||
git rev-parse HEAD > $out/COMMIT
|
||||
# 0000-00-00T00:00:00Z
|
||||
date -u -d "@$(git log -1 --pretty=%ct)" "+%Y-%m-%d_%H:%M:%S" > $out/SOURCE_TIMESTAMP_EPOCH
|
||||
find "$out" -name .git -print0 | xargs -0 rm -rf
|
||||
'';
|
||||
};
|
||||
|
||||
patches = [ ./git-inherit.patch ];
|
||||
|
||||
nativeBuildInputs = with qt5; [
|
||||
qmake
|
||||
wrapQtAppsHook
|
||||
qttools
|
||||
git
|
||||
];
|
||||
|
||||
qmakeFlags = [
|
||||
"pencil2d.pro"
|
||||
"CONFIG+=release"
|
||||
"CONFIG+=PENCIL2D_RELEASE"
|
||||
"CONFIG+=GIT"
|
||||
"VERSION=${finalAttrs.version}"
|
||||
];
|
||||
|
||||
passthru.updateScript = nix-update-script { };
|
||||
|
||||
buildInputs = with qt5; [
|
||||
qtbase
|
||||
qtmultimedia
|
||||
qtsvg
|
||||
qtwayland
|
||||
ffmpeg_6
|
||||
];
|
||||
|
||||
meta = {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue