Compare commits

...

10 Commits

Author SHA1 Message Date
Tyson Whitehead
dcea1444c3 opengl: VirtualGL fixup require basename in library filter
Prevents triggering on valid files like .solvespace-wrapped.
2021-11-24 18:03:38 -05:00
Tyson Whitehead
8348eb7a4b mfix: URL updates 2021-03-16 17:39:23 -04:00
Tyson Whitehead
0349b4bb98 opengl: Only apply VirtualGL fixup when we are a runtime dependency 2021-02-25 15:10:46 -05:00
Tyson Whitehead
c8ef9c9b96 opengl: VirtualGL fixup filename test wasn't on basename 2021-02-25 15:10:03 -05:00
Tyson Whitehead
c4382fa872 The unpack-channel.nix core function is in flux for 20.09
Once hydra and nixpkgs are on the same nix this we can settle on
the newer builtin-based src/nix-channel/unpack-channel.nix.
2021-02-02 14:48:03 -05:00
Tyson Whitehead
c44bd5abc3 ovito: Use qt mkDerivation so application is proprely wrapped 2021-02-01 13:10:10 -05:00
Tyson Whitehead
95119fbace ovito: Switch from avlib to ffmpeg (avlib is likely going away) 2021-01-31 01:03:37 -05:00
Tyson Whitehead
2a26edb361 ovito: Name should be ovito not ovita 2021-01-29 17:37:21 -05:00
Tyson Whitehead
7c1d02b108 ovito: 3.3.5 -> 3.4.0 2021-01-29 17:36:29 -05:00
Tyson Whitehead
c9c30b98bd smoove: Output is $out and not $bin if outputs hasn't been defined
Not sure why this worked before. Must be more strict now?
2021-01-29 15:03:33 -05:00
8 changed files with 65 additions and 16 deletions

View File

