Skip to content

sview: init at 20_08#344922

Merged
wolfgangwalther merged 2 commits intoNixOS:masterfrom
Mx2uller:master
Jan 1, 2025
Merged

sview: init at 20_08#344922
wolfgangwalther merged 2 commits intoNixOS:masterfrom
Mx2uller:master

Conversation

@Mx2uller
Copy link
Contributor

Description of changes

Cross-platform solution to view 3D stereoscopic videos and images.

Things done

  • Built on platform(s)
    • x86_64-linux
    • aarch64-linux
    • x86_64-darwin
    • aarch64-darwin
  • For non-Linux: Is sandboxing enabled in nix.conf? (See Nix manual)
    • sandbox = relaxed
    • sandbox = true
  • Tested, as applicable:
  • Tested compilation of all packages that depend on this change using nix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD". Note: all changes have to be committed, also see nixpkgs-review usage
  • Tested basic functionality of all binary files (usually in ./result/bin/)
  • 24.11 Release Notes (or backporting 23.11 and 24.05 Release notes)
    • (Package updates) Added a release notes entry if the change is major or breaking
    • (Module updates) Added a release notes entry if the change is significant
    • (Module addition) Added a release notes entry if adding a new NixOS module
  • Fits CONTRIBUTING.md.

Add a 👍 reaction to pull requests you find important.

@github-actions github-actions bot added the 8.has: maintainer-list (update) This PR changes `maintainers/maintainer-list.nix` label Sep 27, 2024
@ofborg ofborg bot added 8.has: package (new) This PR adds a new package 11.by: package-maintainer This PR was created by a maintainer of all the package it changes. 10.rebuild-darwin: 0 This PR does not cause any packages to rebuild on Darwin. 10.rebuild-linux: 1-10 This PR causes between 1 and 10 packages to rebuild on Linux. 10.rebuild-linux: 1 This PR causes 1 package to rebuild on Linux. labels Sep 27, 2024
@Mx2uller Mx2uller force-pushed the master branch 2 times, most recently from 52f261c to ff10767 Compare September 30, 2024 09:52
@Mx2uller Mx2uller force-pushed the master branch 3 times, most recently from a3d14b7 to 0a909e3 Compare October 13, 2024 07:57
Copy link
Contributor Author

@Mx2uller Mx2uller left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi, I made changes like you suggested. Initially I did have buildInputs but tried to build package without it, and it built successfully and run. For some reason everything in nativeBuildInputs stays alive in nix store, even after gc.

@wegank wegank added the 12.approvals: 1 This PR was reviewed and approved by one person. label Oct 29, 2024
@github-actions github-actions bot added 10.rebuild-darwin: 1-10 This PR causes between 1 and 10 packages to rebuild on Darwin. and removed 10.rebuild-linux: 1 This PR causes 1 package to rebuild on Linux. 10.rebuild-darwin: 0 This PR does not cause any packages to rebuild on Darwin. labels Dec 19, 2024
@wegank wegank removed the 12.approvals: 1 This PR was reviewed and approved by one person. label Dec 19, 2024
@ofborg ofborg bot added 10.rebuild-darwin: 0 This PR does not cause any packages to rebuild on Darwin. 10.rebuild-linux: 1 This PR causes 1 package to rebuild on Linux. 10.rebuild-darwin: 1-10 This PR causes between 1 and 10 packages to rebuild on Darwin. 10.rebuild-darwin: 1 This PR causes 1 package to rebuild on Darwin. and removed 10.rebuild-darwin: 1-10 This PR causes between 1 and 10 packages to rebuild on Darwin. 10.rebuild-darwin: 0 This PR does not cause any packages to rebuild on Darwin. labels Dec 19, 2024
@FliegendeWurst
Copy link
Member

