Skip to content

Commit

Permalink
meshroom: init at 2021.1.0
Browse files Browse the repository at this point in the history
  • Loading branch information
aidalgol committed Sep 25, 2022
1 parent a793946 commit 97ddbc5
Show file tree
Hide file tree
Showing 2 changed files with 131 additions and 0 deletions.
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
cp -r \
Meshroom \
meshroom_batch \
meshroom_compute \
qtPlugins \
lib \
aliceVision \
$out/opt
mkdir -p $out/bin
makeWrapper $out/opt/Meshroom $out/bin/Meshroom --chdir $out/opt
makeWrapper $out/opt/meshroom_batch $out/bin/meshroom_batch --chdir $out/opt
makeWrapper $out/opt/meshroom_compute $out/bin/meshroom_compute --chdir $out/opt
'';

postFixup = ''
patchelf --debug --add-needed libpython${pkgs.lib.versions.major python3.pythonVersion}.so \
"$out/opt/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
'';
};
};
}

0 comments on commit 97ddbc5

Please sign in to comment.