@@ -25,7 +25,7 @@ self: super: pkgs: with pkgs; {
openslide = callPackage ./openslide { };
ovito = libsForQt5.callPackage ./ovito.nix { libav = libav_12; };
ovito = libsForQt5.callPackage ./ovito.nix { };
pythonOverrides = lib.composeExtensions super.pythonOverrides (import ./python-packages.nix pkgs);

View File

@@ -8,7 +8,7 @@ buildPythonApplication rec {
srcs = [
( fetchurl {
url = "https://www.sharcnet.ca/~tyson/nix/mfix-${version}.tar.gz";
url = "https://staff.sharcnet.ca/~tyson/nix/mfix-${version}.tar.gz";
sha256 = "1bnwvgmrmz9y32fsnnqb4x2ab4yh9iyg1d7f3wc2w6q9fsfnzpj4";
} )
( fetchFromGitHub {

View File

@@ -8,7 +8,7 @@ stdenv.mkDerivation rec {
srcs = [
( fetchurl {
url = "https://www.sharcnet.ca/~tyson/nix/mfix-${version}.tar.gz";
url = "https://staff.sharcnet.ca/~tyson/nix/mfix-${version}.tar.gz";
sha256 = "1bnwvgmrmz9y32fsnnqb4x2ab4yh9iyg1d7f3wc2w6q9fsfnzpj4";
} )
( fetchFromGitHub {

View File

@@ -240,6 +240,8 @@ EOF
# Find all executables that depend on libGL and replace with a wrapper script that either executes the original
# executable or a copy with an added libvglfaker.so dependency depending on whether VGL_DISPLAY is set or not.
#
# Only run when we are a runtime dependency (i.e., our host matches).
#
VGL_autoAddVGL() {
declare opts=$(shopt -p) output
set +o pipefail
@@ -247,7 +249,7 @@ VGL_autoAddVGL() {
echo "Inserting VirtualGL into OpenGL executables in $prefix..." >&2
for output in $outputs; do
VGL_findS "${!output}" -type f \
| VGL_testKeepS 'VGL_isElfBin "$1" && ! [[ "$1" == .*.vgl-* ]] && ! [[ "$1" == *.so* ]]' \
| VGL_testKeepS 'VGL_isElfBin "$1" && ! [[ ${1##*/} == .*.vgl-* ]] && ! [[ ${1##*/} == ?*.so ]]' \
| VGL_testKeepS 'VGL_elfLibsResolvedS "$1" | VGL_isTestAnyS '"$(VGL_quote 'VGL_isLibGL "$1"')" \
| VGL_isTestAllS 'VGL_patch "$1"'
done
@@ -255,4 +257,7 @@ VGL_autoAddVGL() {
eval "$opts"
}
postFixupHooks+=(VGL_autoAddVGL)
if (( hostOffset == 0 )); then
fixupOutputHooks+=(VGL_autoAddVGL)
fi

View File

@@ -1,16 +1,16 @@
{ stdenv, fetchFromGitLab, cmake
, boost, netcdf, hdf5, fftwSinglePrec, muparser, openssl, libav, python
{ mkDerivation, lib, fetchFromGitLab, cmake
, boost, netcdf, hdf5, fftwSinglePrec, muparser, openssl, ffmpeg, python
, qtbase, qtsvg, qttools, qscintilla }:
stdenv.mkDerivation rec {
version = "3.3.5";
name = "ovita-${version}";
mkDerivation rec {
pname = "ovito";
version = "3.4.0";
src = fetchFromGitLab {
owner = "stuko";
repo = "ovito";
rev = "v${version}";
sha256 = "016kc5qh1jg8xryjhizjx67pkdpirgnfwi2i92glclqimln6vnns";
sha256 = "1y3wr6yzpsl0qm7cicp2mppfszxd0fgx8hm99in9wff9qd0r16b5";
};
buildInputs = [
@@ -20,12 +20,12 @@ stdenv.mkDerivation rec {
fftwSinglePrec
muparser
openssl
libav
ffmpeg
python
qtbase qtsvg qttools qscintilla
];
meta = with stdenv.lib; {
meta = with lib; {
description = "Scientific visualization and analysis software for atomistic and particle simulation data";
homepage = https://ovito.org;
license = licenses.gpl3;

View File

@@ -15,8 +15,7 @@ buildGoPackage rec {
};
postFixup = ''
declare -p
wrapProgram "$bin/bin/smoove" \
wrapProgram "$out/bin/smoove" \
--suffix PATH : "${gzip}/bin" \
--suffix PATH : "${gsort}/bin" \
--suffix PATH : "${htslib}/bin" \

View File

@@ -81,7 +81,7 @@ in let
# The nix provided nix/unpack-channel.nix function extracts the nixpkgs from the channel,
#
nixpkgs =
( import <nix/unpack-channel.nix> rec {
( pkgs.callPackage ./unpack-channel.nix { } rec {
name = "nixos";
channelName = "${name}-${version}";
src = channel + /tarballs + "/${name}-${version}${nixpkgsVersion.suffix}.tar.xz";

45
unpack-channel.nix Normal file
View File

@@ -0,0 +1,45 @@
# Hydra runs the newer nix which doesn't have corepkgs/unpack-channel.nix. The nix-daemon runs the older nix which
# doesn't have builtins:unpack-channel. This means
#
# - for now we need to provide the older corepkgs/unpack-channel.nix
# - in the future we should switch to src/nix-channel/unpack-channel.nix
{ bash, coreutils, gnutar, xz, gzip, bzip2 }:
let
tarFlags = "--warning=no-timestamp";
builder = builtins.toFile "unpack-channel.sh"
''
mkdir $out
cd $out
xzpat="\.xz\$"
gzpat="\.gz\$"
if [[ "$src" =~ $xzpat ]]; then
xz -d < $src | tar xf - ${tarFlags}
elif [[ "$src" =~ $gzpat ]]; then
gzip -d < $src | tar xf - ${tarFlags}
else
bzip2 -d < $src | tar xf - ${tarFlags}
fi
if [ * != $channelName ]; then
mv * $out/$channelName
fi
'';
in
{ name, channelName, src }:
derivation {
system = builtins.currentSystem;
builder = "${bash}/bin/sh";
args = [ "-e" builder ];
inherit name channelName src;
PATH = "${coreutils}/bin:${gnutar}/bin:${xz}/bin:${gzip}/bin:${bzip2}/bin";
# No point in doing this remotely.
preferLocalBuild = true;
}