Please override to use gccStdenv on Darwin, or patch the makefile to use generic cc:

       > cp -f -r textures/* build/sView.app/Contents/MacOS/textures/
       > g++ -O3 -std=c++0x -Wall -fPIC -DST_HAVE_MONGOOSE -I/private/tmp/nix-build-sview-20_08.drv-0/source/3rdparty/include -I/private/tmp/nix-build-sview-20_08.drv-0/source/include -DAPP_PREFIX="\"/usr\"" -mmacosx-version-min=10.10 -I/nix/store/cxlb2dhd940yks83105zvwn4z3sga4d8-freetype-2.13.3-dev/include/freetype2   -c -o /private/tmp/nix-build-sview-20_08.drv-0/source/StShared/StAVFrame.o /private/tmp/nix-build-sview-20_08.drv-0/source/StShared/StAVFrame.cpp
       > /nix/store/7ka6l083nbz2q7p9x8xi1nf9s83sa6w4-bash-5.2p37/bin/bash: line 1: g++: command not found
       > make: *** [<builtin>: /private/tmp/nix-build-sview-20_08.drv-0/source/StShared/StAVFrame.o] Error 127

@Mx2uller
Copy link
Contributor Author

Hi, I am going to revert platforms.unix back to linux as I am unable to build and test locally for darwin.

@github-actions github-actions bot added 10.rebuild-darwin: 0 This PR does not cause any packages to rebuild on Darwin. and removed 10.rebuild-darwin: 1 This PR causes 1 package to rebuild on Darwin. 10.rebuild-linux: 1 This PR causes 1 package to rebuild on Linux. 10.rebuild-darwin: 1-10 This PR causes between 1 and 10 packages to rebuild on Darwin. labels Dec 31, 2024
@FliegendeWurst
Copy link
Member

For Darwin, I tried

diff --git a/pkgs/by-name/sv/sview/package.nix b/pkgs/by-name/sv/sview/package.nix
index 7f62b2195278..b7ea2b9e977c 100644
--- a/pkgs/by-name/sv/sview/package.nix
+++ b/pkgs/by-name/sv/sview/package.nix
@@ -46,6 +46,14 @@ stdenv.mkDerivation rec {
     openal
   ];

+  makeFlags = [
+    "CC=${stdenv.cc.targetPrefix}cc"
+    "CXX=${stdenv.cc.targetPrefix}c++"
+    "LD=${stdenv.cc.targetPrefix}c++"
+  ];
+
+  enableParallelBuilding = true;
+
   fontsConf = makeFontsConf {
     fontDirectories = [
       nanum
@@ -80,6 +88,6 @@ stdenv.mkDerivation rec {
     ];
     maintainers = with maintainers; [ mx2uller ];
     mainProgram = "sView";
-    platforms = platforms.linux;
+    platforms = platforms.unix;
   };
 }

However the build still fails due to missing ibtool.

@Mx2uller
Copy link
Contributor Author

Is it possible to test and build on my linux machine for darwin?

For Darwin, I tried

diff --git a/pkgs/by-name/sv/sview/package.nix b/pkgs/by-name/sv/sview/package.nix
index 7f62b2195278..b7ea2b9e977c 100644
--- a/pkgs/by-name/sv/sview/package.nix
+++ b/pkgs/by-name/sv/sview/package.nix
@@ -46,6 +46,14 @@ stdenv.mkDerivation rec {
     openal
   ];

+  makeFlags = [
+    "CC=${stdenv.cc.targetPrefix}cc"
+    "CXX=${stdenv.cc.targetPrefix}c++"
+    "LD=${stdenv.cc.targetPrefix}c++"
+  ];
+
+  enableParallelBuilding = true;
+
   fontsConf = makeFontsConf {
     fontDirectories = [
       nanum
@@ -80,6 +88,6 @@ stdenv.mkDerivation rec {
     ];
     maintainers = with maintainers; [ mx2uller ];
     mainProgram = "sView";
-    platforms = platforms.linux;
+    platforms = platforms.unix;
   };
 }

However the build still fails due to missing ibtool.

@FliegendeWurst
Copy link
Member

I always use the community builder https://nix-community.org/community-builder/

However I think the ibtool issue is a blocker. I tried xib2nib which provides it, but it seems that is not the right package.

@Mx2uller
Copy link
Contributor Author

Currently I do not have access to community builder, for now I cleaned up commit history so its one commit per file.

@FliegendeWurst
Copy link
Member

By the way, if you add your Git email (...@pm.me) to Github as secondary email, the commits show up as yours.

@wegank wegank added the 12.approvals: 1 This PR was reviewed and approved by one person. label Jan 1, 2025
@wolfgangwalther wolfgangwalther merged commit 3b18435 into NixOS:master Jan 1, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

8.has: maintainer-list (update) This PR changes `maintainers/maintainer-list.nix` 8.has: package (new) This PR adds a new package 10.rebuild-darwin: 0 This PR does not cause any packages to rebuild on Darwin. 10.rebuild-linux: 1-10 This PR causes between 1 and 10 packages to rebuild on Linux. 11.by: package-maintainer This PR was created by a maintainer of all the package it changes. 12.approvals: 1 This PR was reviewed and approved by one person.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants