pax_global_header00006660000000000000000000000064135117735700014523gustar00rootroot0000000000000052 comment=3bb0193a4a69fe70c975af4c167dbf6ec97b098d znur-3bb0193/000077500000000000000000000000001351177357000130465ustar00rootroot00000000000000znur-3bb0193/default.nix000066400000000000000000000006101351177357000152070ustar00rootroot00000000000000{ pkgs ? import {} }: let inherit (pkgs) callPackage; inherit (pkgs.lib) filterAttrs mapAttrs; inherit (builtins) substring readDir toString; here = ./.; want = filterAttrs (name: type: type == "directory" && (substring 0 1 name) != "." ) (readDir here); in mapAttrs (name: type: callPackage ((toString here) + "/" + (toString name)) {} ) want znur-3bb0193/k/000077500000000000000000000000001351177357000133005ustar00rootroot00000000000000znur-3bb0193/k/default.nix000066400000000000000000000021711351177357000154450ustar00rootroot00000000000000{ stdenv, fetchurl }: assert stdenv.is64bit; assert stdenv.isLinux || stdenv.isDarwin; let osdir = if stdenv.isDarwin then "osx-64" else "linux-64"; sha256 = if stdenv.isDarwin then "6757b2fcabed467c1ecda3f3b316a797c9ab320cd9d3b57c5de3263b4c27adad" else "54c44f891c05dd4df68be83f756d8317c903a9c67c19937bfb4d201119ba0f2c"; in stdenv.mkDerivation rec { name = "k"; version = "2019.07.07-1207_ga0a263c"; src = fetchurl { inherit sha256; url = "https://anaconda.org/shaktidb/shakti/${builtins.substring 0 10 version}/download/${osdir}/shakti-${version}.tar.bz2"; }; phases = [ "installPhase" ]; installPhase = '' mkdir -p "$out" tar -xf "${src}" -C "$out" "bin/${name}" chmod +x "$out/bin/${name}" ''; meta = with stdenv.lib; { description = "An interpreter for the k7 language."; license = { fullName = "Evaluation Agreement"; url = https://shakti.com/license; free = false; }; homepage = https://shakti.com/; platforms = with platforms; linux ++ darwin; }; } znur-3bb0193/mathematica/000077500000000000000000000000001351177357000153235ustar00rootroot00000000000000znur-3bb0193/mathematica/10.nix000066400000000000000000000065371351177357000162760ustar00rootroot00000000000000{ stdenv , coreutils , patchelf , requireFile , alsaLib , fontconfig , freetype , gcc , glib , ncurses , opencv , openssl , unixODBC , xorg , libxml2 , libuuid }: let platform = if stdenv.hostPlatform.system == "i686-linux" || stdenv.hostPlatform.system == "x86_64-linux" then "Linux" else throw "Mathematica requires i686-linux or x86_64 linux"; in stdenv.mkDerivation rec { version = "10.0.2"; name = "mathematica-${version}"; src = requireFile rec { name = "Mathematica_${version}_LINUX.sh"; message = '' This nix expression requires that ${name} is already part of the store. Find the file on your Mathematica CD and add it to the nix store with nix-store --add-fixed sha256 . ''; sha256 = "1d2yaiaikzcacjamlw64g3xkk81m3pb4vz4an12cv8nb7kb20x9l"; }; buildInputs = [ coreutils patchelf alsaLib coreutils fontconfig freetype gcc.cc gcc.libc glib ncurses opencv openssl unixODBC libxml2 libuuid ] ++ (with xorg; [ libX11 libXext libXtst libXi libXmu libXrender libxcb libXcursor libXfixes libXrandr libICE libSM ]); ldpath = stdenv.lib.makeLibraryPath buildInputs + stdenv.lib.optionalString (stdenv.hostPlatform.system == "x86_64-linux") (":" + stdenv.lib.makeSearchPathOutput "lib" "lib64" buildInputs); phases = "unpackPhase installPhase fixupPhase"; unpackPhase = '' echo "=== Extracting makeself archive ===" # find offset from file offset=$(${stdenv.shell} -c "$(grep -axm1 -e 'offset=.*' $src); echo \$offset" $src) dd if="$src" ibs=$offset skip=1 | tar -xf - cd Unix ''; installPhase = '' cd Installer # don't restrict PATH, that has already been done sed -i -e 's/^PATH=/# PATH=/' MathInstaller echo "=== Running MathInstaller ===" ./MathInstaller -auto -createdir=y -execdir=$out/bin -targetdir=$out/libexec/Mathematica -platforms=${platform} -silent ''; preFixup = '' echo "=== PatchElfing away ===" # This code should be a bit forgiving of errors, unfortunately set +e find $out/libexec/Mathematica/SystemFiles -type f -perm -0100 | while read f; do type=$(readelf -h "$f" 2>/dev/null | grep 'Type:' | sed -e 's/ *Type: *\([A-Z]*\) (.*/\1/') if [ -z "$type" ]; then : elif [ "$type" == "EXEC" ]; then echo "patching $f executable <<" patchelf --shrink-rpath "$f" patchelf \ --set-interpreter "$(cat $NIX_CC/nix-support/dynamic-linker)" \ --set-rpath "$(patchelf --print-rpath "$f"):${ldpath}" \ "$f" \ && patchelf --shrink-rpath "$f" \ || echo unable to patch ... ignoring 1>&2 elif [ "$type" == "DYN" ]; then echo "patching $f library <<" patchelf \ --set-rpath "$(patchelf --print-rpath "$f"):${ldpath}" \ "$f" \ && patchelf --shrink-rpath "$f" \ || echo unable to patch ... ignoring 1>&2 else echo "not patching $f <<: unknown elf type" fi done ''; # all binaries are already stripped dontStrip = true; # we did this in prefixup already dontPatchELF = true; meta = { description = "Wolfram Mathematica computational software system"; homepage = http://www.wolfram.com/mathematica/; license = stdenv.lib.licenses.unfree; }; } znur-3bb0193/mathematica/9.nix000066400000000000000000000060441351177357000162170ustar00rootroot00000000000000{ stdenv , coreutils , patchelf , requireFile , alsaLib , fontconfig , freetype , gcc , glib , ncurses , opencv , openssl , unixODBC , xorg }: let platform = if stdenv.hostPlatform.system == "i686-linux" || stdenv.hostPlatform.system == "x86_64-linux" then "Linux" else throw "Mathematica requires i686-linux or x86_64 linux"; in stdenv.mkDerivation rec { name = "mathematica-9.0.0"; src = requireFile rec { name = "Mathematica_9.0.0_LINUX.sh"; message = '' This nix expression requires that Mathematica_9.0.0_LINUX.sh is already part of the store. Find the file on your Mathematica CD and add it to the nix store with nix-store --add-fixed sha256 . ''; sha256 = "106zfaplhwcfdl9rdgs25x83xra9zcny94gb22wncbfxvrsk3a4q"; }; buildInputs = [ coreutils patchelf alsaLib coreutils fontconfig freetype gcc.cc gcc.libc glib ncurses opencv openssl unixODBC ] ++ (with xorg; [ libX11 libXext libXtst libXi libXmu libXrender libxcb ]); ldpath = stdenv.lib.makeLibraryPath buildInputs + stdenv.lib.optionalString (stdenv.hostPlatform.system == "x86_64-linux") (":" + stdenv.lib.makeSearchPathOutput "lib" "lib64" buildInputs); phases = "unpackPhase installPhase fixupPhase"; unpackPhase = '' echo "=== Extracting makeself archive ===" # find offset from file offset=$(${stdenv.shell} -c "$(grep -axm1 -e 'offset=.*' $src); echo \$offset" $src) dd if="$src" ibs=$offset skip=1 | tar -xf - cd Unix ''; installPhase = '' cd Installer # don't restrict PATH, that has already been done sed -i -e 's/^PATH=/# PATH=/' MathInstaller echo "=== Running MathInstaller ===" ./MathInstaller -auto -createdir=y -execdir=$out/bin -targetdir=$out/libexec/Mathematica -platforms=${platform} -silent ''; preFixup = '' echo "=== PatchElfing away ===" find $out/libexec/Mathematica/SystemFiles -type f -perm -0100 | while read f; do type=$(readelf -h "$f" 2>/dev/null | grep 'Type:' | sed -e 's/ *Type: *\([A-Z]*\) (.*/\1/') if [ -z "$type" ]; then : elif [ "$type" == "EXEC" ]; then echo "patching $f executable <<" patchelf \ --set-interpreter "$(cat $NIX_CC/nix-support/dynamic-linker)" \ --set-rpath "${ldpath}" \ "$f" patchelf --shrink-rpath "$f" elif [ "$type" == "DYN" ]; then echo "patching $f library <<" patchelf \ --set-rpath "$(patchelf --print-rpath "$f"):${ldpath}" \ "$f" \ && patchelf --shrink-rpath "$f" \ || echo unable to patch ... ignoring 1>&2 else echo "not patching $f <<: unknown elf type" fi done ''; # all binaries are already stripped dontStrip = true; # we did this in prefixup already dontPatchELF = true; meta = { description = "Wolfram Mathematica computational software system"; homepage = http://www.wolfram.com/mathematica/; license = stdenv.lib.licenses.unfree; }; } znur-3bb0193/mathematica/default.nix000066400000000000000000000071171351177357000174750ustar00rootroot00000000000000{ stdenv , coreutils , patchelf , callPackage , alsaLib , dbus , fontconfig , freetype , gcc , glib , ncurses , opencv , openssl , unixODBC , xkeyboard_config , xorg , zlib , libxml2 , libuuid , lang ? "en" , libGL , libGLU }: let l10n = with stdenv.lib; with callPackage ./l10ns.nix {}; flip (findFirst (l: l.lang == lang)) l10ns (throw "Language '${lang}' not supported"); in stdenv.mkDerivation rec { inherit (l10n) version name src; buildInputs = [ coreutils patchelf alsaLib coreutils dbus fontconfig freetype gcc.cc gcc.libc glib ncurses opencv openssl unixODBC xkeyboard_config libxml2 libuuid zlib libGL libGLU ] ++ (with xorg; [ libX11 libXext libXtst libXi libXmu libXrender libxcb libXcursor libXfixes libXrandr libICE libSM ]); ldpath = stdenv.lib.makeLibraryPath buildInputs + stdenv.lib.optionalString (stdenv.hostPlatform.system == "x86_64-linux") (":" + stdenv.lib.makeSearchPathOutput "lib" "lib64" buildInputs); phases = "unpackPhase installPhase fixupPhase"; unpackPhase = '' echo "=== Extracting makeself archive ===" # find offset from file offset=$(${stdenv.shell} -c "$(grep -axm1 -e 'offset=.*' $src); echo \$offset" $src) dd if="$src" ibs=$offset skip=1 | tar -xf - cd Unix ''; installPhase = '' cd Installer # don't restrict PATH, that has already been done sed -i -e 's/^PATH=/# PATH=/' MathInstaller sed -i -e 's/\/bin\/bash/\/bin\/sh/' MathInstaller echo "=== Running MathInstaller ===" ./MathInstaller -auto -createdir=y -execdir=$out/bin -targetdir=$out/libexec/Mathematica -silent # Fix library paths cd $out/libexec/Mathematica/Executables for path in mathematica MathKernel Mathematica WolframKernel wolfram math; do sed -i -e 's#export LD_LIBRARY_PATH$#export LD_LIBRARY_PATH=${zlib}/lib:\''${LD_LIBRARY_PATH}#' $path done # Fix xkeyboard config path for Qt for path in mathematica Mathematica; do line=$(grep -n QT_PLUGIN_PATH $path | sed 's/:.*//') sed -i -e "$line iexport QT_XKB_CONFIG_ROOT=\"${xkeyboard_config}/share/X11/xkb\"" $path done ''; preFixup = '' echo "=== PatchElfing away ===" # This code should be a bit forgiving of errors, unfortunately set +e find $out/libexec/Mathematica/SystemFiles -type f -perm -0100 | while read f; do type=$(readelf -h "$f" 2>/dev/null | grep 'Type:' | sed -e 's/ *Type: *\([A-Z]*\) (.*/\1/') if [ -z "$type" ]; then : elif [ "$type" == "EXEC" ]; then echo "patching $f executable <<" patchelf --shrink-rpath "$f" patchelf \ --set-interpreter "$(cat $NIX_CC/nix-support/dynamic-linker)" \ --set-rpath "$(patchelf --print-rpath "$f"):${ldpath}" \ "$f" \ && patchelf --shrink-rpath "$f" \ || echo unable to patch ... ignoring 1>&2 elif [ "$type" == "DYN" ]; then echo "patching $f library <<" patchelf \ --set-rpath "$(patchelf --print-rpath "$f"):${ldpath}" \ "$f" \ && patchelf --shrink-rpath "$f" \ || echo unable to patch ... ignoring 1>&2 else echo "not patching $f <<: unknown elf type" fi done ''; # all binaries are already stripped dontStrip = true; # we did this in prefixup already dontPatchELF = true; meta = { description = "Wolfram Mathematica computational software system"; homepage = http://www.wolfram.com/mathematica/; license = stdenv.lib.licenses.unfree; }; } znur-3bb0193/mathematica/l10ns.nix000066400000000000000000000016611351177357000170040ustar00rootroot00000000000000{ lib, requireFile }: with lib; { l10ns = flip map [ { version = "11.3.0"; lang = "en"; language = "English"; sha256 = "0fcfe208c1eac8448e7be3af0bdb84370b17bd9c5d066c013928c8ee95aed10e"; } { version = "11.2.0"; lang = "ja"; language = "Japanese"; sha256 = "916392edd32bed8622238df435dd8e86426bb043038a3336f30df10d819b49b1"; } ] ({ version, lang, language, sha256 }: { inherit version lang; name = "mathematica-${version}" + optionalString (lang != "en") "-${lang}"; src = requireFile rec { name = "Mathematica_${version}" + optionalString (lang != "en") "_${language}" + "_LINUX.sh"; message = '' This nix expression requires that ${name} is already part of the store. Find the file on your Mathematica CD and add it to the nix store with nix-store --add-fixed sha256 . ''; inherit sha256; }; }); } znur-3bb0193/readme.md000066400000000000000000000006151351177357000146270ustar00rootroot00000000000000My personal nix repository, where everything is guaranteed to break your system at least twice. This should be a valid nix channel: https://ahti.space/~zgrep/znur For example: `nix-channel --add https://ahti.space/~zgrep/znur && nix-channel --update`. If you wish to complain at me, or have an issue to raise, or a patch to send, contact me over IRC: - `zgrep` - `#nixos` - `irc.freenode.net`