Skip to content

Instantly share code, notes, and snippets.

@kskyten
Created August 2, 2017 17:31
Show Gist options
  • Save kskyten/d53bfd0ce1e9851a7187d09578d4c6e5 to your computer and use it in GitHub Desktop.
Save kskyten/d53bfd0ce1e9851a7187d09578d4c6e5 to your computer and use it in GitHub Desktop.
julia:
{ buildInputs ? [], name, src, ... } @ attrs:
let self = julia.stdenv.mkDerivation (
{
doCheck = false;
# doInstallCheck = true;
installPhase = ''
mkdir -p $out
cp -R ${src}/* $out
'';
# This was in perl's default.nix, but I don't understand what it does.
# postFixup = ''
# if test -e $out/nix-support/propagated-native-build-inputs; then
# ln -s $out/nix-support/propagated-native-build-inputs $out/nix-support/propagated-user-env-packages
# fi
# '';
}
//
attrs
//
{
name = "julia-" + name;
buildInputs = buildInputs ++ [ julia ];
}
);
in
julia.stdenv.mkDerivation (
attrs // {
name = self.name;
installPhase = ''
mkdir -p $out
cp -R ${src}/* $out
'';
JULIA_LOAD_PATH = "${self}/src";
buildInputs = self.buildInputs;
}
)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment