summary refs log tree commit diff
path: root/pkgs/applications/editors/yi
diff options
context:
space:
mode:
Diffstat (limited to 'pkgs/applications/editors/yi')
-rw-r--r--pkgs/applications/editors/yi/wrapper.nix36
-rw-r--r--pkgs/applications/editors/yi/yi-custom-cabal/LICENSE24
-rw-r--r--pkgs/applications/editors/yi/yi-custom-cabal/yi-custom.cabal17
-rw-r--r--pkgs/applications/editors/yi/yi-custom.nix40
-rw-r--r--pkgs/applications/editors/yi/yi.nix2
5 files changed, 37 insertions, 82 deletions
diff --git a/pkgs/applications/editors/yi/wrapper.nix b/pkgs/applications/editors/yi/wrapper.nix
new file mode 100644
index 00000000000..a4dc3fe367a
--- /dev/null
+++ b/pkgs/applications/editors/yi/wrapper.nix
@@ -0,0 +1,36 @@
+# Note: this relies on dyre patched for NIX_GHC which is done in
+# haskell-ng only.
+#
+# To use this for hacking of your Yi config file, drop into a shell
+# with env attribute.
+{ stdenv, makeWrapper
+, haskellPackages
+, extraPackages ? (s: [])
+}:
+let
+  yiEnv = haskellPackages.ghcWithPackages
+    (self: [ self.yi ] ++ extraPackages self);
+in
+stdenv.mkDerivation {
+  name = "yi-custom";
+  version = "0.0.0.1";
+  unpackPhase = "true";
+  nativeBuildInputs = [ makeWrapper ];
+
+  buildCommand = ''
+    mkdir -p $out/bin
+    makeWrapper ${haskellPackages.yi}/bin/yi $out/bin/yi \
+      --set NIX_GHC ${yiEnv}/bin/ghc
+  '';
+
+  # For hacking purposes
+  env = yiEnv;
+
+  meta = with stdenv.lib; {
+    description = "Allows Yi to find libraries and the compiler easily";
+    # This wrapper and wrapper only is under PD
+    license = licenses.publicDomain;
+    maintainers = with maintainers; [ fuuzetsu ];
+  };
+
+}
diff --git a/pkgs/applications/editors/yi/yi-custom-cabal/LICENSE b/pkgs/applications/editors/yi/yi-custom-cabal/LICENSE
deleted file mode 100644
index cf1ab25da03..00000000000
--- a/pkgs/applications/editors/yi/yi-custom-cabal/LICENSE
+++ /dev/null
@@ -1,24 +0,0 @@
-This is free and unencumbered software released into the public domain.
-
-Anyone is free to copy, modify, publish, use, compile, sell, or
-distribute this software, either in source code form or as a compiled
-binary, for any purpose, commercial or non-commercial, and by any
-means.
-
-In jurisdictions that recognize copyright laws, the author or authors
-of this software dedicate any and all copyright interest in the
-software to the public domain. We make this dedication for the benefit
-of the public at large and to the detriment of our heirs and
-successors. We intend this dedication to be an overt act of
-relinquishment in perpetuity of all present and future rights to this
-software under copyright law.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
-EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
-MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
-IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR
-OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
-ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
-OTHER DEALINGS IN THE SOFTWARE.
-
-For more information, please refer to <http://unlicense.org>
diff --git a/pkgs/applications/editors/yi/yi-custom-cabal/yi-custom.cabal b/pkgs/applications/editors/yi/yi-custom-cabal/yi-custom.cabal
deleted file mode 100644
index d9ffbb8e481..00000000000
--- a/pkgs/applications/editors/yi/yi-custom-cabal/yi-custom.cabal
+++ /dev/null
@@ -1,17 +0,0 @@
-name:           yi-custom
-version:        0.0.0.1
-category:       Yi
-synopsis:       Convenience wrapper for nix
-description:    Convenience wrapper for nix
-license:        PublicDomain
-license-file:   LICENSE
-author:         Mateusz Kowalczyk
-maintainer:     fuuzetsu@fuuzetsu.co.uk
-Cabal-Version:  >= 1.10
-build-type:     Simple
-
-library
-  hs-source-dirs: .
-  default-language: Haskell2010
-  build-depends: base, yi
-  ghc-options: -threaded
diff --git a/pkgs/applications/editors/yi/yi-custom.nix b/pkgs/applications/editors/yi/yi-custom.nix
deleted file mode 100644
index 3dbd4611998..00000000000
--- a/pkgs/applications/editors/yi/yi-custom.nix
+++ /dev/null
@@ -1,40 +0,0 @@
-# This is a manually-written expression over an in-tree cabal file.
-# It's awkward but this way allows the package user to pass in
-# extraPackages without much extra hassle on their end, similarly how
-# the XMonad service handles it: the difference is that we don't have
-# anything like XMONAD_GHC…
-#
-# The idea is that the user changes their configs using any libraries
-# he likes and then builds it using this expression. Once that's done,
-# ‘reload’ and similar functions should all work as long as the user
-# doesn't need new libraries at which point they should add them to
-# extraPackages and rebuild from the expression.
-{ cabal, yi, extraPackages, makeWrapper, ghcWithPackages }:
-let
-  w = ghcWithPackages (self: [ yi ] ++ extraPackages self);
-  wrappedGhc = w.override { ignoreCollisions = true; };
-in
-cabal.mkDerivation (self: rec {
-  pname = "yi-custom";
-  version = "0.0.0.1";
-  src = ./yi-custom-cabal;
-  isLibrary = true;
-  buildDepends = [ yi ];
-  buildTools = [ makeWrapper ];
-  noHaddock = true;
-  doCheck = false;
-
-  postInstall = ''
-    makeWrapper ${yi}/bin/yi $out/bin/yi \
-      --set NIX_GHC ${wrappedGhc}/bin/ghc \
-      --set NIX_GHC_LIBDIR ${wrappedGhc}/lib/ghc-${self.ghc.version}
-  '';
-  meta = {
-    homepage = "http://haskell.org/haskellwiki/Yi";
-    description = "Wrapper over user-specified Haskell libraries for use in Yi config";
-    license = self.stdenv.lib.licenses.publicDomain;
-    platforms = self.ghc.meta.platforms;
-    maintainers = with self.stdenv.lib.maintainers; [ fuuzetsu ];
-  };
-
-})
\ No newline at end of file
diff --git a/pkgs/applications/editors/yi/yi.nix b/pkgs/applications/editors/yi/yi.nix
index a63375adfd1..f9ef27d999d 100644
--- a/pkgs/applications/editors/yi/yi.nix
+++ b/pkgs/applications/editors/yi/yi.nix
@@ -30,7 +30,7 @@ cabal.mkDerivation (self: {
   configureFlags = "-fpango -fvty";
   noHaddock = self.stdenv.lib.versionOlder self.ghc.version "7.8";
   meta = {
-    homepage = "http://haskell.org/haskellwiki/Yi";
+    homepage = http://haskell.org/haskellwiki/Yi;
     description = "The Haskell-Scriptable Editor";
     license = self.stdenv.lib.licenses.gpl2;
     platforms = self.ghc.meta.platforms;