summary refs log tree commit diff
path: root/pkgs/applications/editors/vim/default.nix
diff options
context:
space:
mode:
authorVladimír Čunát <vcunat@gmail.com>2016-11-07 15:10:32 +0100
committerVladimír Čunát <vcunat@gmail.com>2016-11-07 16:38:13 +0100
commit1667046505070067884668e0f2b96aab4c193165 (patch)
tree6749e82ec5c51ae54167d15c59adc9d282e508ab /pkgs/applications/editors/vim/default.nix
parentf49f90bfdd58e0f02d709c028a6e33a588dd56f4 (diff)
downloadnixlib-1667046505070067884668e0f2b96aab4c193165.tar
nixlib-1667046505070067884668e0f2b96aab4c193165.tar.gz
nixlib-1667046505070067884668e0f2b96aab4c193165.tar.bz2
nixlib-1667046505070067884668e0f2b96aab4c193165.tar.lz
nixlib-1667046505070067884668e0f2b96aab4c193165.tar.xz
nixlib-1667046505070067884668e0f2b96aab4c193165.tar.zst
nixlib-1667046505070067884668e0f2b96aab4c193165.zip
vim: factor common.nix from {default,configurable}.nix
The derivations are unchanged.
Diffstat (limited to 'pkgs/applications/editors/vim/default.nix')
-rw-r--r--pkgs/applications/editors/vim/default.nix25
1 files changed, 5 insertions, 20 deletions
diff --git a/pkgs/applications/editors/vim/default.nix b/pkgs/applications/editors/vim/default.nix
index 1511b3865792..cf84609921e5 100644
--- a/pkgs/applications/editors/vim/default.nix
+++ b/pkgs/applications/editors/vim/default.nix
@@ -1,4 +1,4 @@
-{ stdenv, fetchFromGitHub, fetchurl, ncurses, gettext, pkgconfig
+{ stdenv, fetchurl, callPackage, ncurses, gettext, pkgconfig
 # default vimrc
 , vimrc ? fetchurl {
     name = "default-vimrc";
@@ -8,18 +8,13 @@
 # apple frameworks
 , Carbon, Cocoa }:
 
+let
+  common = callPackage ./common.nix {};
+in
 stdenv.mkDerivation rec {
   name = "vim-${version}";
-  version = "8.0.0005";
 
-  src = fetchFromGitHub {
-    owner = "vim";
-    repo = "vim";
-    rev = "v${version}";
-    sha256 = "0ys3l3dr43vjad1f096ch1sl3x2ajsqkd03rdn6n812m7j4wipx0";
-  };
-
-  enableParallelBuilding = true;
+  inherit (common) version src hardeningDisable enableParallelBuilding meta;
 
   buildInputs = [ ncurses pkgconfig ]
     ++ stdenv.lib.optionals stdenv.isDarwin [ Carbon Cocoa ];
@@ -30,8 +25,6 @@ stdenv.mkDerivation rec {
     "--enable-nls"
   ];
 
-  hardeningDisable = [ "fortify" ];
-
   postInstall = ''
     ln -s $out/bin/vim $out/bin/vi
     mkdir -p $out/share/vim
@@ -62,12 +55,4 @@ stdenv.mkDerivation rec {
   # patchPhase = ''
   #   sed -i -e 's/as_fn_error.*int32.*/:/' src/auto/configure
   # '';
-
-  meta = with stdenv.lib; {
-    description = "The most popular clone of the VI editor";
-    homepage    = http://www.vim.org;
-    license = licenses.vim;
-    maintainers = with maintainers; [ lovek323 ];
-    platforms   = platforms.unix;
-  };
 }