uboot: (firmwareOdroidC2/C4) don't invoke patch tool, use patches = [] instead
https://github.com/NixOS/nixpkgs/blob/master/pkgs/stdenv/generic/setup.sh#L948 this can do it nicely. Signed-off-by: Anton Arapov <anton@deadbeef.mx>
This commit is contained in:
commit
56de2bcd43
30691 changed files with 3076956 additions and 0 deletions
62
pkgs/applications/science/math/sage/sage.nix
Normal file
62
pkgs/applications/science/math/sage/sage.nix
Normal file
|
|
@ -0,0 +1,62 @@
|
|||
{ lib, stdenv
|
||||
, makeWrapper
|
||||
, sage-tests
|
||||
, sage-with-env
|
||||
, jupyter-kernel-definition
|
||||
, jupyter-kernel-specs
|
||||
, sagedoc
|
||||
, withDoc
|
||||
, requireSageTests
|
||||
}:
|
||||
|
||||
# A wrapper that makes sure sage finds its docs (if they were build) and the
|
||||
# jupyter kernel spec.
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
version = src.version;
|
||||
pname = "sage";
|
||||
src = sage-with-env.env.lib.src;
|
||||
|
||||
buildInputs = [
|
||||
makeWrapper
|
||||
] ++ lib.optionals requireSageTests [
|
||||
# This is a hack to make sure sage-tests is evaluated. It doesn't acutally
|
||||
# produce anything of value, it just decouples the tests from the build.
|
||||
sage-tests
|
||||
];
|
||||
|
||||
dontUnpack = true;
|
||||
configurePhase = "#do nothing";
|
||||
buildPhase = "#do nothing";
|
||||
|
||||
installPhase = ''
|
||||
mkdir -p "$out/bin"
|
||||
makeWrapper "${sage-with-env}/bin/sage" "$out/bin/sage" \
|
||||
--set SAGE_DOC_SRC_OVERRIDE "${src}/src/doc" ${
|
||||
lib.optionalString withDoc "--set SAGE_DOC_OVERRIDE ${sagedoc}/share/doc/sage"
|
||||
} \
|
||||
--prefix JUPYTER_PATH : "${jupyter-kernel-specs}"
|
||||
'';
|
||||
|
||||
doInstallCheck = withDoc;
|
||||
installCheckPhase = ''
|
||||
export HOME="$TMPDIR/sage-home"
|
||||
mkdir -p "$HOME"
|
||||
"$out/bin/sage" -c 'browse_sage_doc._open("reference", testing=True)'
|
||||
'';
|
||||
|
||||
passthru = {
|
||||
tests = sage-tests;
|
||||
quicktest = sage-tests.override { longTests = false; timeLimit = 600; }; # as many tests as possible in ~10m
|
||||
doc = sagedoc;
|
||||
lib = sage-with-env.env.lib;
|
||||
kernelspec = jupyter-kernel-definition;
|
||||
};
|
||||
|
||||
meta = with lib; {
|
||||
description = "Open Source Mathematics Software, free alternative to Magma, Maple, Mathematica, and Matlab";
|
||||
homepage = "https://www.sagemath.org";
|
||||
license = licenses.gpl2Plus;
|
||||
maintainers = teams.sage.members;
|
||||
};
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue