about summary refs log tree commit diff
path: root/pkgs/applications/science
diff options
context:
space:
mode:
Diffstat (limited to 'pkgs/applications/science')
-rw-r--r--pkgs/applications/science/math/nota/default.nix40
-rw-r--r--pkgs/applications/science/math/sage/sage-env.nix2
2 files changed, 41 insertions, 1 deletions
diff --git a/pkgs/applications/science/math/nota/default.nix b/pkgs/applications/science/math/nota/default.nix
new file mode 100644
index 000000000000..897785ef6e8b
--- /dev/null
+++ b/pkgs/applications/science/math/nota/default.nix
@@ -0,0 +1,40 @@
+{ mkDerivation, haskellPackages, fetchurl, lib }:
+
+mkDerivation rec {
+  pname = "nota";
+  version = "1.0";
+
+  # Can't use fetchFromGitLab since codes.kary.us doesn't support https
+  src = fetchurl {
+    url = "http://codes.kary.us/nota/nota/-/archive/V${version}/nota-V${version}.tar.bz2";
+    sha256 = "0bbs6bm9p852hvqadmqs428ir7m65h2prwyma238iirv42pk04v8";
+  };
+
+  postUnpack = ''
+    export sourceRoot=$sourceRoot/source
+  '';
+
+  isLibrary = false;
+  isExecutable = true;
+
+  libraryHaskellDepends = with haskellPackages; [
+    base
+    bytestring
+    array
+    split
+    scientific
+    parsec
+    ansi-terminal
+    regex-compat
+    containers
+    terminal-size
+    numbers
+    text
+    time
+  ];
+
+  description = "The most beautiful command line calculator";
+  homepage = "https://kary.us/nota";
+  license = lib.licenses.mpl20;
+  maintainers = with lib.maintainers; [ dtzWill ];
+}
diff --git a/pkgs/applications/science/math/sage/sage-env.nix b/pkgs/applications/science/math/sage/sage-env.nix
index 00397239876b..68e0d134ace2 100644
--- a/pkgs/applications/science/math/sage/sage-env.nix
+++ b/pkgs/applications/science/math/sage/sage-env.nix
@@ -177,7 +177,7 @@ writeTextFile rec {
     export SAGE_EXTCODE='${sagelib.src}/src/ext'
 
   # for find_library
-    export DYLD_LIBRARY_PATH="${lib.makeLibraryPath [stdenv.cc.libc singular]}:$DYLD_LIBRARY_PATH"
+    export DYLD_LIBRARY_PATH="${lib.makeLibraryPath [stdenv.cc.libc singular]}''${DYLD_LIBRARY_PATH:+:}$DYLD_LIBRARY_PATH"
   '';
 } // {
   lib = sagelib; # equivalent of `passthru`, which `writeTextFile` doesn't support