Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

meshroom: init at 2021.1.0 #9

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 26 additions & 0 deletions meshroom/flake.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

105 changes: 105 additions & 0 deletions meshroom/flake.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,105 @@
{
description = "A free, open-source 3D Reconstruction Software based on the AliceVision framework (upstream binaries)";

inputs.nixpkgs.url = "nixpkgs/nixos-22.05";

outputs = { self, nixpkgs }:

let
pkgs = import nixpkgs {
system = "x86_64-linux";
overlays = [ self.overlays.default ];
};
in {
overlays.default = final: prev: {
meshroom = let
python3 = pkgs.python37;
in prev.stdenvNoCC.mkDerivation rec {
pname = "meshroom-bin";
version = "2021.1.0";
src = import <nix/fetchurl.nix> {
url = "https://github.com/alicevision/meshroom/releases/download/v${version}/Meshroom-${version}-linux-cuda10.tar.gz";
hash = "sha256-3pTrJktbMNVbNjKcR2FZa8xrTEQ7CWsLFayWOJLXnuQ=";
};

nativeBuildInputs = with pkgs; [
autoPatchelfHook
cudaPackages.autoAddOpenGLRunpathHook
libsForQt5.wrapQtAppsHook
makeWrapper
];

buildInputs = with pkgs; [
e2fsprogs
glib
krb5
zlib
postgresql
unixODBC
cups
speechd
python3
libsForQt5.qt5.qtwebengine
libsForQt5.qt5.qtwebview
libsForQt5.qt5.qtwebsockets
libsForQt5.qt5.qttools
gtk3
atk
gdk-pixbuf
cairo
pango
libdrm
libGLU
libglvnd
libglvnd
ocl-icd
xorg.libX11
xorg.libXfixes
xorg.libXi
xorg.libXrender
xorg.libXxf86vm
];

installPhase = ''
mkdir -p $out/opt/meshroom
cp -r \
Meshroom \
meshroom_batch \
meshroom_compute \
qtPlugins \
lib \
aliceVision \
$out/opt/meshroom

mkdir -p $out/bin
makeWrapper $out/opt/meshroom/Meshroom $out/bin/Meshroom --chdir $out/opt/meshroom
makeWrapper $out/opt/meshroom/meshroom_batch $out/bin/meshroom_batch --chdir $out/opt/meshroom
makeWrapper $out/opt/meshroom/meshroom_compute $out/bin/meshroom_compute --chdir $out/opt/meshroom
'';

postFixup = ''
patchelf --debug --add-needed libpython${pkgs.lib.versions.major python3.pythonVersion}.so \
"$out/opt/meshroom/Meshroom"
'';

meta.mainProgram = "meshroom";
};
};

packages.x86_64-linux.default = pkgs.meshroom;

checks.x86_64-linux = {
meshroom = pkgs.runCommand "meshroom-test" {
buildInputs = [
pkgs.meshroom
];
}
''
Meshroom --help
meshroom_compute --help
meshroom_batch --help
touch $out
'';
};
};
}