mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-06-09 19:13:26 +03:00
pencil2d: add ffmpeg dependency; fix build id (#411080)
This commit is contained in:
commit
805e7c8d18
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,
|
stdenv,
|
||||||
fetchFromGitHub,
|
fetchFromGitHub,
|
||||||
qt5,
|
qt5,
|
||||||
|
git,
|
||||||
|
ffmpeg_6,
|
||||||
|
nix-update-script,
|
||||||
}:
|
}:
|
||||||
|
|
||||||
stdenv.mkDerivation (FinalAttrs: {
|
stdenv.mkDerivation (finalAttrs: {
|
||||||
pname = "pencil2d";
|
pname = "pencil2d";
|
||||||
version = "0.7.0";
|
version = "0.7.0";
|
||||||
|
|
||||||
src = fetchFromGitHub {
|
src = fetchFromGitHub {
|
||||||
owner = "pencil2d";
|
owner = "pencil2d";
|
||||||
repo = "pencil";
|
repo = "pencil";
|
||||||
tag = "v${FinalAttrs.version}";
|
tag = "v${finalAttrs.version}";
|
||||||
hash = "sha256-OuZpKgX2BgfuQdnjk/RTBww/blO1CIrYWr7KytqcIbQ=";
|
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; [
|
nativeBuildInputs = with qt5; [
|
||||||
qmake
|
qmake
|
||||||
wrapQtAppsHook
|
wrapQtAppsHook
|
||||||
qttools
|
qttools
|
||||||
|
git
|
||||||
];
|
];
|
||||||
|
|
||||||
|
qmakeFlags = [
|
||||||
|
"pencil2d.pro"
|
||||||
|
"CONFIG+=release"
|
||||||
|
"CONFIG+=PENCIL2D_RELEASE"
|
||||||
|
"CONFIG+=GIT"
|
||||||
|
"VERSION=${finalAttrs.version}"
|
||||||
|
];
|
||||||
|
|
||||||
|
passthru.updateScript = nix-update-script { };
|
||||||
|
|
||||||
buildInputs = with qt5; [
|
buildInputs = with qt5; [
|
||||||
qtbase
|
qtbase
|
||||||
qtmultimedia
|
qtmultimedia
|
||||||
qtsvg
|
qtsvg
|
||||||
qtwayland
|
qtwayland
|
||||||
|
ffmpeg_6
|
||||||
];
|
];
|
||||||
|
|
||||||
meta = {
|
meta = {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue